@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Mono:wght@400;500&family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&display=swap');

:root {
  --bg: #0f0e17;
  --surface: #1a1929;
  --border: #2e2d45;
  --accent: #ff6b35;
  --accent2: #ffd166;
  --green: #06d6a0;
  --red: #ef476f;
  --text: #fffffe;
  --muted: #8888aa;
  --card: #1e1c30;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  padding-bottom: 80px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* NAV */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(15,14,23,.92);
  backdrop-filter: blur(12px);
  z-index: 100;
}
.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #fff 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-right { display: flex; gap: 12px; align-items: center; }
.nav-link {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 8px;
  transition: color .2s, background .2s;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface); }

/* LAYOUT */
.container { max-width: 560px; margin: 0 auto; padding: 24px 16px; }
.container-wide { max-width: 860px; margin: 0 auto; padding: 24px 16px; }

/* TYPOGRAPHY */
.page-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(36px, 8vw, 56px);
  letter-spacing: 1px;
  line-height: 1;
  margin-bottom: 6px;
}
.page-sub {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
}
.eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

/* CARDS */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
}
.card-body { padding: 20px; }
.card-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

/* BET CARD */
.bet-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  transition: border-color .2s, transform .15s;
  overflow: hidden;
}
.bet-card:hover { border-color: rgba(255,107,53,.4); transform: translateY(-1px); }
.bet-card-header {
  padding: 18px 20px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.bet-card-meta { flex: 1; min-width: 0; }
.bet-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  margin-bottom: 4px;
}
.bet-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.bet-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.stat-chip {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* STATUS BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 100px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: .5px;
  font-weight: 500;
  flex-shrink: 0;
}
.badge-open { background: rgba(255,107,53,.15); color: var(--accent); border: 1px solid rgba(255,107,53,.3); }
.badge-closed { background: rgba(136,136,170,.12); color: var(--muted); border: 1px solid var(--border); }
.badge-resolved { background: rgba(6,214,160,.12); color: var(--green); border: 1px solid rgba(6,214,160,.3); }
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-open .badge-dot { animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform .15s, filter .15s, background .2s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-green { background: var(--green); color: #0f0e17; }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: rgba(239,71,111,.15); color: var(--red); border: 1px solid rgba(239,71,111,.3); }
.btn-full { width: 100%; display: flex; }
.btn-sm { padding: 8px 14px; font-size: 14px; }

/* FORMS */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
input[type="text"],
input[type="password"],
input[type="time"],
textarea,
select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
  -webkit-appearance: none;
  appearance: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 80px; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238888aa' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

.form-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ANSWER OPTIONS */
.answer-options { display: grid; gap: 8px; margin: 12px 0; }
.answer-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.answer-opt:hover { border-color: var(--accent); }
.answer-opt.selected { border-color: var(--accent); background: rgba(255,107,53,.1); }
.answer-opt .opt-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  flex-shrink: 0;
  transition: all .2s;
}
.answer-opt.selected .opt-dot { border-color: var(--accent); background: var(--accent); }
.answer-opt .opt-label { font-size: 14px; flex: 1; }
.answer-opt .opt-odds {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  color: var(--accent2);
  flex-shrink: 0;
}
.answer-opt .opt-odds.hot { color: var(--green); }
.answer-opt .opt-odds.cold { color: var(--muted); }
.answer-opt .opt-count {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  color: var(--muted);
  display: block;
  text-align: right;
}
.opt-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: rgba(255,107,53,.06);
  pointer-events: none;
  transition: width .4s ease;
}

/* BETS HISTORY LIST */
.entry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
}
.entry-row:last-child { border-bottom: none; }
.entry-name { font-size: 14px; font-weight: 500; }
.entry-answer {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
}
.entry-row.winner .entry-name { color: var(--green); }
.entry-row.winner .entry-answer { background: rgba(6,214,160,.12); color: var(--green); border-color: rgba(6,214,160,.3); }
.entry-row.loser .entry-name { color: var(--muted); opacity: .6; }

/* RESULT BOX */
.result-box {
  background: rgba(6,214,160,.08);
  border: 1px solid rgba(6,214,160,.25);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 14px 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.result-box .result-icon { font-size: 22px; }
.result-box .result-text { font-size: 13px; }
.result-box .result-answer { font-family: 'DM Mono', monospace; font-size: 14px; color: var(--green); font-weight: 500; margin-top: 2px; }

/* DIVIDER */
.divider {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 14px;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* EMPTY */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state p { font-family: 'DM Mono', monospace; font-size: 12px; }

/* FLASH MESSAGES */
.flash {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 13px;
  font-family: 'DM Mono', monospace;
}
.flash-success { background: rgba(6,214,160,.12); color: var(--green); border: 1px solid rgba(6,214,160,.25); }
.flash-error { background: rgba(239,71,111,.12); color: var(--red); border: 1px solid rgba(239,71,111,.25); }

/* ADMIN TABLE */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 12px 14px;
  font-size: 13px;
  border-bottom: 1px solid rgba(46,45,69,.5);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,.02); }

/* ODDS DISPLAY */
.odds-pill {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  color: var(--accent2);
}
.odds-label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  color: var(--muted);
  text-align: right;
}

/* SECTION HEADER */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.scoreboard-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: -2px 0 12px;
}

.scoreboard-filter-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  transition: border-color .2s, color .2s, background .2s;
}

.scoreboard-filter-link:hover {
  color: var(--text);
  border-color: rgba(255,107,53,.45);
}

.scoreboard-filter-link.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), #ff8b5e);
  box-shadow: 0 6px 18px rgba(255,107,53,.25);
}

/* GRID */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .grid-2 { grid-template-columns: 1fr; } }

/* TYPE TAG */
.type-tag {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.type-tag.time { color: var(--accent2); border-color: rgba(255,209,102,.3); background: rgba(255,209,102,.06); }
.type-tag.text { color: #a78bfa; border-color: rgba(167,139,250,.3); background: rgba(167,139,250,.06); }
.type-tag.quantity { color: var(--green); border-color: rgba(6,214,160,.3); background: rgba(6,214,160,.08); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
