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

:root {
  --bg: #050a14;
  --bg2: #0a1628;
  --bg3: #0f1f3d;
  --border: #1e3a5f;
  --text: #e2e8f0;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --blue: #2563eb;
  --blue-light: #60a5fa;
  --purple: #7c3aed;
  --green: #10b981;
  --font-body: 'Inter', sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select { font-family: inherit; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #0a1628; }
::-webkit-scrollbar-thumb { background: #1e3a5f; border-radius: 2px; }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  background: rgba(5,10,20,0.97);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}
.header-inner {
  display: flex;
  align-items: center;
  height: 60px;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg,#2563eb,#7c3aed);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  letter-spacing: -0.5px;
}
.main-nav {
  display: flex;
  gap: 4px;
  flex: 1;
}
.nav-link {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  transition: all .15s;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav-link.active { color: var(--blue-light); background: rgba(37,99,235,.12); }
.header-actions { display: flex; gap: 8px; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  padding: 7px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all .15s;
  display: inline-block;
  text-align: center;
}
.btn-secondary {
  background: rgba(29,78,216,.15);
  border-color: #2563eb;
  color: #93c5fd;
}
.btn-secondary:hover { background: rgba(29,78,216,.3); }
.btn-secondary.active { background: #1d4ed8; color: #fff; }
.btn-purple {
  background: rgba(124,58,237,.15);
  border-color: #7c3aed;
  color: #c4b5fd;
}
.btn-purple:hover { background: rgba(124,58,237,.3); }
.btn-purple.active { background: #7c3aed; color: #fff; }
.btn-blue {
  background: #1d4ed8;
  border-color: #2563eb;
  color: #fff;
}
.btn-blue:hover { background: #1e40af; }
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-light);
}
.btn-outline:hover { border-color: var(--text-light); color: var(--text); }
.btn-full { width: 100%; padding: 12px; font-size: 15px; }
.btn-watch {
  background: #1d4ed8;
  border: none;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.btn-watch:hover { background: #1e40af; }
.btn-approve {
  background: #064e3b;
  border: 1px solid #065f46;
  color: #34d399;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.btn-reject {
  background: #450a0a;
  border: 1px solid #7f1d1d;
  color: #f87171;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  padding: 48px 0 32px;
  text-align: center;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  color: #f1f5f9;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.hero-sub {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 28px;
}

/* ── Stats bar ────────────────────────────────────────────────────────────── */
.stats-bar {
  display: flex;
  gap: 32px;
  padding: 16px 24px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: fit-content;
  margin: 0 auto;
}
.stat-item { text-align: center; }
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  color: var(--blue-light);
  line-height: 1;
}
.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Filters ──────────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 12px;
  padding: 24px 0 20px;
  flex-wrap: wrap;
  align-items: center;
}
.search-input {
  flex: 1;
  min-width: 200px;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}
.search-input:focus { border-color: var(--blue); }
.sport-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.sport-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text-light);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: all .15s;
}
.sport-btn:hover { border-color: var(--blue); color: var(--text); }
.sport-btn.active { background: #1d4ed8; border-color: var(--blue); color: #fff; }

/* ── Date Groups ──────────────────────────────────────────────────────────── */
.date-group { margin-bottom: 36px; }
.date-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-light);
  letter-spacing: 0.2px;
  margin-bottom: 12px;
}
.date-line { flex: 0 0 32px; height: 1px; background: var(--border); }
.match-list { display: flex; flex-direction: column; gap: 6px; }

/* ── Match Card ───────────────────────────────────────────────────────────── */
.match-card {
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 16px;
  align-items: center;
  cursor: pointer;
  transition: border-color .15s, transform .1s, box-shadow .15s;
}
.match-card:hover {
  border-color: var(--blue);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(37,99,235,.1);
}
.match-sport-col { text-align: center; }
.sport-icon { font-size: 28px; display: block; }
.match-time { font-size: 11px; color: var(--text-muted); margin-top: 3px; display: block; }
.match-meta { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.match-teams {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: #f1f5f9;
  line-height: 1.3;
}
.match-streams { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.vs { color: var(--text-muted); margin: 0 8px; font-weight: 400; }
.match-watch-btn {
  background: #1d4ed8;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Pills ────────────────────────────────────────────────────────────────── */
.pill {
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.pill-blue { background: rgba(37,99,235,.15); color: #60a5fa; border: 1px solid rgba(37,99,235,.25); }
.pill-gray { background: rgba(100,116,139,.12); color: #94a3b8; border: 1px solid rgba(100,116,139,.2); }
.pill-green { background: rgba(16,185,129,.12); color: #34d399; border: 1px solid rgba(16,185,129,.2); }
.pill-submitted { background: #064e3b; color: #34d399; border: 1px solid #065f46; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; }
.pill-link {
  background: rgba(29,78,216,.15);
  border: 1px solid #2563eb;
  color: #93c5fd;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  display: inline-block;
}
.pill-link:hover { background: rgba(29,78,216,.3); }

/* ── Rank Badge ───────────────────────────────────────────────────────────── */
.rank-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ── Watch Page ───────────────────────────────────────────────────────────── */
.back-btn {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 16px;
  border-radius: 7px;
  font-size: 13px;
  margin-bottom: 24px;
  cursor: pointer;
  transition: all .15s;
}
.back-btn:hover { border-color: var(--text-light); color: var(--text); }

.match-hero-card {
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 28px;
}
.match-hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: #f1f5f9;
  margin-bottom: 6px;
}
.vs-big { color: var(--text-muted); margin: 0 12px; font-weight: 400; }
.match-hero-date { color: var(--text-muted); font-size: 14px; }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: #f1f5f9;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-count {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  font-family: var(--font-body);
}

.stream-list { display: flex; flex-direction: column; gap: 8px; }
.stream-row {
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.stream-medal { font-size: 22px; flex-shrink: 0; }
.stream-info { flex: 1; min-width: 0; }
.stream-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.stream-link { color: var(--blue-light); font-size: 13px; word-break: break-all; }
.stream-links-row { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.community-tag {
  background: rgba(16,185,129,.12);
  color: #34d399;
  border: 1px solid rgba(16,185,129,.2);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.auto-notice {
  background: rgba(37,99,235,.08);
  border: 1px solid rgba(37,99,235,.2);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--blue-light);
  font-size: 13px;
  margin-bottom: 8px;
}

.channel-list { display: flex; flex-direction: column; gap: 6px; }
.channel-row {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.lang-tag {
  background: var(--bg3);
  color: var(--blue-light);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.channel-name { flex: 1; font-weight: 500; color: #cbd5e1; }
.channel-links { display: flex; gap: 6px; }

/* ── Auth Card ────────────────────────────────────────────────────────────── */
.auth-card {
  max-width: 480px;
  margin: 40px auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px;
}
.auth-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: #f1f5f9;
  margin-bottom: 6px;
}
.auth-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.form-label { display: block; font-size: 13px; color: var(--text-light); margin-bottom: 6px; margin-top: 16px; }
.form-label:first-of-type { margin-top: 0; }
.form-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  margin-bottom: 4px;
  transition: border-color .15s;
}
.form-input:focus { border-color: var(--blue); }
.msg-error {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  color: #f87171;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ── Dashboard ────────────────────────────────────────────────────────────── */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.match-submit-row {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 8px;
}
.match-submit-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.sport-icon-sm { font-size: 20px; flex-shrink: 0; padding-top: 2px; }
.match-teams-sm { font-weight: 600; color: #f1f5f9; font-size: 15px; }
.submit-input-row { display: flex; gap: 8px; }

/* ── Admin ────────────────────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 4px;
  background: var(--bg2);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
  width: fit-content;
}
.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 8px 20px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 500;
  transition: all .15s;
}
.tab-btn.active { background: var(--bg3); color: #f1f5f9; }
.tab-btn:hover:not(.active) { color: var(--text); }

.admin-row {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-row-info { flex: 1; min-width: 160px; }
.admin-row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.status-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}
.status-pending { background: #2d1f00; color: #f59e0b; border: 1px solid #451a03; }
.status-approved { background: #064e3b; color: #34d399; border: 1px solid #065f46; }
.status-rejected { background: #450a0a; color: #f87171; border: 1px solid #7f1d1d; }

.rank-select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-light);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  outline: none;
}
.rank-select:focus { border-color: var(--blue); }

/* ── States ───────────────────────────────────────────────────────────────── */
.loading-state {
  text-align: center;
  color: var(--text-muted);
  padding: 64px 24px;
  font-size: 14px;
}
.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 24px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  margin-top: 32px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero-title { font-size: 28px; }
  .match-card { grid-template-columns: 48px 1fr; }
  .match-watch-btn { display: none; }
  .stats-bar { gap: 20px; padding: 14px 18px; }
  .header-actions .btn-purple { display: none; }
  .match-hero-title { font-size: 22px; }
  .admin-row { flex-direction: column; align-items: flex-start; }
}

/* ── Ad Banner (top) ──────────────────────────────────────────────────────── */
.ad-top-banner {
  background: #070e1c;
  border-bottom: 1px solid #1a2a44;
  padding: 8px 0;
}
.ad-top-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.ad-label {
  font-size: 10px;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
}
.ad-placeholder-banner {
  background: #0d1b2e;
  border: 1px dashed #1e3a5f;
  border-radius: 6px;
  color: #3b5278;
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  max-width: 728px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  letter-spacing: 0.3px;
}

/* ── Page layout with sidebar ─────────────────────────────────────────────── */
.page-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding-bottom: 64px;
}
.page-main {
  flex: 1;
  min-width: 0;
}
.page-sidebar {
  flex-shrink: 0;
  width: 180px;
}
.ad-sidebar-sticky {
  position: sticky;
  top: 76px; /* header height + a little gap */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.ad-placeholder-sidebar {
  background: #0d1b2e;
  border: 1px dashed #1e3a5f;
  border-radius: 6px;
  color: #3b5278;
  font-size: 13px;
  font-weight: 500;
  width: 160px;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.7;
}

/* ── Responsive: hide sidebar on small screens ────────────────────────────── */
@media (max-width: 900px) {
  .page-sidebar { display: none; }
  .page-layout { padding-bottom: 48px; }
}
@media (max-width: 640px) {
  .ad-placeholder-banner { height: 60px; font-size: 12px; }
}
