/*
 * pages.css
 * This file contains page-specific styling for STUMPED, including
 * landing, dashboard, and gameplay mode layouts.
 */

/* ════════════════════════════════════════════════════════════
   LANDING / HOME
   ════════════════════════════════════════════════════════════ */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 200;
}

.hero-gradient-bg {
  background-image: radial-gradient(ellipse at 50% 0%, rgba(249,115,22,0.08) 0%, transparent 60%);
  flex: 1;
  padding-top: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 6px 14px;
  margin-top: 80px;
  margin-bottom: 32px;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  background: var(--danger);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--danger);
  animation: pulse 2s infinite;
}

.hero-badge-text {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.hero-headline {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -3px;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 4px;
}

.hero-sub {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-muted);
  text-align: center;
  max-width: 540px;
  margin-top: 16px;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  margin-bottom: 80px;
}

/* Mode cards on landing */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 960px;
  width: 100%;
  padding: 0 24px 80px;
}

.mode-card-landing {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-slow);
  border: 1px solid var(--border);
}
.mode-card-landing::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  opacity: 0.08;
  filter: blur(30px);
}
.mode-card-landing:nth-child(1)::before { background: var(--fantasy-primary); }
.mode-card-landing:nth-child(2)::before { background: var(--auction-primary); }
.mode-card-landing:nth-child(3)::before { background: var(--trading-primary); }

.mode-card-landing:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.mode-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 24px;
}

.mode-card-title { font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 10px; }
.mode-card-desc  { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.mode-card-tag   {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ── AUTH CARD ── */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  padding: 24px;
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.auth-card::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 200px;
  height: 200px;
  background: var(--accent-glow);
  border-radius: 50%;
  filter: blur(50px);
  pointer-events: none;
}

.auth-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent), #c2410c);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 10px 20px -5px var(--accent-glow);
}

.auth-social-btn {
  flex: 1;
  padding: 12px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}
.auth-social-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }

/* ════════════════════════════════════════════════════════════
   DASHBOARD (MODE SELECTOR HUB)
   ════════════════════════════════════════════════════════════ */
.dashboard-page { padding: 40px 32px; position: relative; z-index: 10; }
.dashboard-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(249,115,22,0.03) 0%, transparent 50%),
              radial-gradient(circle at 100% 100%, rgba(127,119,221,0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.greeting-block { margin-bottom: 48px; position: relative; }
.greeting-title { font-size: 40px; font-weight: 800; color: var(--text-primary); letter-spacing: -1.5px; margin-bottom: 8px; }
.greeting-sub   { font-size: 16px; color: var(--text-muted); opacity: 0.8; }

.mode-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.mode-hub-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  border-top: 4px solid var(--border);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.mode-hub-card:hover { 
  transform: translateY(-8px) scale(1.01); 
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  border-color: var(--border-strong);
}
.mode-hub-card.fantasy { border-top-color: var(--fantasy-primary); }
.mode-hub-card.fantasy:hover { box-shadow: 0 20px 40px rgba(127,119,221,0.15); }
.mode-hub-card.auction { border-top-color: var(--auction-primary); }
.mode-hub-card.auction:hover { box-shadow: 0 20px 40px rgba(250,199,117,0.15); }
.mode-hub-card.trading { border-top-color: var(--trading-primary); }
.mode-hub-card.trading:hover { box-shadow: 0 20px 40px rgba(29,158,117,0.15); }

.mode-hub-body { padding: 28px; }

.mode-hub-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
  font-size: 22px;
}
.fantasy .mode-hub-icon { background: var(--fantasy-bg); }
.auction .mode-hub-icon { background: var(--auction-bg); }
.trading .mode-hub-icon { background: var(--trading-bg); }

.mode-hub-title { font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 16px; }

.mode-hub-features { list-style: none; margin-bottom: 24px; }
.mode-hub-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 0;
}
.feature-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.fantasy .feature-dot { background: var(--fantasy-primary); }
.auction .feature-dot { background: var(--auction-primary); }
.trading .feature-dot { background: var(--trading-primary); }

.mode-hub-mini-stat {
  background: var(--bg-deep);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

/* ── Activity list ── */
.activity-list { display: flex; flex-direction: column; }
.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.activity-text { font-size: 13px; color: var(--text-secondary); }
.activity-time { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }

/* ════════════════════════════════════════════════════════════
   FANTASY PAGE
   ════════════════════════════════════════════════════════════ */
.fantasy-page .topbar { border-top: 3px solid var(--fantasy-primary); }

/* Dashboard cards in fantasy */
.fantasy-rooms-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Team picker roster panel */
.roster-panel   { padding: 20px; }
.roster-section { margin-bottom: 20px; }
.roster-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.roster-slot {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.roster-slot-empty {
  background: rgba(61,73,67,0.06);
  border: 1px dashed var(--border);
  color: var(--text-faint);
  font-size: 10px;
  text-align: center;
  justify-content: center;
  cursor: default;
}
.roster-slot-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.roster-remove { font-size: 16px; color: var(--text-muted); cursor: pointer; line-height: 1; }
.roster-remove:hover { color: var(--danger); }

.roster-summary {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.roster-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 3px 0;
}
.roster-summary-label { color: var(--text-muted); text-transform: uppercase; font-size: 10px; font-weight: 700; }
.roster-summary-value { font-family: var(--font-mono); font-weight: 700; }

/* Validation warning */
.validation-error {
  background: var(--danger-bg);
  border: 1px solid rgba(255,180,171,0.2);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 12px;
  color: var(--danger);
  margin-top: 14px;
}

/* ════════════════════════════════════════════════════════════
   AUCTION PAGE
   ════════════════════════════════════════════════════════════ */
.auction-page .topbar { border-top: 3px solid var(--auction-primary); }

.auction-banner {
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-surface));
  border: 1px solid rgba(250,199,117,0.2);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.auction-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -5%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(250,199,117,0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* Live auction room UI */
.auction-room-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.current-player-card {
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-surface));
  border: 1px solid rgba(250,199,117,0.2);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  gap: 32px;
  align-items: center;
  margin-bottom: 24px;
}

.current-player-img {
  width: 100px;
  height: 130px;
  border-radius: var(--radius-md);
  background: var(--bg-deep);
  border: 2px solid rgba(250,199,117,0.3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  flex-shrink: 0;
}

.bid-panel {
  background: var(--bg-deep);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
}

.bid-input-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.bidders-list { display: flex; flex-direction: column; gap: 10px; }
.bidder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
}
.bidder-name  { font-size: 13px; font-weight: 700; }
.bidder-amount { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--auction-primary); }

/* ════════════════════════════════════════════════════════════
   TRADING PAGE
   ════════════════════════════════════════════════════════════ */
.trading-page .topbar { border-top: 3px solid var(--trading-primary); }

.page-content-trading {
  padding-top: calc(var(--topbar-height) + var(--ticker-height));
}

/* Price update overlay */
.price-overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}

.price-overlay-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 520px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}

.net-impact-display {
  padding: 24px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.net-impact-value {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  color: var(--success);
}
.net-impact-pct {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--success);
}
.net-impact-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--success-bg);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 800;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ════════════════════════════════════════════════════════════
   PROFILE PAGE
   ════════════════════════════════════════════════════════════ */
.profile-page { padding: 40px; max-width: 900px; margin: 0 auto; }

.profile-header-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.profile-avatar-wrap { position: relative; }
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent), #c2410c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: white;
}
.profile-avatar-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: white;
}

/* History table */
.history-table { background: var(--bg-deep); border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); }
.history-th {
  background: var(--bg-surface);
  display: grid;
  grid-template-columns: 1fr 120px 100px 120px 100px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
}
.history-th span { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); }
.history-row {
  display: grid;
  grid-template-columns: 1fr 120px 100px 120px 100px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(61,73,67,0.06);
  align-items: center;
}
.history-row:last-child { border-bottom: none; }

/* ════════════════════════════════════════════════════════════
   LEADERBOARD PAGE
   ════════════════════════════════════════════════════════════ */
.lb-page { padding: 40px 32px; }

/* Podium */
.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  max-width: 900px;
  margin: 0 auto 48px;
}
.podium-item { display: flex; flex-direction: column; align-items: center; }
.podium-avatar-wrap {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 4px solid var(--border-strong);
  margin-bottom: 12px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: var(--text-muted);
  font-size: 20px;
  overflow: hidden;
}
.podium-item:nth-child(1) .podium-avatar-wrap { width: 110px; height: 110px; border-color: #eab308; }
.podium-item:nth-child(2) .podium-avatar-wrap { border-color: #94a3b8; }
.podium-item:nth-child(3) .podium-avatar-wrap { border-color: #b45309; }

.podium-platform {
  border-radius: 8px 8px 0 0;
  width: 120px;
  padding: 14px;
  text-align: center;
}
.podium-item:nth-child(1) .podium-platform { background: linear-gradient(180deg,#eab308,#a16207); height: 180px; width: 140px; padding-top: 24px; }
.podium-item:nth-child(2) .podium-platform { background: linear-gradient(180deg,#94a3b8,#475569); height: 110px; }
.podium-item:nth-child(3) .podium-platform { background: linear-gradient(180deg,#b45309,#78350f); height: 80px; }
.podium-plat-name  { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,0.7); margin-bottom: 4px; }
.podium-plat-pts   { font-family: var(--font-mono); font-size: 24px; font-weight: 700; color: white; }

/* ════════════════════════════════════════════════════════════
   FOOTER / LANDING FOOTER
   ════════════════════════════════════════════════════════════ */
.landing-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  padding: 40px 32px;
  text-align: center;
}
.landing-footer p { font-size: 11px; color: var(--text-faint); margin-top: 8px; }
