/* ============ STREAM — premium dark UI ============ */
:root {
  --bg: #0a0a0f;
  --bg2: #101018;
  --card: #15151f;
  --card2: #1c1c28;
  --line: rgba(255,255,255,.07);
  --text: #f5f5f7;
  --muted: #9a9aa8;
  --accent: #ff4d6d;
  --accent2: #ff8c42;
  --grad: linear-gradient(135deg, #ff4d6d 0%, #ff8c42 100%);
  --radius: 14px;
  --shadow: 0 12px 40px rgba(0,0,0,.55);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(1200px 500px at 80% -10%, rgba(255,77,109,.08), transparent 60%),
    radial-gradient(900px 400px at 10% -10%, rgba(255,140,66,.06), transparent 60%);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(255,77,109,.35); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2a38; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a4c; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ===== navbar ===== */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,15,.75);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
header .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.logo { font-size: 24px; font-weight: 800; letter-spacing: 2px; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 14px rgba(255,77,109,.8); }
.logo span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
nav a { color: var(--muted); text-decoration: none; margin-left: 22px; font-size: 14px; font-weight: 500; transition: color .2s; position: relative; }
nav a:hover { color: var(--text); }
nav a.on { color: var(--text); }
nav a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; background: var(--grad); border-radius: 2px; }

/* ===== hero ===== */
.hero { padding: 56px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 800; letter-spacing: -1px; line-height: 1.15; }
.hero h1 .g { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); margin-top: 14px; font-size: 16px; }
.hero .stats { display: flex; justify-content: center; gap: 36px; margin-top: 28px; flex-wrap: wrap; }
.hero .stat { text-align: center; }
.hero .stat b { display: block; font-size: 26px; font-weight: 800; }
.hero .stat span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }

/* ===== section head ===== */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 36px 0 18px; }
.sec-head h2 { font-size: 20px; font-weight: 700; letter-spacing: .3px; }
.sec-head .count { color: var(--muted); font-size: 13px; }

/* ===== channel grid ===== */
.chgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.chcard {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9;
  display: block; text-decoration: none; background: var(--card);
  border: 1px solid var(--line); transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s;
}
.chcard:hover { transform: translateY(-4px) scale(1.01); box-shadow: var(--shadow); }
.chcard img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.chcard:hover img { transform: scale(1.07); }
.chcard::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.25) 45%, transparent 70%);
}
.chov { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; }
.chov .play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(.7);
  width: 56px; height: 56px; border-radius: 50%; background: var(--grad);
  display: flex; align-items: center; justify-content: center; opacity: 0; transition: all .25s ease;
  box-shadow: 0 8px 30px rgba(255,77,109,.5);
}
.chcard:hover .play { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.play svg { width: 20px; height: 20px; fill: #fff; margin-left: 3px; }
.chov h2 { font-size: 19px; font-weight: 700; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.chov .meta { display: flex; gap: 10px; align-items: center; margin-top: 5px; }
.chov .meta span { font-size: 12px; color: #ddd; background: rgba(255,255,255,.14); backdrop-filter: blur(4px); padding: 3px 9px; border-radius: 20px; }

/* ===== video grid ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.card {
  display: block; background: var(--card); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--text); border: 1px solid var(--line);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(255,77,109,.4); }
.thumb { position: relative; aspect-ratio: 16/9; background: #000; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .thumb img { transform: scale(1.06); }
.thumb video.pv {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .2s ease; pointer-events: none; background: #000;
}
.card:hover .thumb video.pv { opacity: 1; z-index: 2; }
.thumb .ov {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.35); opacity: 0; transition: opacity .2s;
}
.card:hover .thumb .ov { opacity: 1; }
.thumb .ov .pb { width: 44px; height: 44px; border-radius: 50%; background: var(--grad); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 24px rgba(255,77,109,.5); }
.thumb .ov .pb svg { width: 16px; height: 16px; fill: #fff; margin-left: 2px; }
.badges { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; justify-content: space-between; pointer-events: none; }
.badge { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; backdrop-filter: blur(6px); }
.badge.dur { background: rgba(0,0,0,.75); color: #fff; }
.badge.qual { background: var(--grad); color: #fff; }
.meta { padding: 12px 14px 14px; }
.meta h3 { font-size: 14px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.meta p { color: var(--muted); font-size: 12px; margin-top: 6px; display: flex; align-items: center; gap: 5px; }
.meta p .ch { color: var(--accent2); font-weight: 600; }

/* ===== channel page banner ===== */
.chbanner { position: relative; border-radius: var(--radius); overflow: hidden; margin: 24px 0 28px; border: 1px solid var(--line); }
.chbanner img { width: 100%; height: 220px; object-fit: cover; filter: brightness(.55) saturate(1.1); }
.chbanner .info { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; background: linear-gradient(to top, rgba(0,0,0,.92) 20%, transparent); }
.chbanner h1 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; }
.chbanner .stats { display: flex; gap: 18px; margin-top: 10px; color: #ddd; font-size: 13px; flex-wrap: wrap; }
.chbanner .stats b { color: #fff; }
.chbanner .tag { position: absolute; top: 16px; left: 16px; background: var(--grad); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 1px; padding: 5px 12px; border-radius: 20px; text-transform: uppercase; }

/* ===== watch page ===== */
.player-wrap { max-width: 1060px; margin: 24px auto 0; }
.video-box {
  background: #000; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
video { width: 100%; display: block; max-height: 80vh; background: #000; }
.winfo { padding: 22px 6px 0; }
.winfo h1 { font-size: clamp(17px, 2.4vw, 22px); font-weight: 700; line-height: 1.35; }
.wmeta { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; background: var(--card2); border: 1px solid var(--line); padding: 6px 14px; border-radius: 30px; font-size: 13px; color: var(--text); text-decoration: none; transition: all .2s; }
.chip:hover { border-color: rgba(255,77,109,.5); }
.chip .cb { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.chip.qual { background: var(--grad); border: none; font-weight: 700; }
.chip a { color: var(--accent2); text-decoration: none; }
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: 14px; margin: 20px 0 14px; transition: color .2s; }
.back:hover { color: var(--text); }
.back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ===== related ===== */
.related { margin-top: 34px; }

/* ===== footer ===== */
footer { color: #565668; font-size: 12px; padding: 26px 0 34px; border-top: 1px solid var(--line); margin-top: 50px; text-align: center; }
footer a { color: var(--muted); text-decoration: none; }

/* ===== empty state ===== */
.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty .big { font-size: 44px; margin-bottom: 10px; }

/* ===== responsive ===== */
@media (max-width: 640px) {
  .hero { padding: 36px 0 24px; }
  .hero .stats { gap: 22px; }
  .chgrid, .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .chbanner img { height: 150px; }
  .chov h2 { font-size: 15px; }
  .chov .play { width: 42px; height: 42px; }
}
