/* ===== Root variables ===== */
:root {
  --bg: #050a1a;
  --bg-alt: #0d1535;
  --border: rgba(255, 255, 255, 0.06);
  --muted: rgba(255, 255, 255, 0.6);
  --text: #e4ecfa;
  --accent: #4cb4ff;
  --accent-2: #38e3ff;
  --glow: 0 0 12px rgba(0, 153, 255, 0.3);
}

/* ===== Reset & Base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { text-decoration: none; color: inherit; }
button { font: inherit; border: none; outline: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 14px; }

/* ===== Header ===== */
.site-header { background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 12px; height: 54px; }
.back { color: var(--accent); font-weight: 500; }
.brand { display: flex; align-items: center; gap: 6px; }
.logo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.brand-name { font-weight: bold; }
.top-nav a { color: var(--muted); margin-left: 16px; }
.top-nav a[aria-current="page"] { color: var(--text); }

/* ===== Hero (homepage) ===== */
.hero { padding: 10px 0 22px; }
.hero-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.hero-text h1 { margin: 10px 0 6px; font-size: clamp(22px, 3.2vw, 34px); }
.muted { color: var(--muted); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.input-wrap { position: relative; }
.input {
  padding: 12px 42px 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: rgba(16,22,46,.6); color: var(--text); outline: none; min-width: min(54vw, 420px);
}
.search-ic { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: var(--muted); }
.select {
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: rgba(16,22,46,.6); color: var(--text); outline: none;
}

/* ===== Ads ===== */
.ad-slot { margin: 16px 0; }
.ad-placeholder {
  height: 80px; border: 1px dashed var(--border); background: rgba(255,255,255,.03);
  display: flex; align-items: center; justify-content: center; color: var(--muted);
}

/* ===== Homepage Grid & Cards ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; padding: 8px 0 22px; }
.card {
  display: block; background: linear-gradient(180deg, rgba(18,24,50,.8), rgba(18,24,50,.6));
  border: 1px solid var(--border); border-radius: 18px; color: var(--text);
  overflow: hidden; box-shadow: var(--glow);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.card:hover { transform: translateY(-2px); border-color: #2a3a7c; box-shadow: 0 14px 40px rgba(77,163,255,.28); }

.thumb { position: relative; aspect-ratio: 16 / 9; background: var(--bg-alt); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.overlay { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: space-between; padding: 10px; }

.badge {
  background: rgba(10,14,30,.6); border: 1px solid rgba(77,163,255,.35);
  color: #bfe0ff; font-size: .72rem; padding: 6px 10px; border-radius: 999px; backdrop-filter: blur(4px);
}
.live {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,79,79,.12); border: 1px solid rgba(255,79,79,.35);
  color: #ffaaaa; font-size: .72rem; padding: 6px 10px; border-radius: 999px;
}
.live .dot {
  width: 7px; height: 7px; border-radius: 50%; background: #ff5252;
  box-shadow: 0 0 0 3px rgba(255,82,82,.28); animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(255,82,82,.35)} 70%{box-shadow:0 0 0 8px rgba(255,82,82,0)} 100%{box-shadow:0 0 0 0 rgba(255,82,82,0)} }

.meta { padding: 12px 14px 16px; }
.title { margin: 0; font-size: 1.02rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Skeletons (homepage) ===== */
.sk { position: relative; }
.skb {
  background: linear-gradient(90deg, #0f1734 25%, #121c42 37%, #0f1734 63%);
  background-size: 400% 100%; animation: shimmer 1.2s infinite;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.sk .thumb { aspect-ratio: 16 / 9; }
.sk .chip { width: 80px; height: 24px; margin: 10px 0 4px; border-radius: 999px; }
.sk .t1 { height: 18px; width: 75%; border-radius: 8px; margin: 8px 0; }
.sk .t2 { height: 14px; width: 45%; border-radius: 7px; }

/* ===== Errors & Footer ===== */
.error { background: #3a1020; border: 1px solid #7c2a4b; padding: 12px; border-radius: 12px; color: #ffd5e1; }
.site-footer { border-top: 1px solid var(--border); color: var(--muted); padding: 18px 0; background: rgba(10,14,30,.35); }

/* ===== Player Grid (kept from your last working CSS) ===== */
.player-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; padding: 10px 0 26px; }
.player-title { margin: 8px 0 14px; font-size: 1.15rem; }

/* ===== Player Shell (Fixed 16:9, no jump) ===== */
.player-shell {
  position: relative; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border); background: #0d1535; box-shadow: var(--glow);
  padding-top: 56.25%; /* reserve height */
}
.player-shell .video-js,
.player-shell video { position: absolute; inset: 0; width: 100%; height: 100%; }

.views-line { margin: 10px 0 4px; color: var(--muted); font-size: 0.92rem; }

/* ===== Stream Switcher (Link 1, Link 2…) ===== */
.switcher { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.sw-btn {
  padding: 10px 12px; border-radius: 12px; border: 1px solid #2a3a7c;
  background: rgba(16,22,46,.6); color: #cfe6ff; cursor: pointer;
  transition: background .2s, color .2s, border .2s;
}
.sw-btn:hover { background: rgba(76,180,255,.2); }
.sw-btn.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #081126; border-color: transparent; }

/* ===== Sidebar (player) ===== */
.side-col { display: flex; flex-direction: column; }
.side-title { font-size: 1.05rem; margin-bottom: 10px; }
.side-list { display: flex; flex-direction: column; gap: 10px; }
.side-card {
  display: flex; gap: 10px; padding: 8px; border: 1px solid var(--border);
  border-radius: 10px; background: rgba(255,255,255,.03); transition: background .2s;
}
.side-card:hover { background: rgba(255,255,255,.06); }
.s-thumb { width: 80px; height: 50px; background: var(--bg-alt); flex-shrink: 0; border-radius: 6px; overflow: hidden; }
.s-meta { display: flex; flex-direction: column; justify-content: center; }
.s-title { font-size: 0.95rem; font-weight: 500; }
.s-sub { font-size: 0.8rem; color: var(--muted); }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .player-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .input { min-width: 100%; }
  .hero-inner { align-items: flex-start; flex-direction: column; gap: 12px; }
}


/* Logo circle for header icon */
.logo-circle{
  width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px rgba(76, 180, 255, 0.25);
}
.logo-circle i{ font-size: 11px; color: #081126; line-height: 1; }

.brand-name {
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer; /* Shows hand cursor */
}
.brand-name:hover {
  opacity: 0.85;
}

/* Keep header above the player on all pages */
.site-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;      /* already fine if present */
  top: 0;
  z-index: 1000;         /* <-- ensures clicks go to header */
}

/* Make the brand link obviously clickable */
.brand-name {
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;       /* hand cursor */
  pointer-events: auto;  /* ensure clicks pass through */
}
.brand-name:hover { opacity: 0.85; }