/* ============================================
   POLLA 2026 — Main Stylesheet
   Theme: Bold soccer / stadium energy
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── CSS Variables ── */
:root {
  --bg:       #0d0f14;
  --card:     #161921;
  --border:   #252830;
  --text:     #e8eaf0;
  --muted:    #6b7280;
  --accent:   #f5c842;
  --accent2:  #e8472a;
  --success:  #22c55e;
  --error:    #ef4444;
  --info:     #3b82f6;
  --radius:   10px;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

input[type="number"],
input[type="text"],
input[type="email"],
input[type="password"],
select {
  background: #1e2028;
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  transition: border-color .2s;
  outline: none;
}
input:focus, select:focus { border-color: var(--accent); }
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button { opacity: .5; }

/* ── Topnav ── */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--card);
  border-bottom: 2px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 2px;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: .9rem;
}
.nav-links a { color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-admin { color: var(--accent) !important; font-weight: 600; }
.nav-logout { color: var(--accent2) !important; }

/* ── Buttons ── */
.btn-primary {
  background: var(--accent);
  color: #0d0f14;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  display: inline-block;
  text-align: center;
}
.btn-primary:hover { opacity: .88; transform: translateY(-1px); text-decoration: none; }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 9px 20px;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: .9rem;
  cursor: pointer;
  transition: border-color .2s;
  display: inline-block;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.btn-save {
  background: var(--success);
  color: #000;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: opacity .2s;
}
.btn-save:hover { opacity: .85; }
.btn-save.btn-large { padding: 14px 36px; font-size: 1.1rem; }

/* ── Alerts ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: .9rem;
}
.alert-error   { background: rgba(239,68,68,.15); border: 1px solid var(--error);   color: #fca5a5; }
.alert-success { background: rgba(34,197,94,.15);  border: 1px solid var(--success); color: #86efac; }
.alert-info    { background: rgba(59,130,246,.15); border: 1px solid var(--info);    color: #93c5fd; }

/* ── Utility ── */
.hidden { display: none !important; }
.accent { color: var(--accent); }
.sub    { color: var(--muted); font-size: .9rem; }
.empty  { color: var(--muted); text-align: center; padding: 20px; }

/* ══════════════════════════════════════════
   AUTH PAGE
══════════════════════════════════════════ */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; overflow: hidden; }

.auth-bg {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}
.auth-bg-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(200px, 40vw, 500px);
  color: rgba(245,200,66,.04);
  letter-spacing: -10px;
  user-select: none;
  line-height: 1;
}

.auth-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  padding: 16px;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.trophy { font-size: 2.5rem; }
.auth-logo h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.4rem;
  letter-spacing: 4px;
  line-height: 1;
  margin: 4px 0 2px;
}
.auth-logo .year { color: var(--accent); }
.tagline { color: var(--muted); font-size: .85rem; }

.auth-tabs {
  display: flex;
  gap: 0;
  background: #1e2028;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 24px;
}
.tab-btn {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  transition: all .2s;
}
.tab-btn.active { background: var(--accent); color: #000; font-weight: 600; }

.auth-form .field { margin-bottom: 16px; }
.auth-form label {
  display: block;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.auth-form label small { font-weight: 400; color: var(--muted); }
.auth-form input {
  width: 100%;
  padding: 10px 14px;
}
.auth-form .btn-primary { width: 100%; padding: 12px; margin-top: 8px; }

.rules-box {
  background: #1e2028;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 16px 0;
  font-size: .85rem;
  color: var(--muted);
}
.rules-box strong { color: var(--text); display: block; margin-bottom: 8px; }
.rules-box ul { padding-left: 16px; }
.rules-box li { margin-bottom: 4px; }

/* ══════════════════════════════════════════
   DASHBOARD
══════════════════════════════════════════ */
.dashboard { max-width: 1000px; margin: 0 auto; padding: 28px 16px; }

.welcome-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}
.welcome-bar h2 { font-family: 'Bebas Neue', sans-serif; font-size: 2rem; }

.locked-badge {
  background: rgba(239,68,68,.15);
  border: 1px solid var(--error);
  color: #fca5a5;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 600;
}

.section { margin-bottom: 40px; }
.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

/* Entry cards */
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

.entry-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: border-color .2s;
}
.entry-card:hover { border-color: var(--accent); }
.entry-label { font-weight: 600; font-size: 1rem; margin-bottom: 8px; }
.entry-pts { font-family: 'Bebas Neue', sans-serif; font-size: 2.4rem; color: var(--accent); line-height: 1; }
.entry-pts span { font-family: 'DM Sans', sans-serif; font-size: .8rem; color: var(--muted); }
.btn-entry {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 16px;
  background: var(--accent);
  color: #000;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  transition: opacity .2s;
}
.btn-entry:hover { opacity: .85; text-decoration: none; }
.btn-view { background: var(--border); color: var(--text); }

.entry-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-style: dashed;
  cursor: pointer;
  background: transparent;
  width: 100%;
  height: 100%;
  min-height: 140px;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  gap: 6px;
  transition: all .2s;
}
.entry-add:hover { border-color: var(--accent); color: var(--accent); }
.add-icon { font-size: 2rem; font-weight: 300; line-height: 1; }

/* Mini leaderboard */
.leaderboard-mini {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}
.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.lb-row:last-child { border-bottom: none; }
.lb-me { background: rgba(245,200,66,.06); }
.lb-rank { width: 28px; text-align: center; font-weight: 700; color: var(--accent); }
.lb-name { flex: 1; }
.lb-pts  { font-weight: 700; color: var(--accent); font-size: .95rem; }

/* Rules grid */
.rules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.rule-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.rule-icon { font-size: 1.5rem; }
.rule-body strong { font-size: .9rem; display: block; margin-bottom: 4px; }
.rule-body p { font-size: .82rem; color: var(--muted); line-height: 1.5; }
.rule-body em { color: var(--text); font-style: normal; }

/* ══════════════════════════════════════════
   PICKS PAGE
══════════════════════════════════════════ */
.picks-page { max-width: 900px; margin: 0 auto; padding: 28px 16px; }

.picks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.picks-header h2 { font-family: 'Bebas Neue', sans-serif; font-size: 1.8rem; }

.picks-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 12px;
}
.ptab {
  padding: 8px 20px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  transition: all .2s;
}
.ptab.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 600; }

.tab-intro {
  color: var(--muted);
  font-size: .88rem;
  margin-bottom: 20px;
  background: var(--card);
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

/* Group blocks */
.group-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}
.group-header {
  background: var(--accent);
  color: #000;
  padding: 8px 16px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 1px;
}
.advancement-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(245,200,66,.05);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.adv-label { font-size: .85rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.adv-team  { font-weight: 600; }
.sel-team  { padding: 6px 10px; font-size: .85rem; }

/* Match rows */
.match-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.match-row:last-child { border-bottom: none; }

.match-team {
  flex: 1;
  font-size: .9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.team-a { justify-content: flex-end; text-align: right; }
.team-b { justify-content: flex-start; }
.flag { font-size: 1.1rem; }

.score-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.score-input {
  width: 52px;
  padding: 6px;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
}
.score-display {
  width: 40px;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
}
.vs {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Knockout blocks */
.ko-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}
.ko-header {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1e2028;
  padding: 10px 16px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  flex-wrap: wrap;
}
.ko-pts {
  font-family: 'DM Sans', sans-serif;
  font-size: .78rem;
  background: rgba(245,200,66,.15);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.ko-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0;
}
.ko-slot {
  padding: 14px 16px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ko-slot:nth-child(n) { border-right: 1px solid var(--border); }
.ko-slot-label { font-size: .75rem; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.sel-team-ko { width: 100%; margin-bottom: 10px; font-size: .85rem; padding: 6px 8px; }
.ko-team-display { font-weight: 600; font-size: .95rem; margin-bottom: 10px; }
.ko-scores {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ko-score-field { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ko-score-field label { font-size: .7rem; color: var(--muted); white-space: nowrap; }

.picks-footer {
  padding: 24px 0;
  text-align: center;
}

/* ══════════════════════════════════════════
   LEADERBOARD PAGE
══════════════════════════════════════════ */
.leaderboard-page { max-width: 800px; margin: 0 auto; padding: 28px 16px; }

.lb-header { margin-bottom: 24px; }
.lb-header h2 { font-family: 'Bebas Neue', sans-serif; font-size: 2.2rem; }

.prize-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
@media(max-width:640px){ .prize-banner { grid-template-columns: repeat(2,1fr); } }

.prize-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.prize-item.gold   { border-color: #ffd700; }
.prize-item.silver { border-color: #c0c0c0; }
.prize-item.bronze { border-color: #cd7f32; }
.prize-medal  { font-size: 1.5rem; }
.prize-label  { font-size: .75rem; color: var(--muted); }
.prize-amt    { font-family: 'Bebas Neue', sans-serif; font-size: 1.4rem; color: var(--accent); }

.lb-table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: .8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  background: #1e2028;
  border-bottom: 1px solid var(--border);
}
.lb-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: .95rem; }
.lb-table tr:last-child td { border-bottom: none; }
.lb-table tr.lb-me { background: rgba(245,200,66,.05); }
.lb-rank-cell  { font-weight: 700; font-size: 1.1rem; width: 56px; }
.lb-name-cell  { font-weight: 500; }
.lb-pts-cell   { font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem; color: var(--accent); }
.lb-matches-cell { color: var(--muted); font-size: .85rem; }

.you-badge {
  background: var(--accent);
  color: #000;
  font-size: .65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  margin-left: 8px;
  vertical-align: middle;
}

.my-rank-note {
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 600px) {
  .auth-card { padding: 28px 20px; }
  .match-row { flex-wrap: wrap; }
  .match-team { font-size: .82rem; }
  .score-input { width: 44px; }
  .ko-slots { grid-template-columns: 1fr 1fr; }
  .topnav { padding: 12px 16px; }
  .nav-brand { font-size: 1.2rem; }
}
