@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700;800;900&family=Barlow+Condensed:wght@600;700;800&display=swap');

/* ── TOKENS ── */
:root {
  --bg:       #08090f;
  --surface:  #0e1018;
  --card:     #13151f;
  --card2:    #191c2a;
  --border:   #242838;
  --border2:  #2e3348;
  --text:     #f0f2ff;
  --muted:    #7b829c;
  --dim:      #4a5068;

  --cyan:     #00d4ff;
  --cyan-dim: rgba(0,212,255,.12);
  --red:      #ff2d55;
  --red-dim:  rgba(255,45,85,.12);
  --gold:     #f5c518;
  --gold-dim: rgba(245,197,24,.12);
  --green:    #00e676;
  --green-dim:rgba(0,230,118,.10);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── TOPBAR ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,9,15,.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 24px;
  height: 60px;
}

.brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 1px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 36px;
  white-space: nowrap;
}
.brand-icon {
  width: 28px;
  height: 28px;
  background: var(--cyan);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}
.brand span { color: var(--cyan); }

nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  transition: color .15s, background .15s;
}
nav a:hover { color: var(--text); background: rgba(255,255,255,.06); }
nav a.active { color: var(--cyan); }

.langs {
  display: flex;
  gap: 4px;
  margin-left: 16px;
}
.langs a {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 8px;
  border-radius: var(--r-sm);
  color: var(--muted);
  transition: border-color .15s, color .15s;
}
.langs a:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── LAYOUT ── */
.wrap { max-width: 1200px; margin: 0 auto; padding: 32px 20px 64px; }

/* ── HERO ── */
.hero {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 64px 56px;
  margin-bottom: 28px;
  isolation: isolate;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(0,212,255,.07) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 80%, rgba(255,45,85,.05) 0%, transparent 70%);
  z-index: 0;
}
.hero::after {
  content: 'LIVE';
  position: absolute;
  top: 24px;
  right: 28px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 4px;
  animation: pulse-live 1.5s ease-in-out infinite;
}
@keyframes pulse-live {
  0%,100% { opacity: 1; }
  50% { opacity: .55; }
}
.hero > * { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--cyan-dim);
  border: 1px solid rgba(0,212,255,.25);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 80px;
  line-height: .95;
  letter-spacing: 1px;
  color: #fff;
  margin-bottom: 16px;
}
.hero h1 em {
  font-style: normal;
  color: var(--cyan);
  -webkit-text-stroke: 0;
}
.hero p {
  font-size: 18px;
  color: var(--muted);
  max-width: 500px;
  margin-bottom: 32px;
  line-height: 1.5;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ── BUTTONS ── */
.btn, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: var(--r-sm);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform .12s, opacity .12s, box-shadow .15s;
  padding: 12px 22px;
  letter-spacing: .2px;
  white-space: nowrap;
}
.btn:hover, button:hover { transform: translateY(-1px); opacity: .92; }
.btn:active, button:active { transform: translateY(0); }

/* Primary — cyan glow */
.btn, button:not(.btn):not(.danger):not(.small) {
  background: var(--cyan);
  color: #000;
  box-shadow: 0 0 20px rgba(0,212,255,.3);
}
.btn:hover { box-shadow: 0 0 32px rgba(0,212,255,.5); }

/* Secondary */
.btn.secondary {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text);
  box-shadow: none;
}
.btn.secondary:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: none; }

/* Small */
.btn.small, button.small {
  padding: 7px 14px;
  font-size: 12px;
  border-radius: 8px;
}
.btn.small {
  background: var(--cyan);
  color: #000;
  box-shadow: 0 0 12px rgba(0,212,255,.25);
}

/* Danger */
.danger { background: var(--red) !important; color: #fff !important; box-shadow: 0 0 16px rgba(255,45,85,.3) !important; }

/* ── STAT ROW ── */
.statrow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s;
}
.stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  opacity: .5;
}
.stat:hover { border-color: var(--border2); }
.stat b {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 38px;
  line-height: 1;
  color: #fff;
  letter-spacing: .5px;
  margin-bottom: 4px;
}
.stat span {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
}

/* ── GRID ── */
.grid  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid2 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }

/* ── CARDS ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: border-color .2s;
}
.card:hover { border-color: var(--border2); }
.card h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card h2::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 18px;
  background: var(--cyan);
  border-radius: 2px;
}
.card h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }

/* ── MATCH CARD ── */
.match {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  margin-bottom: 8px;
  transition: border-color .2s, background .2s;
}
.match:last-child { margin-bottom: 0; }
.match:hover {
  border-color: rgba(0,212,255,.3);
  background: rgba(0,212,255,.03);
}

/* Scoreboard-style match card */
.match-scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  margin-bottom: 8px;
  transition: border-color .2s, background .2s;
  position: relative;
  overflow: hidden;
}
.match-scoreboard::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,45,85,.03) 0%, transparent 30%, transparent 70%, rgba(0,212,255,.03) 100%);
  pointer-events: none;
}
.match-scoreboard:hover { border-color: rgba(0,212,255,.3); }

.match-team {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.match-team.home { align-items: flex-start; }
.match-team.away { align-items: flex-end; text-align: right; }
.match-team-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--text);
  text-transform: uppercase;
}
.match-meta {
  font-size: 11px;
  color: var(--dim);
  font-weight: 500;
}

.match-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 20px;
}
.match-time-badge {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--muted);
}
.match-vs {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  color: var(--dim);
  line-height: 1;
}
.match-sport-icon { font-size: 16px; line-height: 1; }

/* old .match compatibility */
.teams { font-weight: 700; font-size: 14px; color: var(--text); }
.muted { color: var(--muted); font-size: 12px; }

/* ── LEADERBOARD ROW ── */
.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.lb-row:last-child { border-bottom: none; }
.lb-rank {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  color: var(--dim);
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.lb-rank.gold   { color: var(--gold); text-shadow: 0 0 12px rgba(245,197,24,.4); }
.lb-rank.silver { color: #c0c0c0; }
.lb-rank.bronze { color: #cd7f32; }

/* ── BADGE ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  background: var(--card2);
  border: 1px solid var(--border2);
  color: var(--muted);
}
.badge-cyan   { background: var(--cyan-dim); border-color: rgba(0,212,255,.3); color: var(--cyan); }
.badge-red    { background: var(--red-dim);  border-color: rgba(255,45,85,.3);  color: var(--red); }
.badge-gold   { background: var(--gold-dim); border-color: rgba(245,197,24,.3); color: var(--gold); }
.badge-green  { background: var(--green-dim);border-color: rgba(0,230,118,.3);  color: var(--green); }

/* ── TABLE ── */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--dim);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255,255,255,.02); }

/* ── FORMS ── */
.form { max-width: 560px; margin: 0 auto; }
label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  margin-bottom: 6px;
  margin-top: 18px;
}
label:first-of-type { margin-top: 0; }
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  margin-bottom: 4px;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,212,255,.1);
}
textarea { min-height: 90px; resize: vertical; }
select option { background: var(--card); }
input[type="checkbox"] {
  width: auto;
  accent-color: var(--cyan);
  margin-right: 6px;
}

/* ── FLASH ── */
.flash {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 14px;
}
.flash.ok  { background: rgba(0,230,118,.08); border: 1px solid rgba(0,230,118,.25); color: var(--green); }
.flash.err { background: rgba(255,45,85,.08);  border: 1px solid rgba(255,45,85,.25);  color: var(--red); }

/* ── PROFILE ── */
.profile-head { display: flex; gap: 20px; align-items: center; }
.avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  border: 2px solid var(--border2);
}

/* ── FOOTER ── */
.footer {
  text-align: center;
  color: var(--dim);
  padding: 28px 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  margin-top: 32px;
}
.footer b { color: var(--muted); }

/* ── ADMIN NAV ── */
.adminnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.adminnav a {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: border-color .15s, color .15s;
}
.adminnav a:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── NEON GLOW UTILITIES ── */
.glow-cyan { box-shadow: 0 0 24px rgba(0,212,255,.25); }
.glow-red  { box-shadow: 0 0 24px rgba(255,45,85,.25); }
.glow-gold { box-shadow: 0 0 24px rgba(245,197,24,.25); }
.text-cyan  { color: var(--cyan); }
.text-red   { color: var(--red); }
.text-gold  { color: var(--gold); }
.text-green { color: var(--green); }
.text-muted { color: var(--muted); }

/* ── SECTION DIVIDER ── */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
}

/* ── PREDICT PAGE ── */
.predict-card {
  max-width: 640px;
  margin: 0 auto;
}
.score-input-group {
  display: grid;
  grid-template-columns: 1fr 48px 1fr;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}
.score-sep {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  color: var(--dim);
  text-align: center;
}
.score-team-label {
  text-align: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 8px;
}
.score-input-group input[type="number"] {
  text-align: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  padding: 16px;
  border-radius: var(--r-md);
}

/* ── SEASON PRIZE CARD ── */
.prize-card {
  background: linear-gradient(135deg, rgba(245,197,24,.05), rgba(245,197,24,.02));
  border: 1px solid rgba(245,197,24,.2);
  border-radius: var(--r-lg);
  padding: 24px;
}
.prize-card h2::before { background: var(--gold); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .topbar { height: auto; padding: 14px 20px; flex-wrap: wrap; gap: 12px; }
  .brand { margin-right: 0; }
  nav { gap: 2px; }
  nav a { padding: 6px 8px; font-size: 12px; }
  .hero { padding: 36px 28px; }
  .hero h1 { font-size: 52px; }
  .hero p { font-size: 16px; }
  .statrow { grid-template-columns: repeat(2, 1fr); }
  .grid, .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .wrap { padding: 20px 14px 48px; }
  .hero { padding: 28px 20px; }
  .hero h1 { font-size: 40px; }
  .hero::after { display: none; }
  .statrow { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat b { font-size: 30px; }
  nav a span { display: none; }
  .match-scoreboard { grid-template-columns: 1fr auto 1fr; }
  .match-team-name { font-size: 14px; }
  .match-center { padding: 0 10px; }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* =========================
   PROFILE COVER + UPLOAD
   ========================= */
.profile-cover {
    height: 260px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--border);
    background:
        linear-gradient(rgba(0,0,0,.25), rgba(0,0,0,.55)),
        linear-gradient(135deg,#0d1a2d,#14274a,#0a0f18);
    background-size: cover;
    background-position: center;
    margin-bottom: -60px;
    box-shadow: 0 15px 40px rgba(0,0,0,.35);
}
.profile-main {
    position: relative;
    z-index: 2;
    padding-top: 70px;
}
.profile-head {
    position: relative;
}
.profile-head .avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #13151f;
    box-shadow: 0 0 25px rgba(0,212,255,.25);
}
.file-upload-box {
    background: #0e1018;
    border: 1px dashed #2e3348;
    border-radius: 16px;
    padding: 18px;
    text-align: center;
    transition: .2s;
}
.file-upload-box:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 18px rgba(0,212,255,.15);
}
.file-upload-box input[type=file] {
    display: none;
}
.file-upload-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg,#00d4ff,#00a8ff);
    color: #000;
    font-weight: 800;
    border-radius: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: .2s;
    box-shadow: 0 0 18px rgba(0,212,255,.25);
}
.file-upload-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0,212,255,.45);
}
.prediction-card {
    background: linear-gradient(135deg, rgba(0,212,255,.04), rgba(255,255,255,.01));
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 14px;
}
.prediction-card:hover {
    border-color: rgba(0,212,255,.35);
}
.prediction-league {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 5px;
}
.prediction-teams {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 12px;
}
.level-progress {
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #0a0c12;
}
.level-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #00e676);
    box-shadow: 0 0 20px rgba(0,212,255,.45);
}