﻿/* ═══════════════════════════════════════════════════════
   StreamGG — Design System (matching streamed.pk dark)
   ═══════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Inter';
  src: url('https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTcviYwY.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0a0a0a;
  --bg-card: #0a0a0a;
  --bg-secondary: #262626;
  --bg-hover: #1a1a1a;
  --bg-nav: #111111;
  --primary: #e02d3c;
  --primary-hover: #c41e2a;
  --text: #fafafa;
  --text-secondary: #a3a3a3;
  --text-muted: #666;
  --border: #262626;
  --border-hover: #3a3a3a;
  --green: #22c55e;
  --blue: #3b82f6;
  --yellow: #f59e0b;
  --radius: 8px;
  --radius-lg: 12px;
  --font: 'Inter', -apple-system, system-ui, sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

/* ── HEADER (sticky nav bar) ── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 48px;
}
.header-inner {
  max-width: 1480px; margin: 0 auto;
  display: flex; align-items: center; gap: 24px;
  padding: 0 16px; height: 100%;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 700;
  color: var(--text); flex-shrink: 0;
}
.logo svg { color: var(--primary); width: 22px; height: 22px; }
.logo em { font-style: normal; color: var(--primary); }

/* Nav links */
.nav-links { display: flex; gap: 0; align-items: center; }
.nav-link {
  padding: 6px 12px; font-size: 14px; font-weight: 400;
  color: var(--text-secondary); transition: color 0.15s;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); font-weight: 500; }

/* Search bar (in header) */
.header-search {
  margin-left: auto; display: flex; align-items: center;
}
.search-bar {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 6px 12px;
  display: flex; align-items: center; gap: 8px;
  width: 240px; cursor: text;
}
.search-bar input {
  background: none; border: none; outline: none;
  font-size: 13px; color: var(--text); width: 100%;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar svg { color: var(--text-muted); flex-shrink: 0; width: 14px; height: 14px; }

/* Right header buttons */
.header-right {
  display: flex; align-items: center; gap: 8px;
  margin-left: 12px;
}
.hdr-btn {
  width: 32px; height: 32px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: all 0.15s;
  border: 1px solid var(--border);
}
.hdr-btn:hover { color: var(--text); background: var(--bg-hover); }

/* ── SEARCH OVERLAY ── */
.search-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: none; align-items: flex-start; justify-content: center;
  padding: 60px 20px;
}
.search-overlay.open { display: flex; }
.search-modal {
  width: 100%; max-width: 560px;
  background: #1a1a1a; border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.search-modal-input {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.search-modal-input svg { color: var(--text-muted); flex-shrink: 0; }
.search-modal-input input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 15px; color: var(--text);
}
.search-modal-input input::placeholder { color: var(--text-muted); }
.search-modal-close {
  font-size: 20px; color: var(--text-muted); padding: 0 4px;
}
.search-results { max-height: 360px; overflow-y: auto; }
.sr-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; cursor: pointer;
  transition: background 0.15s;
}
.sr-item:hover { background: rgba(255,255,255,0.04); }
.sr-item .sr-poster {
  width: 56px; height: 36px; border-radius: 4px;
  background: var(--bg-secondary); flex-shrink: 0;
  overflow: hidden;
}
.sr-item .sr-poster img { width: 100%; height: 100%; object-fit: cover; }
.sr-info { flex: 1; min-width: 0; }
.sr-info .sr-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-info .sr-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.sr-info .sr-live { color: var(--green); font-weight: 700; }
.sr-time { font-size: 11px; color: var(--text-muted); margin-left: auto; flex-shrink: 0; }

/* ── MAIN ── */
.main { max-width: 1480px; margin: 0 auto; padding: 16px; min-height: calc(100vh - 48px - 100px); }

/* Loading */
.loading-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; padding: 80px 0;
  color: var(--text-muted); font-size: 13px;
}
.loader {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── SPORTS GRID (category icons) ── */
.sports-section { margin-bottom: 24px; }
.sports-section h2 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.sports-grid {
  display: flex; gap: 8px; overflow-x: auto;
  scrollbar-width: none; padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}
.sports-grid::-webkit-scrollbar { display: none; }
.sport-card {
  flex-shrink: 0; width: 100px; text-align: center;
  padding: 16px 8px; border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg); cursor: pointer;
  transition: all 0.15s; scroll-snap-align: start;
}
.sport-card:hover { border-color: var(--border-hover); background: var(--bg-hover); }
.sport-card.active { border-color: var(--primary); background: rgba(224,45,60,0.06); }
.sport-card .sport-icon { font-size: 28px; margin-bottom: 6px; }
.sport-card .sport-name { font-size: 11px; font-weight: 500; color: var(--text-secondary); line-height: 1.3; }
.sport-card.active .sport-name { color: var(--text); }
.scroll-nav {
  display: flex; align-items: center; gap: 8px; justify-content: flex-end;
  margin-top: -36px; margin-bottom: 8px;
}
.scroll-nav button {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border); display: flex;
  align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 16px;
  transition: all 0.15s;
}
.scroll-nav button:hover { color: var(--text); border-color: var(--border-hover); }

/* ── MATCH SECTION (horizontal carousel per sport) ── */
.match-section { margin-bottom: 28px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.section-title { font-size: 16px; font-weight: 700; }
.section-arrows { display: flex; gap: 6px; }
.section-arrows button {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border); display: flex;
  align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 14px;
  transition: all 0.15s;
}
.section-arrows button:hover { color: var(--text); border-color: var(--border-hover); }

/* Match carousel row */
.match-row {
  display: flex; gap: 12px; overflow-x: auto;
  scrollbar-width: none; scroll-snap-type: x mandatory;
  padding-bottom: 4px;
}
.match-row::-webkit-scrollbar { display: none; }

/* ── MATCH CARD (poster-style like streamed.pk) ── */
.match-card {
  flex-shrink: 0; width: 220px;
  cursor: pointer; transition: transform 0.15s;
  scroll-snap-align: start; position: relative;
}
.match-card:hover { transform: translateY(-2px); }
.mc-poster {
  width: 100%; aspect-ratio: 16/10;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: var(--radius); overflow: hidden;
  position: relative;
}
.mc-poster img {
  width: 100%; height: 100%; object-fit: cover;
}
/* LIVE badge */
.mc-live-badge {
  position: absolute; top: 8px; left: 8px;
  padding: 2px 8px; border-radius: 4px;
  background: var(--primary); color: #fff;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.5px;
}
/* Time badge */
.mc-time-badge {
  position: absolute; top: 8px; left: 8px;
  padding: 2px 8px; border-radius: 4px;
  background: rgba(0,0,0,0.7); color: #fff;
  font-size: 10px; font-weight: 600;
}
/* Star (fav) button */
.mc-fav {
  position: absolute; top: 8px; right: 8px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(245,158,11,0.2);
  color: var(--yellow);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
/* Viewer count */
.mc-viewers {
  position: absolute; top: 8px; right: 8px;
  padding: 2px 8px; border-radius: 4px;
  background: rgba(34,197,94,0.15); color: var(--green);
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; gap: 4px;
}
.mc-viewers svg { width: 10px; height: 10px; }

/* Team badges overlay inside poster */
.mc-teams-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
}
.mc-badge-img { width: 36px; height: 36px; object-fit: contain; }
.mc-vs-overlay { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.5); }

/* Card text below poster */
.mc-text { padding: 8px 0 0; }
.mc-title {
  font-size: 13px; font-weight: 500; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.mc-meta {
  font-size: 11px; color: var(--text-muted);
  margin-top: 2px;
}

/* ── WATCH PAGE ── */
.watch-page { max-width: 1200px; margin: 0 auto; }
.watch-header {
  text-align: center; padding: 20px 16px;
  background: linear-gradient(180deg, rgba(224,45,60,0.08), transparent);
  border-radius: var(--radius-lg); margin-bottom: 16px;
}
.watch-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.watch-subtitle { font-size: 13px; color: var(--text-secondary); }
.watch-back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius);
  border: 1px solid var(--border); font-size: 13px;
  font-weight: 500; color: var(--text-secondary);
  margin: 16px 0; transition: all 0.15s;
}
.watch-back:hover { color: var(--text); border-color: var(--border-hover); }

.watch-countdown {
  text-align: center; padding: 20px; font-size: 16px;
  color: var(--text-secondary);
}
.watch-countdown strong { color: var(--text); font-size: 22px; font-weight: 800; }

/* Player container */
.watch-player {
  width: 100%; aspect-ratio: 16/9;
  background: #000; border-radius: var(--radius-lg);
  overflow: hidden; position: relative;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.watch-player iframe { width: 100%; height: 100%; border: none; }
.watch-player-actions {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; margin-bottom: 16px;
}
.wp-btn {
  padding: 6px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); font-size: 12px;
  font-weight: 500; color: var(--text-secondary);
  display: flex; align-items: center; gap: 6px;
  transition: all 0.15s;
}
.wp-btn:hover { color: var(--text); border-color: var(--border-hover); }

/* Stream sources list */
.sources-section { margin-top: 16px; }
.sources-label { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.source-group {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 12px;
}
.source-group-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--bg-hover);
  border-bottom: 1px solid var(--border);
}
.sg-name { font-size: 14px; font-weight: 600; }
.sg-tag { font-size: 11px; color: var(--green); }
.sg-count { font-size: 12px; color: var(--primary); font-weight: 600; }
.source-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.15s;
}
.source-item:last-child { border-bottom: none; }
.source-item:hover { background: rgba(255,255,255,0.02); }
.source-item.active { border-left: 3px solid var(--primary); }
.si-quality {
  padding: 2px 6px; border-radius: 3px; font-size: 10px;
  font-weight: 700; text-transform: uppercase;
}
.si-quality.hd { background: var(--primary); color: #fff; }
.si-quality.sd { background: var(--bg-secondary); color: var(--text-muted); }
.si-name { font-size: 13px; font-weight: 500; }
.si-current { font-size: 11px; color: var(--green); margin-left: 4px; }
.si-meta { margin-left: auto; font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.si-viewers { color: var(--green); display: flex; align-items: center; gap: 3px; }

/* ── SCHEDULE PAGE ── */
.schedule-page {}
.schedule-filters {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap;
}
.sched-pill {
  padding: 5px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text-secondary); transition: all 0.15s;
}
.sched-pill:hover { border-color: var(--border-hover); color: var(--text); }
.sched-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.sched-pill.live-pill { background: transparent; border-color: var(--border); }
.sched-pill.popular-pill { background: var(--primary); border-color: var(--primary); color: #fff; }

.schedule-date {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 20px;
}
.sched-date-label {
  flex-shrink: 0; width: 50px; text-align: center;
  color: var(--primary); font-weight: 700;
}
.sched-date-label .sday { font-size: 10px; text-transform: uppercase; }
.sched-date-label .snum { font-size: 24px; font-weight: 800; }
.sched-date-label .smon { font-size: 10px; text-transform: uppercase; }

.schedule-grid {
  flex: 1; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 16px; text-align: center;
  margin-top: 40px;
}
.footer-inner { max-width: 1480px; margin: 0 auto; }
.footer-logo { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.footer-logo em { font-style: normal; color: var(--primary); }
.footer-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.footer-links { display: flex; gap: 16px; justify-content: center; margin-bottom: 12px; }
.footer-links a { font-size: 12px; color: var(--text-secondary); transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 11px; color: var(--text-muted); }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state h3 { font-size: 16px; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .header-inner { gap: 12px; }
  .search-bar { display: none; }
  .match-card { width: 180px; }
  .sport-card { width: 80px; padding: 12px 6px; }
  .sport-card .sport-icon { font-size: 22px; }
  .sport-card .sport-name { font-size: 10px; }
  .nav-link { padding: 6px 8px; font-size: 13px; }
}
@media (min-width: 641px) and (max-width: 1024px) {
  .match-card { width: 200px; }
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 3px; }