/* ============ StreamVault — luxe dark ============ */
:root {
  --bg: #0a0c10;
  --bg2: #0d1016;
  --card: #10141c;
  --card2: #131826;
  --line: rgba(255, 255, 255, 0.06);
  --line2: rgba(255, 255, 255, 0.1);
  --txt: #e8ebf2;
  --muted: #8b93a7;
  --dim: #5a627a;
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.12);
  --gold: #d4a24e;
  --gold-soft: rgba(212, 162, 78, 0.12);
  --red: #f0564a;
  --radius: 12px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }

button { font: inherit; color: inherit; cursor: pointer; }
.mono { font-family: var(--mono); }

/* ---------- brand ---------- */
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px;
  border: 1.5px solid var(--gold);
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}
.brand-mark i { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.brand-name {
  font-size: 13px; font-weight: 700; letter-spacing: 0.22em;
}

/* ---------- buttons ---------- */
.btn {
  border: 1px solid var(--line2);
  background: var(--card2);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  transition: border-color .15s, background .15s, transform .05s;
  user-select: none;
}
.btn:hover { border-color: rgba(255,255,255,.25); background: #1a2130; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: default; }
.btn-gold { background: linear-gradient(180deg, #e3b662, #c08f3c); border-color: #a87c2f; color: #14100a; }
.btn-gold:hover { background: linear-gradient(180deg, #eeC277, #c89440); border-color: #c89440; }
.btn-danger { color: var(--red); border-color: rgba(240, 86, 74, .3); }
.btn-danger:hover { background: rgba(240, 86, 74, .1); border-color: rgba(240, 86, 74, .5); }
.btn-block { width: 100%; padding: 10px; }
.icon-btn {
  background: none; border: none; padding: 6px; border-radius: 7px; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { color: var(--txt); background: var(--line); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 12, 16, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 22px;
  height: 54px; display: flex; align-items: center; gap: 26px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav-btn {
  background: none; border: none; color: var(--muted);
  font-size: 12.5px; font-weight: 600; letter-spacing: .05em;
  padding: 8px 12px; border-radius: 8px; position: relative;
}
.nav-btn:hover { color: var(--txt); }
.nav-btn.active { color: var(--txt); }
.nav-btn.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -16px;
  height: 2px; background: var(--gold); border-radius: 2px;
}
.badge {
  display: inline-block; min-width: 17px; padding: 1px 5px; margin-left: 5px;
  border-radius: 9px; background: var(--gold); color: #14100a;
  font-size: 10px; font-weight: 700; text-align: center;
}
.top-right { display: flex; align-items: center; gap: 10px; }
.clock { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .05em; }
.user-chip {
  font-size: 11.5px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px;
}

/* ---------- main ---------- */
.main { max-width: 1180px; margin: 0 auto; padding: 22px 22px 80px; }

.section-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .16em; color: var(--gold);
  margin: 6px 2px 10px;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--emerald);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* live strip */
#live-strip { margin-bottom: 26px; }
.live-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.live-card {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid rgba(16, 185, 129, .22);
  border-radius: var(--radius); padding: 10px 14px;
}
.live-card .lc-teams { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-card .lc-league { font-size: 10.5px; color: var(--muted); }
.live-card .btn { margin-left: auto; flex: none; }

/* ---------- fixtures ---------- */
.day-list { display: flex; flex-direction: column; gap: 26px; }
.day-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .16em;
  color: var(--dim); margin: 0 2px 2px; text-transform: uppercase;
}
.event {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color .15s;
}
.event:hover { border-color: var(--line2); }
.event.is-live { border-color: rgba(16, 185, 129, .3); }
.event.is-past { opacity: .55; }

.event-top { display: flex; align-items: center; gap: 12px; }
.event-time {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  color: var(--gold); min-width: 46px;
}
.event-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .12em;
  padding: 3px 9px; border-radius: 999px; flex: none;
}
.status-live { color: var(--emerald); background: var(--emerald-soft); }
.status-live .live-dot { width: 6px; height: 6px; }
.status-soon { color: var(--gold); background: var(--gold-soft); }
.status-done { color: var(--dim); background: rgba(255,255,255,.05); }
.event-league { font-size: 11px; color: var(--muted); }
.event-teams { margin-top: 7px; font-size: 15.5px; font-weight: 650; letter-spacing: .01em; }

.event-actions { margin-top: 11px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line2); border-radius: 999px;
  background: transparent; color: var(--muted);
  font-size: 11.5px; font-weight: 600; padding: 5px 12px;
  transition: all .13s;
}
.chip:hover { color: var(--txt); border-color: rgba(255,255,255,.3); }
.chip-auto { color: var(--gold); border-color: rgba(212, 162, 78, .4); }
.chip-auto:hover { background: var(--gold-soft); }
.chip.is-rec { color: var(--emerald); border-color: rgba(16,185,129,.45); background: var(--emerald-soft); }
.rec-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: pulse 1.2s infinite; }
.rec-meta { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.stop-x {
  border: none; background: none; color: inherit; padding: 0 0 0 4px; font-size: 13px; line-height: 1; opacity: .7;
}
.stop-x:hover { opacity: 1; }

/* ---------- recordings ---------- */
.rec-list { display: flex; flex-direction: column; gap: 10px; }
.rec-card {
  display: grid;
  grid-template-columns: 110px 1fr auto auto;
  gap: 14px; align-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 16px;
}
.rec-time { font-family: var(--mono); font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.rec-time b { display: block; color: var(--txt); font-size: 13px; font-weight: 650; }
.rec-info .rec-teams { font-size: 14px; font-weight: 650; }
.rec-info .rec-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.rec-stat {
  font-size: 10px; font-weight: 700; letter-spacing: .1em;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.st-live { color: var(--emerald); background: var(--emerald-soft); }
.st-done { color: var(--gold); background: var(--gold-soft); }
.st-lost, .st-stopped, .st-error, .st-waiting, .st-finalizing { color: var(--muted); background: rgba(255,255,255,.05); }
.rec-actions { display: flex; gap: 6px; }

/* ---------- empty / player ---------- */
.empty {
  text-align: center; color: var(--dim); padding: 60px 0;
  font-size: 13px;
}
#player {
  position: fixed; inset: 0; z-index: 50; width: 100vw; height: 100vh;
  background: #000; object-fit: contain;
}

/* ---------- login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(900px 400px at 50% -10%, rgba(212, 162, 78, 0.07), transparent 60%),
    radial-gradient(700px 500px at 85% 110%, rgba(16, 185, 129, 0.05), transparent 60%),
    var(--bg);
}
.login-card {
  width: 340px; padding: 34px 30px 30px;
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.login-brand { text-align: center; margin-bottom: 26px; }
.login-brand .brand-mark { width: 42px; height: 42px; border-radius: 11px; }
.login-brand .brand-mark i { width: 12px; height: 12px; }
.login-brand h1 {
  font-size: 17px; font-weight: 700; letter-spacing: .28em; margin: 14px 0 3px;
}
.login-brand p { font-size: 11px; color: var(--dim); letter-spacing: .1em; margin: 0; }
.login-card label {
  display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .12em;
  color: var(--muted); margin-bottom: 14px;
}
.login-card input {
  width: 100%; margin-top: 6px; padding: 10px 12px;
  background: var(--bg2); border: 1px solid var(--line2); border-radius: 8px;
  color: var(--txt); font-size: 13.5px; font-family: inherit;
  outline: none; transition: border-color .15s;
}
.login-card input:focus { border-color: rgba(212, 162, 78, .6); }
.login-error { color: var(--red); font-size: 11.5px; min-height: 14px; margin-bottom: 8px; }

/* ---------- scrollbar ---------- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #232a3a; border-radius: 5px; }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 760px) {
  .rec-card { grid-template-columns: 1fr; gap: 8px; }
  .event-actions { gap: 5px; }
}
