/* ============================================================
   ClubSI World Cup Foari
   Design System & Stylesheet
   ============================================================ */

/* ── Google Font ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Custom Properties ───────────────────────────────────────── */
:root {
  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bg-primary: #040914;
  --bg-secondary: #081020;
  --bg-card: rgba(8, 16, 32, 0.55);
  --bg-card-hover: rgba(8, 16, 32, 0.75);
  --accent-gold: #ff782d; /* Re-branded to match logo's bright orange text */
  --accent-gold-dark: #e65c10;
  --accent-gold-glow: rgba(255, 120, 45, 0.25);
  --accent-blue: #0f5ad2; /* Vibrant Royal Blue from logo paint stroke */
  --accent-blue-dark: #0f4bc3;
  --accent-blue-glow: rgba(15, 90, 210, 0.3);
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --text-primary: #f0f9ff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(15, 90, 210, 0.15);
  --border-hover: rgba(15, 90, 210, 0.3);
  --glass: rgba(15, 90, 210, 0.04);
  --glass-heavy: rgba(15, 90, 210, 0.08);
  --radius-sm: 8px 2px;
  --radius-md: 16px 3px;
  --radius-lg: 24px 4px;
  --radius-xl: 32px 6px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 0 25px rgba(255, 120, 45, 0.25);
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --nav-height: 64px;
  --max-width: 1280px;
}

/* ── Reset & Base ────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Animated Gradient Background Blobs ─────────────────────── */
body::before {
  content: '';
  position: fixed;
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vh;
  background: radial-gradient(circle, rgba(15, 90, 210, 0.14) 0%, transparent 70%);
  filter: blur(80px);
  z-index: -2;
  pointer-events: none;
  animation: floatBlob1 25s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  bottom: -10%;
  right: -10%;
  width: 60vw;
  height: 60vh;
  background: radial-gradient(circle, rgba(255, 120, 45, 0.04) 0%, transparent 70%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
  animation: floatBlob2 30s ease-in-out infinite alternate;
}

@keyframes floatBlob1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(80px, 60px) scale(1.2); }
  100% { transform: translate(-40px, 100px) scale(0.9); }
}

@keyframes floatBlob2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-100px, -80px) scale(0.85); }
  100% { transform: translate(60px, -40px) scale(1.1); }
}

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ── Utility ─────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ── Navigation ──────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(6, 11, 24, 0.8);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-base);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 0 6px rgba(15, 90, 210, 0.5));
  transition: transform var(--transition-base);
}

.nav-logo:hover .nav-logo-img {
  transform: scale(1.08);
}

.nav-logo .logo-accent {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Tab Navigation ──────────────────────────────────────────── */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-tab {
  position: relative;
  padding: 8px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--transition-base), background var(--transition-base);
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: var(--glass);
}

.nav-tab.active {
  color: var(--accent-gold);
}

.nav-tab::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-dark));
  border-radius: 1px;
  transform: translateX(-50%);
  transition: width var(--transition-base);
}

.nav-tab.active::after {
  width: 60%;
}

/* ── Auth Area ───────────────────────────────────────────────── */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--accent-gold-dark);
  object-fit: cover;
  transition: border-color var(--transition-base);
}

.user-avatar:hover {
  border-color: var(--accent-gold-dark);
}

.user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.btn-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-gold-dark), #0284c7);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login svg,
.btn-login img {
  width: 16px;
  height: 16px;
}

.btn-logout {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-logout:hover {
  color: var(--accent-red);
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
}

/* ── Hero Section ────────────────────────────────────────────── */
.hero {
  padding: 60px 0 40px;
  text-align: center;
}

.hero-title-container {
  margin: 0 auto 16px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-banner-img {
  width: 100%;
  max-width: 500px;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(15, 90, 210, 0.25));
  transition: transform var(--transition-spring), filter var(--transition-base);
  animation: heroFloat 4s ease-in-out infinite;
}

.hero-banner-img:hover {
  transform: scale(1.04) rotate(1.5deg);
  filter: drop-shadow(0 0 30px rgba(255, 120, 45, 0.35));
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 40px;
  letter-spacing: 0.04em;
}

.hero-subtitle span {
  color: var(--accent-gold);
  font-weight: 600;
}

/* ── Stats Row ───────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 640px;
  margin: 0 auto;
}

.stat-card {
  position: relative;
  padding: 20px 16px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  overflow: hidden;
  transition: border-color var(--transition-base), transform var(--transition-base);
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), transparent 50%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-gold);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* ── Pending Banner ──────────────────────────────────────────── */
.pending-banner {
  margin: 0 auto 24px;
  max-width: var(--max-width);
  padding: 14px 24px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: var(--radius-md);
  color: var(--accent-gold);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pending-banner .banner-icon {
  font-size: 1.1rem;
}

/* ── Tab Content ─────────────────────────────────────────────── */
.tab-content {
  min-height: 400px;
  padding-bottom: 60px;
}

.tab-pane {
  display: none;
  animation: fadeSlideIn 0.4s ease forwards;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title .title-icon {
  font-size: 1.1rem;
}

/* ── Match Cards Grid ────────────────────────────────────────── */
.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* ── Match Card ──────────────────────────────────────────────── */
.match-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-slow);
  overflow: hidden;
}

.match-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(14, 165, 233, 0.3), transparent 40%, transparent 60%, rgba(125, 211, 252, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.match-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.match-card:hover::before {
  opacity: 1;
}

.match-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.match-round {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.match-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.match-venue {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Status Badges ───────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 20px;
}

.status-badge.scheduled {
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-badge.live {
  color: var(--accent-red);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.status-badge.completed {
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.pending {
  color: var(--accent-gold);
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.status-badge.approved {
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.rejected {
  color: var(--accent-red);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* ── LIVE Pulse ──────────────────────────────────────────────── */
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-red);
  animation: livePulse 1.4s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* ── Teams Display ───────────────────────────────────────────── */
.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.team-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--glass);
  padding: 4px;
  border: 1px solid var(--border);
}

.team-logo-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--glass-heavy);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.team-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.team-name.full {
  display: inline;
}

.team-name.abbr {
  display: none;
}

.match-vs {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.match-score {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.05em;
  text-align: center;
  margin-bottom: 8px;
}

/* ── Prediction Form ─────────────────────────────────────────── */
.prediction-form {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  width: 100%;
}

.prediction-row-container {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.scores-row {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
}

.prediction-form label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.score-input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.score-input {
  width: 56px;
  height: 44px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-primary);
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  -moz-appearance: textfield;
}

.score-input::-webkit-inner-spin-button,
.score-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.score-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-glow);
}

.prediction-dash {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
  margin-bottom: 15px; /* aligns centered with the inputs */
}

.btn-predict {
  margin-top: 0;
  flex-grow: 1;
  height: 44px; /* matches input height */
  padding: 0 20px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-primary);
  color: #fff;
  background: linear-gradient(135deg, var(--accent-gold-dark), #0284c7);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-base), opacity var(--transition-base);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-predict:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

.btn-predict:active {
  transform: translateY(0);
}

.btn-predict:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.prediction-result {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--accent-green);
  text-align: center;
}

.prediction-result.has-points {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prediction-points {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent-gold);
}

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.9rem;
  max-width: 400px;
  margin: 0 auto;
}

/* ── Leaderboard ─────────────────────────────────────────────── */
.leaderboard-wrapper {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table thead th {
  padding: 14px 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: left;
  background: var(--glass);
  border-bottom: 1px solid var(--border);
}

.leaderboard-table thead th:last-child {
  text-align: right;
}

.leaderboard-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-fast);
}

.leaderboard-table tbody tr:last-child {
  border-bottom: none;
}

.leaderboard-table tbody tr:hover {
  background: var(--glass);
}

.leaderboard-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

.leaderboard-table tbody tr:nth-child(even):hover {
  background: var(--glass);
}

.leaderboard-table td {
  padding: 14px 20px;
  font-size: 0.9rem;
  vertical-align: middle;
}

.leaderboard-table td:last-child {
  text-align: right;
}

/* Rank styling */
.rank-cell {
  font-weight: 700;
  font-size: 1rem;
  width: 60px;
}

.rank-medal {
  font-size: 1.25rem;
}

.rank-1 { color: #7dd3fc; }
.rank-2 { color: #d1d5db; }
.rank-3 { color: #38bdf8; }

/* User cell in leaderboard */
.lb-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.lb-name {
  font-weight: 600;
  color: var(--text-primary);
}

.lb-predictions {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.lb-points {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent-gold);
}

/* ── Admin Panel ─────────────────────────────────────────────── */
.admin-section {
  margin-bottom: 32px;
}

.admin-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--glass);
}

.admin-predictions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.close-predictions-btn {
  margin: 0;
  padding: 6px 14px;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.admin-card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  padding: 12px 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: left;
  background: var(--glass);
}

.admin-table td {
  padding: 12px 20px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table tbody tr:hover {
  background: var(--glass);
}

.admin-user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-user-cell img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.admin-actions {
  display: flex;
  gap: 8px;
}

.btn-approve,
.btn-reject {
  padding: 5px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-primary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-approve {
  color: #065f46;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-approve:hover {
  background: rgba(16, 185, 129, 0.25);
}

.btn-reject {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-reject:hover {
  background: rgba(239, 68, 68, 0.2);
}

.btn-score-matches {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-primary);
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--accent-blue), #2563eb);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-base);
}

.btn-score-matches:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
}

.btn-score-matches:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ── Admin System Actions Panel ─────────────────────────────── */
.admin-card--danger {
  border-color: rgba(239, 68, 68, 0.25);
}

.admin-system-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.admin-system-header h3 {
  margin: 0;
}

.admin-system-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0.25rem 0 0 0;
}

.admin-system-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.admin-system-buttons .btn-approve,
.admin-system-buttons .btn-reject {
  width: auto;
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  border-radius: 6px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .admin-system-header {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-system-buttons {
    flex-direction: column;
  }

  .admin-system-buttons .btn-approve,
  .admin-system-buttons .btn-reject {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* ── Toast Notifications ─────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  min-width: 300px;
  max-width: 420px;
  background: var(--bg-secondary);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  pointer-events: auto;
  animation: toastIn 0.35s var(--transition-spring) forwards;
}

.toast.removing {
  animation: toastOut 0.3s ease forwards;
}

.toast-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.toast.success {
  border-left: 3px solid var(--accent-green);
}

.toast.success .toast-icon { color: var(--accent-green); }

.toast.error {
  border-left: 3px solid var(--accent-red);
}

.toast.error .toast-icon { color: var(--accent-red); }

.toast.info {
  border-left: 3px solid var(--accent-blue);
}

.toast.info .toast-icon { color: var(--accent-blue); }

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(100%) scale(0.95);
  }
}

/* ── Loading Skeleton ────────────────────────────────────────── */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--glass-heavy) !important;
  border-radius: var(--radius-sm);
  color: transparent !important;
  border: none !important;
}

.skeleton * {
  visibility: hidden;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 40%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 60%,
    transparent 100%
  );
  animation: shimmer 1.8s ease-in-out infinite;
}

@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.skeleton-card {
  height: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.skeleton-row {
  height: 56px;
  margin-bottom: 8px;
  background: var(--glass-heavy);
  border-radius: var(--radius-sm);
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.footer .footer-accent {
  color: var(--accent-gold);
}

/* ── Focus States (Accessibility) ────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

/* ── Results Tab Styles ──────────────────────────────────────── */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

/* ── Responsive Breakpoints ──────────────────────────────────── */

/* Tablet */
@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
  }

  .navbar .container {
    flex-wrap: wrap;
    gap: 8px;
  }

  .nav-tabs {
    order: 3;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: flex-start;
    padding-bottom: 8px;
    gap: 0;
  }

  .nav-tabs::-webkit-scrollbar {
    display: none;
  }

  .nav-tab {
    padding: 6px 12px;
    font-size: 0.8rem;
    flex-shrink: 0;
  }

  .navbar {
    height: auto;
    padding: 10px 0 0;
  }

  .hero {
    padding: 40px 0 24px;
  }

  .stats-row {
    gap: 10px;
  }

  .stat-card {
    padding: 14px 10px;
  }

  .stat-value {
    font-size: 1.4rem;
  }

  .match-grid,
  .results-grid {
    grid-template-columns: 1fr;
  }

  /* Leaderboard: Make it scroll-friendly */
  .leaderboard-wrapper {
    margin: 0 -16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .leaderboard-table thead th {
    padding: 10px 12px;
    font-size: 0.65rem;
    white-space: nowrap;
  }

  .leaderboard-table td {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  /* Adjust predictions column slightly */
  .leaderboard-table th:nth-child(3),
  .leaderboard-table td:nth-child(3) {
    font-size: 0.75rem;
  }

  .lb-avatar {
    width: 28px;
    height: 28px;
  }

  .lb-name {
    font-size: 0.85rem;
  }

  .rank-cell {
    width: 40px;
    font-size: 0.9rem;
  }

  /* Admin panel */
  .admin-card {
    margin: 0 -16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .admin-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }

  .admin-card-header h3 {
    font-size: 0.9rem;
  }

  /* Redesign Admin Table to be stacked cards on mobile to prevent scrolling */
  .admin-table-wrapper {
    overflow-x: hidden;
  }

  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td {
    display: block;
    width: 100%;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table tr {
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 8px 12px;
  }

  body.light-theme .admin-table tr {
    background: rgba(0, 0, 0, 0.03);
  }

  .admin-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
    gap: 12px;
  }

  .admin-td-val {
    text-align: right;
    word-break: break-all;
    overflow-wrap: break-word;
    max-width: 65%;
    min-width: 0;
  }

  .admin-table td:last-child {
    border-bottom: none;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .admin-table td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
  }
  .admin-table td:last-child::before {
    width: auto;
    text-align: left;
  }

  .admin-user-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    max-width: 65%;
    min-width: 0;
  }

  .admin-user-cell span {
    text-align: right;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .admin-user-cell img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
  }

  .admin-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    max-width: 65%;
  }

  .btn-approve,
  .btn-reject {
    padding: 4px 10px;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  /* Results badge wrapper */
  .results-badge-wrapper {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .admin-predictions-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .close-predictions-btn {
    width: 100%;
    text-align: center;
  }

  .toast {
    min-width: auto;
    max-width: calc(100vw - 48px);
    right: 0;
  }

  .toast-container {
    right: 12px;
    left: 12px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .leaderboard-wrapper,
  .admin-card {
    margin: 0 -12px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .gatekeeper-card {
    padding: 24px 16px;
  }

  .nav-logo .logo-text {
    display: none;
  }

  .nav-logo .logo-accent {
    display: inline;
  }

  .nav-tab {
    padding: 5px 10px;
    font-size: 0.75rem;
  }

  .hero {
    padding: 28px 0 18px;
  }

  .hero-banner-img {
    max-width: 380px;
    width: 85%;
  }

  .hero-subtitle {
    font-size: 0.85rem;
    margin-bottom: 24px;
  }

  .stats-row {
    gap: 8px;
  }

  .stat-value {
    font-size: 1.15rem;
  }

  .stat-label {
    font-size: 0.6rem;
  }

  .stat-card {
    padding: 12px 8px;
  }

  .section-title {
    font-size: 1.05rem;
    margin-bottom: 14px;
  }

  .match-card {
    padding: 16px;
  }

  .match-header {
    margin-bottom: 10px;
  }

  .team-logo,
  .team-logo-placeholder {
    width: 36px;
    height: 36px;
  }

  .team-name {
    font-size: 0.75rem;
  }

  .match-teams {
    gap: 8px;
    margin-bottom: 14px;
  }

  .score-input {
    width: 46px;
    height: 38px;
    font-size: 1rem;
  }

  .prediction-dash {
    font-size: 1.1rem;
    margin-top: 16px;
  }

  .prediction-form {
    gap: 8px;
  }

  .btn-predict {
    font-size: 0.8rem;
    padding: 9px 16px;
  }

  .match-score {
    font-size: 1.4rem;
  }

  .user-name {
    display: none;
  }

  .user-avatar {
    width: 28px;
    height: 28px;
  }

  .btn-logout {
    padding: 5px 10px;
    font-size: 0.75rem;
  }

  /* Leaderboard fine-tuning for small phones */
  .leaderboard-table thead th {
    padding: 8px 8px;
    font-size: 0.6rem;
  }

  .leaderboard-table td {
    padding: 8px 8px;
    font-size: 0.75rem;
  }

  .lb-user {
    gap: 8px;
  }

  .lb-avatar {
    width: 24px;
    height: 24px;
  }

  .lb-name {
    font-size: 0.78rem;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rank-cell {
    width: 32px;
  }

  .lb-points {
    font-size: 0.9rem;
  }


  .admin-card-header {
    padding: 12px;
  }

  .admin-card-header h3 {
    font-size: 0.85rem;
  }

  /* Results card */
  .results-card {
    padding: 16px;
  }

  .results-pred-label {
    font-size: 0.75rem;
  }

  .pts-badge {
    font-size: 0.65rem;
    padding: 3px 8px;
  }

  /* Pending banner */
  .pending-banner {
    font-size: 0.8rem;
    padding: 10px 14px;
    flex-direction: column;
    text-align: center;
    gap: 4px;
  }

  /* Tab content */
  .tab-content {
    min-height: 300px;
    padding-bottom: 40px;
  }

  /* Footer */
  .footer {
    padding: 20px 0;
    margin-top: 24px;
  }

  .footer p {
    font-size: 0.7rem;
  }

  /* Empty states */
  .empty-state {
    padding: 40px 16px;
  }

  .empty-state .empty-icon {
    font-size: 2.5rem;
  }

  .empty-state h3 {
    font-size: 1rem;
  }

  .empty-state p {
    font-size: 0.8rem;
  }

  /* Modal on mobile */
  .modal-card {
    width: 95%;
    max-height: 85vh;
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-header h3 {
    font-size: 1.05rem;
  }

  #match-form {
    padding: 1rem;
    gap: 1rem;
  }
}

/* Extra small phones (iPhone SE, Galaxy S5) */
@media (max-width: 360px) {
  .container {
    padding: 0 10px;
  }

  .leaderboard-wrapper,
  .admin-card {
    margin: 0 -10px;
  }

  .hero-banner-img {
    max-width: 290px;
    width: 85%;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
  }

  .stat-value {
    font-size: 1rem;
  }

  .stat-label {
    font-size: 0.55rem;
  }

  .stat-card {
    padding: 10px 6px;
  }

  .nav-tab {
    padding: 4px 8px;
    font-size: 0.7rem;
  }

  .team-logo,
  .team-logo-placeholder {
    width: 32px;
    height: 32px;
  }

  .team-name {
    font-size: 0.7rem;
  }

  .score-input {
    width: 42px;
    height: 36px;
    font-size: 0.9rem;
  }

  .lb-name {
    max-width: 70px;
  }
}

/* Large Desktop */
@media (min-width: 1440px) {
  .match-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Modal backdrop and card */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  z-index: 1100;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 90%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: var(--accent-gold);
}

/* Modal form and layout */
#match-form {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row.hidden {
  display: none !important;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn-submit {
  background: linear-gradient(135deg, var(--accent-gold-dark), #0284c7);
  border: none;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* Adjust table responsive layout inside modal */
@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
    gap: 1.25rem;
  }
}

/* ── Results & History tab styles ── */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.results-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-slow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.results-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.results-badge-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.results-pred-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.results-pred-val {
  font-weight: 600;
  color: var(--text-primary);
  margin-left: 6px;
}

.pts-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.725rem;
  font-weight: 700;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pts-badge.exact {
  color: #000;
  background: var(--accent-gold);
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.4);
}

.pts-badge.outcome {
  color: var(--text-primary);
  background: rgba(59, 130, 246, 0.25);
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.pts-badge.none {
  color: var(--text-muted);
  background: var(--glass);
  border: 1px solid var(--border);
}

/* ── Smooth Theme Transitions ── */
body {
  transition: background-color 0.4s ease, color 0.4s ease;
}

.navbar, .hero, .stat-card, .match-card, .results-card, .leaderboard-wrapper, .admin-card, .btn-logout, .nav-tab, .empty-state {
  transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

/* ── Theme Toggle Button Styles ── */
.btn-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-theme-toggle:hover {
  background: var(--glass-heavy);
  color: var(--accent-gold);
  border-color: var(--border-hover);
  transform: scale(1.05);
}

.btn-theme-toggle:active {
  transform: scale(0.95);
}

.btn-theme-toggle svg {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-theme-toggle:hover svg {
  transform: rotate(25deg);
}

/* ── Light Theme Variables ── */
body.light-theme {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.82);
  --bg-card-hover: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: rgba(37, 99, 235, 0.08);
  --border-hover: rgba(37, 99, 235, 0.18);
  --glass: rgba(37, 99, 235, 0.03);
  --glass-heavy: rgba(37, 99, 235, 0.06);
  --accent-gold: #2563eb;
  --accent-gold-dark: #1d4ed8;
  --accent-gold-glow: rgba(37, 99, 235, 0.15);
  --accent-blue-glow: rgba(37, 99, 235, 0.12);
  --shadow-sm: 0 2px 8px rgba(37, 99, 235, 0.03);
  --shadow-md: 0 8px 30px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.06);
  --shadow-gold: 0 0 20px rgba(37, 99, 235, 0.18);
}

body.light-theme::before {
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
}

body.light-theme::after {
  background: radial-gradient(circle, rgba(14, 165, 233, 0.06) 0%, transparent 70%);
}

/* Specific Light Mode Adjustments */
body.light-theme .navbar {
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(37, 99, 235, 0.08);
}

body.light-theme .nav-logo-img {
  width: 34px;
  height: 34px;
  border: 1.5px solid rgba(37, 99, 235, 0.15);
  background: #000000;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.15);
}

body.light-theme .logo-accent {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.light-theme .nav-tab.active {
  color: var(--accent-blue);
}

body.light-theme .nav-tab.active::after {
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-blue-dark));
}

body.light-theme .user-avatar {
  border-color: var(--accent-blue);
}

body.light-theme .btn-login {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-dark));
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

body.light-theme .btn-login:hover {
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.2);
}

body.light-theme .btn-logout {
  background: var(--bg-secondary);
  border-color: rgba(37, 99, 235, 0.15);
}

body.light-theme .btn-logout:hover {
  color: var(--accent-red);
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
}

body.light-theme .hero-banner-img {
  filter: drop-shadow(0 8px 30px rgba(37, 99, 235, 0.15));
}

body.light-theme .hero-banner-img:hover {
  filter: drop-shadow(0 12px 40px rgba(37, 99, 235, 0.25));
}

body.light-theme .stat-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(37, 99, 235, 0.08);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.03);
}

body.light-theme .stat-card:hover {
  border-color: rgba(37, 99, 235, 0.18);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.06);
}

body.light-theme .match-card {
  background: var(--bg-card);
  border: 1px solid rgba(37, 99, 235, 0.08);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.02);
}

body.light-theme .match-card:hover {
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.06);
}

body.light-theme .match-card::before {
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.15), transparent 45%, transparent 55%, rgba(37, 99, 235, 0.1));
}

body.light-theme .team-logo {
  border-color: rgba(37, 99, 235, 0.1);
  background: #ffffff;
}

body.light-theme .team-logo-placeholder {
  border-color: rgba(37, 99, 235, 0.1);
  background: #f1f5f9;
}

body.light-theme .score-input {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.15);
  color: #0f172a;
}

body.light-theme .score-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

body.light-theme .btn-predict {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-dark));
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

body.light-theme .btn-predict:hover {
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.18);
}

body.light-theme .prediction-result {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.15);
  color: #059669;
}

body.light-theme .prediction-result.has-points {
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.15);
  color: var(--accent-blue-dark);
}

body.light-theme .prediction-points {
  background: var(--accent-blue);
  color: #ffffff;
}

body.light-theme .leaderboard-wrapper {
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.08);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.03);
}

body.light-theme .leaderboard-table th,
body.light-theme .admin-table th {
  background: #f8fafc;
  color: #334155;
  border-bottom: 1px solid rgba(37, 99, 235, 0.08);
}

body.light-theme .leaderboard-table td,
body.light-theme .admin-table td {
  border-bottom: 1px solid rgba(37, 99, 235, 0.05);
}

body.light-theme .leaderboard-table tr:hover,
body.light-theme .admin-table tr:hover {
  background: #f8fafc;
}

body.light-theme .admin-card {
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.08);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.03);
}

body.light-theme .admin-user-cell img {
  border-color: rgba(37, 99, 235, 0.1);
}

body.light-theme .btn-approve {
  background: #2563eb;
  color: #ffffff;
}

body.light-theme .btn-approve:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

body.light-theme .results-card {
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.08);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.03);
}

body.light-theme .pts-badge.exact {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-blue-dark);
  border: 1px solid rgba(37, 99, 235, 0.2);
  box-shadow: none;
}

body.light-theme .pts-badge.outcome {
  background: rgba(14, 165, 233, 0.1);
  color: #0369a1;
  border: 1px solid rgba(14, 165, 233, 0.2);
}

body.light-theme .pts-badge.none {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

body.light-theme .status-badge.scheduled {
  color: var(--accent-blue);
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.12);
}

body.light-theme .status-badge.live {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.12);
}

body.light-theme .status-badge.completed {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.06);
  border-color: rgba(22, 163, 74, 0.12);
}

/* ── Small Mobile Screens (max-width: 480px) ────────────────── */
@media (max-width: 480px) {
  /* Navbar adjustments */
  .logo-text .logo-accent {
    display: none;
  }
  
  .user-name {
    display: none;
  }
  
  .btn-login {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
  
  /* Stats row scaling */
  .stats-row {
    gap: 8px;
  }
  
  .stat-card {
    padding: 10px 6px;
  }
  
  .stat-value {
    font-size: 1.25rem;
  }
  
  .stat-label {
    font-size: 0.6rem;
    letter-spacing: 0.02em;
  }
  
  /* Match Teams Horizontal Display */
  .match-teams {
    flex-direction: row;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
  }
  
  .team {
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    width: auto;
  }
  
  .team-logo,
  .team-logo-placeholder {
    width: 32px;
    height: 32px;
    font-size: 1rem;
    padding: 2px;
  }
  
  .team-name {
    font-size: 0.7rem;
    text-align: center;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: 100%;
    line-height: 1.1;
  }

  .team-name.full {
    display: inline !important;
  }

  .team-name.abbr {
    display: none !important;
  }
  
  .match-vs {
    font-size: 0.7rem;
    margin: 0;
  }
  
  .match-score {
    font-size: 1.4rem;
    margin: 4px 0 0;
  }

  /* Horizontal Prediction Form for Mobile */
  .prediction-row-container {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
  }

  .scores-row {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 6px;
  }

  .score-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }

  .score-input {
    width: 40px;
    height: 36px;
    font-size: 1rem;
    padding: 0;
    border-radius: 4px 1px;
  }

  .prediction-dash {
    font-size: 1rem;
    margin-bottom: 10px;
  }

  .btn-predict {
    height: 36px;
    font-size: 0.75rem;
    padding: 0 10px;
    border-radius: 4px 1px;
    margin-top: 0;
    flex-grow: 1;
  }
}

/* ==========================================================================
   GATEKEEPER OVERLAYS
   ========================================================================== */
.gatekeeper-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-primary);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.gatekeeper-overlay.hidden {
  display: none !important;
}

.gatekeeper-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 40px;
  border-radius: 24px 4px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}

.gatekeeper-logo {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 20px auto;
  display: block;
  border: 2px solid var(--accent-blue);
}

.gatekeeper-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.gatekeeper-card h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
}

.gatekeeper-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 24px;
}

.btn-login-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--accent-blue);
  color: #fff;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 24px 4px;
  font-weight: 600;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-login-large:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-2px);
}

.btn-logout-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent;
  color: var(--accent-red);
  text-decoration: none;
  padding: 12px 24px;
  border: 1px solid var(--accent-red);
  border-radius: 24px 4px;
  font-weight: 600;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-logout-large:hover {
  background: rgba(239, 68, 68, 0.1);
}

