/* ===== SITE 4: PredicX - Polymarket Style (Light/White Theme) ===== */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --accent: #0052FF;
  --accent-glow: rgba(0,82,255,0.15);
  --accent-dim: rgba(0,82,255,0.08);
  --accent-green: #00C853;
  --accent-red: #FF1744;
  --text-primary: #1a1a2e;
  --text-secondary: #5a5a6e;
  --text-muted: #8a8a9e;
  --border: #e8e8ef;
  --border-accent: rgba(0,82,255,0.3);
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ===== Loading Screen - Blue Dice ===== */
.app-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.app-loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-dice { position: relative; width: 80px; height: 80px; margin-bottom: 24px; perspective: 200px; }
.dice-face { font-size: 60px; position: relative; z-index: 2; animation: diceRoll 1.5s ease-in-out infinite; }
@keyframes diceRoll { 0%,100% { transform: rotateY(0deg) rotateX(0deg); } 25% { transform: rotateY(180deg) rotateX(90deg); } 50% { transform: rotateY(360deg) rotateX(180deg); } 75% { transform: rotateY(540deg) rotateX(270deg); } }
.dice-dots { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 8px; opacity: 0.3; }
.dice-dots span { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; margin: auto; }
.dice-dots span:nth-child(1) { grid-area: 1/1; }
.dice-dots span:nth-child(2) { grid-area: 1/3; }
.dice-dots span:nth-child(3) { grid-area: 2/2; }
.dice-dots span:nth-child(4) { grid-area: 3/1; }
.dice-dots span:nth-child(5) { grid-area: 3/3; }
.dice-dots span:nth-child(6) { grid-area: 2/1; }
.loader-title { font-size: 28px; font-weight: 800; letter-spacing: 3px; color: var(--accent); margin-bottom: 24px; }
.loader-bar-wrap { width: 320px; height: 4px; background: var(--border); border-radius: 4px; overflow: hidden; margin: 0 auto 16px; }
.loader-bar { width: 0%; height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.3s ease; }
.loader-stage { font-size: 12px; color: var(--text-muted); letter-spacing: 0.5px; }
.loader-pct { font-size: 12px; color: var(--accent); font-weight: 700; font-family: 'SF Mono', monospace; }
.loader-log { width: 320px; margin: 12px auto 0; font-size: 10px; color: var(--text-muted); font-family: 'SF Mono', monospace; min-height: 20px; }

/* ===== Background Effects - Subtle ===== */
.bg-felt { display: none; }
.bg-chips { display: none; }
.bg-glow { display: none; }

/* ===== Header - Clean White ===== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 64px; background: rgba(255,255,255,0.95); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border); transition: background 0.3s ease;
}
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 100%; }
.header-logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; color: var(--text-primary); }
.header-logo .logo-icon { font-size: 24px; }
.header-nav { display: flex; gap: 32px; }
.header-nav a { font-size: 14px; font-weight: 500; color: var(--text-secondary); transition: color 0.2s; }
.header-nav a:hover { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 12px; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 600; border-radius: var(--radius-sm); padding: 10px 20px; transition: all 0.2s ease; white-space: nowrap; }
.btn-claim { background: var(--accent); color: #fff; }
.btn-claim:hover { background: #0040cc; transform: translateY(-1px); }
.btn-claim:active { transform: translateY(0); }
.btn-secondary { background: transparent; color: var(--text-primary); border: 1px solid var(--border); padding: 10px 20px; }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-connect { background: var(--accent); color: #fff; padding: 8px 16px; font-size: 13px; font-weight: 700; border-radius: 20px; }
.btn-xl { padding: 14px 28px; font-size: 15px; border-radius: var(--radius); }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 20px; }

/* ===== Urgency Banner - Hidden for Polymarket style ===== */
.urgency-banner { display: none !important; }

/* ===== Hero - Clean & Simple ===== */
.hero { padding: 120px 0 60px; position: relative; z-index: 1; background: linear-gradient(180deg, #f8f9ff 0%, #ffffff 100%); }
.hero-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 16px; padding: 6px 12px; background: var(--accent-dim); border-radius: 20px; }
.hero-eyebrow svg { width: 14px; height: 14px; }
.hero-title { font-size: 52px; font-weight: 800; line-height: 1.1; letter-spacing: -1.5px; margin-bottom: 20px; color: var(--text-primary); }
.hero-title .line-accent { color: var(--accent); }
.hero-subtitle { font-size: 17px; color: var(--text-secondary); max-width: 480px; margin-bottom: 28px; line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== 3D Coin - Clean Blue ===== */
.hero-visual { display: flex; align-items: center; justify-content: center; }
.coin-3d { position: relative; width: 240px; height: 240px; }
.coin-glow { display: none; }
.coin-ring { display: none; }
.coin-body { position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(135deg, #e8eeff, #d4e0ff); border: 3px solid var(--accent); display: flex; align-items: center; justify-content: center; font-size: 80px; box-shadow: var(--shadow); animation: gentleFloat 4s ease-in-out infinite; }
@keyframes gentleFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.predict-body .predict-icon { font-size: 80px; }
.coin-badge { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 6px 14px; border-radius: 20px; display: flex; align-items: center; gap: 4px; white-space: nowrap; }

/* ===== Stats Bar - Light ===== */
.stats-bar { padding: 32px 0; position: relative; z-index: 1; border-bottom: 1px solid var(--border); background: var(--bg-secondary); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.stat-item { text-align: center; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ===== Benefits - Light Cards ===== */
.benefits { padding: 60px 0; position: relative; z-index: 1; background: var(--bg-primary); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 8px; }
.section-title { font-size: 36px; font-weight: 800; letter-spacing: -0.5px; color: var(--text-primary); }
.benefits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.benefit-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; transition: all 0.2s ease; box-shadow: var(--shadow); }
.benefit-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.benefit-icon { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--accent-dim); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--accent); }
.benefit-icon svg { width: 22px; height: 22px; }
.benefit-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.benefit-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }

/* ===== Category Tabs ===== */
.category-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 0 24px 16px; max-width: 1200px; margin: 0 auto; scrollbar-width: none; }
.category-tabs::-webkit-scrollbar { display: none; }
.category-tab { padding: 8px 18px; border-radius: 20px; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: all 0.2s; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-secondary); }
.category-tab:hover { border-color: var(--accent); color: var(--accent); }
.category-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== Markets Section - Polymarket Card Style ===== */
.projects-section { padding: 40px 0 60px; position: relative; z-index: 1; background: var(--bg-primary); }
.markets-grid { display: flex; flex-direction: column; gap: 12px; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.market-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; transition: all 0.2s ease; display: grid; grid-template-columns: 60px 1fr auto; gap: 20px; align-items: center; cursor: pointer; box-shadow: var(--shadow); }
.market-card:hover { box-shadow: var(--shadow-hover); border-color: var(--border-accent); }
.market-thumb { width: 60px; height: 60px; border-radius: var(--radius-sm); background: linear-gradient(135deg, #e8eeff, #d4e0ff); display: flex; align-items: center; justify-content: center; font-size: 28px; flex-shrink: 0; }
.market-content { min-width: 0; }
.market-category { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 12px; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.market-category.crypto { background: rgba(0,82,255,0.08); color: var(--accent); }
.market-category.sports { background: rgba(0,200,83,0.08); color: var(--accent-green); }
.market-category.politics { background: rgba(255,23,68,0.08); color: var(--accent-red); }
.market-category.tech { background: rgba(156,39,176,0.08); color: #9C27B0; }
.market-question { font-size: 15px; font-weight: 600; color: var(--text-primary); line-height: 1.4; margin-bottom: 4px; }
.market-meta-inline { font-size: 12px; color: var(--text-muted); }
.market-odds { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 140px; }
.odds-main { font-size: 24px; font-weight: 800; color: var(--accent); }
.odds-sub { font-size: 12px; color: var(--text-muted); }
.odds-bar-h { width: 100px; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.odds-fill-h { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.odds-fill-h.yes { background: var(--accent-green); }
.odds-fill-h.no { background: var(--accent-red); }

/* ===== Trade Section ===== */
.claim-section { padding: 60px 0; position: relative; z-index: 1; background: var(--bg-secondary); }
.claim-card { max-width: 480px; margin: 0 auto; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow); }
.claim-card-header { text-align: center; margin-bottom: 20px; }
.claim-card-title { font-size: 22px; font-weight: 800; margin-bottom: 6px; color: var(--text-primary); }
.claim-card-subtitle { font-size: 14px; color: var(--text-secondary); }
.claim-divider { display: flex; align-items: center; gap: 16px; margin: 20px 0; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.claim-divider::before, .claim-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.wallet-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.wallet-btn { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; color: var(--text-primary); transition: all 0.2s ease; }
.wallet-btn:hover { border-color: var(--accent); background: var(--accent-dim); }
.wallet-btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.wallet-name { flex: 1; text-align: left; }
.input-group { margin-bottom: 14px; }
.input-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.5px; }
.input-group input { width: 100%; padding: 10px 14px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 14px; outline: none; transition: border-color 0.2s; }
.input-group input:focus { border-color: var(--accent); }
.input-group input::placeholder { color: var(--text-muted); }

/* Trade Direction */
.trade-direction { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trade-dir-btn { padding: 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 700; border: 1px solid var(--border); background: var(--bg-secondary); color: var(--text-secondary); transition: all 0.2s; }
.trade-dir-btn.active#btnYes { background: var(--accent-green); color: #fff; border-color: var(--accent-green); }
.trade-dir-btn.active#btnNo { background: var(--accent-red); color: #fff; border-color: var(--accent-red); }
.trade-dir-btn:hover:not(.active) { border-color: var(--accent); color: var(--text-primary); }
.trade-estimate { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding: 10px 14px; background: var(--bg-secondary); border-radius: var(--radius-sm); font-size: 13px; color: var(--text-secondary); }
.trade-estimate strong { color: var(--accent); font-size: 15px; }

/* Claim Status */
.claim-status { text-align: center; padding: 24px; }
.claim-status-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-dim); border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--accent); margin: 0 auto 12px; }
.claim-status-title { font-size: 18px; font-weight: 800; margin-bottom: 6px; color: var(--text-primary); }
.claim-status-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; }
.claim-txhash { font-family: 'SF Mono', monospace; font-size: 11px; color: var(--text-muted); background: var(--bg-secondary); padding: 8px 12px; border-radius: 8px; word-break: break-all; }
.claim-reward-info { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--bg-secondary); border-radius: var(--radius-sm); }
.claim-reward-label { font-size: 13px; color: var(--text-muted); }
.claim-reward-value { font-size: 15px; font-weight: 700; color: var(--accent); }

/* Countdown */
.countdown-wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.countdown-item { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; text-align: center; }
.countdown-value { font-size: 24px; font-weight: 800; color: var(--accent); font-family: 'SF Mono', monospace; }
.countdown-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

/* ===== Leaderboard ===== */
.history-section { padding: 60px 0; position: relative; z-index: 1; background: var(--bg-primary); }
.history-table-wrap { overflow-x: auto; }
.history-table { width: 100%; border-collapse: collapse; }
.history-table th { text-align: left; padding: 12px 16px; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); }
.history-table td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--border); color: var(--text-primary); }
.history-table tbody tr { transition: background 0.2s; }
.history-table tbody tr:hover { background: var(--bg-secondary); }
.return-positive { color: var(--accent-green); font-weight: 700; }
.return-negative { color: var(--accent-red); font-weight: 700; }
.rank-badge { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-size: 12px; font-weight: 700; }
.rank-badge.gold { background: rgba(255,193,7,0.15); color: #F9A825; }
.rank-badge.silver { background: rgba(158,158,158,0.15); color: #757575; }
.rank-badge.bronze { background: rgba(161,136,127,0.15); color: #8D6E63; }

/* ===== FAQ ===== */
.faq-section { padding: 60px 0; position: relative; z-index: 1; background: var(--bg-secondary); }
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; transition: border-color 0.2s; background: var(--bg-card); }
.faq-item:hover { border-color: var(--border-accent); }
.faq-item.open { border-color: var(--border-accent); }
.faq-question { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; font-size: 15px; font-weight: 600; text-align: left; background: var(--bg-card); transition: background 0.2s; color: var(--text-primary); }
.faq-question:hover { background: var(--accent-dim); }
.faq-question svg { width: 18px; height: 18px; color: var(--text-muted); transition: transform 0.3s ease; flex-shrink: 0; }
.faq-item.open .faq-question svg { transform: rotate(180deg); color: var(--accent); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; background: var(--bg-secondary); }
.faq-item.open .faq-answer { max-height: 200px; }
.faq-answer-inner { padding: 0 22px 18px; font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ===== Footer ===== */
.footer { padding: 48px 0 20px; border-top: 1px solid var(--border); position: relative; z-index: 1; background: var(--bg-primary); }
.footer-inner { display: grid; grid-template-columns: 1fr 2fr; gap: 60px; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.footer-logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; margin-bottom: 12px; color: var(--text-primary); }
.footer-logo .logo-icon { font-size: 24px; }
.footer-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; max-width: 320px; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-col-title { font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col a { display: block; font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { text-align: center; padding-top: 28px; margin-top: 28px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }

/* ===== Telegram Safari Overlay ===== */
#tg-safari-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; padding: 24px; }
.tg-safari-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; max-width: 380px; text-align: center; box-shadow: var(--shadow-hover); }
.tg-safari-title { font-size: 17px; font-weight: 700; margin-bottom: 10px; color: var(--text-primary); }
.tg-safari-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 18px; line-height: 1.5; }
.tg-safari-btn { background: var(--accent); color: #fff; padding: 10px 20px; border-radius: var(--radius-sm); font-weight: 700; font-size: 14px; }

/* ===== Spin Animation ===== */
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .hero-title { font-size: 40px; }
  .hero-subtitle { margin: 0 auto 28px; }
  .hero-actions { justify-content: center; }
  .hero-visual { order: -1; }
  .coin-3d { width: 180px; height: 180px; }
  .coin-body { font-size: 60px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .benefits-grid { grid-template-columns: 1fr; }
  .market-card { grid-template-columns: 50px 1fr; }
  .market-odds { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  .header-nav { display: none; }
  .hero { padding: 100px 0 50px; }
  .hero-title { font-size: 32px; letter-spacing: -1px; }
  .hero-subtitle { font-size: 16px; }
  .section-title { font-size: 28px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .market-card { grid-template-columns: 1fr; }
  .market-thumb { display: none; }
  .claim-card { padding: 24px; margin: 0 16px; }
  .wallet-options { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .history-table th, .history-table td { padding: 10px 8px; font-size: 12px; }
  .category-tabs { padding: 0 16px 12px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 26px; }
  .btn-xl { padding: 12px 20px; font-size: 14px; }
  .btn-lg { padding: 10px 16px; font-size: 13px; }
  .countdown-wrap { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .countdown-item { padding: 10px; }
  .countdown-value { font-size: 20px; }
  .footer-links { grid-template-columns: 1fr; }
}
