/* ═══════════════════════════════════════════
   RongKunKmeanMnus — Main Stylesheet
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Kantumruy+Pro:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

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

/* ── TOP PROGRESS BAR ── */
#nprogress { pointer-events:none; }
#nprogress-bar {
  background: var(--brand);
  position: fixed; z-index: 9999;
  top: 0; left: 0;
  width: 0%; height: 3px;
  transition: width .2s ease, opacity .4s ease;
  box-shadow: 0 0 10px var(--brand), 0 0 5px var(--brand);
  opacity: 0;
}
#nprogress-bar.running { opacity: 1; }
#nprogress-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.15);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: np-spin .5s linear infinite;
  opacity: 0; transition: opacity .3s;
  flex-shrink: 0;
}
#nprogress-spinner.running { opacity: 1; }
@keyframes np-spin { to { transform: rotate(360deg); } }

:root {
  --brand: #f27d26;
  --bg: #0a0a0a;
  --bg2: #111111;
  --border: rgba(255,255,255,0.07);
  --text: #e4e4e7;
  --muted: #71717a;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Kantumruy Pro', 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

a { text-decoration: none; }
button, input, select, textarea { font-family: 'Kantumruy Pro', 'Outfit', sans-serif; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 9999px; }
.hide-scroll { scrollbar-width: none !important; }
.hide-scroll::-webkit-scrollbar { display: none !important; }

/* ── PAGES ── */
.page { display: none; min-height: 100vh; }
.page.active { display: block; }

/* ── TOAST ── */
#toast { position: fixed; top: 18px; right: 18px; z-index: 9999; pointer-events: none; display: flex; flex-direction: column; gap: 6px; }
.toast-item { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 9999px; font-size: .77rem; font-weight: 700; transform: translateX(140%); opacity: 0; transition: all .28s; pointer-events: none; }
.toast-item.show { transform: none; opacity: 1; }
.toast-item.ok   { background: #15803d; color: #fff; }
.toast-item.err  { background: #dc2626; color: #fff; }
.toast-item.info { background: #1d4ed8; color: #fff; }

/* ══ NAVBAR ══ */
#navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 200; transition: transform .3s ease; }



#nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 32px; background: rgba(8,8,8,1); border-bottom: 1px solid var(--border); }

.nav-logo { display: flex; align-items: center; gap: 9px; }
.nav-logo-icon { width: 30px; height: 30px; background: var(--brand); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.nav-logo-icon svg { fill: #fff; width: 12px; height: 12px; transform: translateX(1px); }
.nav-logo-text { font-size: 1.1rem; font-weight: 800; color: #fff; letter-spacing: -.02em; }

.nav-left { display: flex; align-items: center; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: 20px; }
.nav-links a { font-size: .82rem; font-weight: 600; color: #999; padding: 5px 14px; border-radius: 9999px; transition: all .2s; }
.nav-links a:hover { color: #fff; }
.nav-links a.active { background: var(--brand); color: #000; font-weight: 700; }

.nav-right { display: flex; align-items: center; gap: 4px; }
.icon-btn { background: none; border: none; cursor: pointer; color: #999; padding: 7px; border-radius: 50%; transition: all .2s; display: flex; align-items: center; }
.icon-btn:hover { color: #fff; background: rgba(255,255,255,.07); }



/* mobile bottom sheet — controlled via JS transform */

/* Suggested list: mobile shows inside scroll, desktop shows in sidebar */
.mobile-suggested { display: none; }
.desktop-suggested { display: block; }
@media (max-width: 960px) {
  .mobile-suggested { display: block; }
  .desktop-suggested { display: none; }
}
.mobile-search { position: relative; margin-bottom: 12px; }
.mobile-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); opacity: .4; }
.mobile-search input { width: 100%; background: #1c1c1c; border: 1px solid var(--border); border-radius: 9999px; padding: 8px 14px 8px 36px; color: #fff; font-size: .82rem; outline: none; }
.mobile-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.mobile-cats a { font-size: .82rem; font-weight: 600; color: #888; padding: 4px 0; }
.mobile-cats a:hover { color: #fff; }

.hamburger { display: none !important; }
@media (max-width: 1023px) { .nav-links { display: none; } .hamburger { display: flex !important; } #nav-more-wrap { display: none !important; } }

/* ══ HERO ══ */
#hero { position: relative; width: 100%; cursor: pointer; background: #000; overflow: hidden; }
@media (min-width: 641px) { #hero { height: 100vh; max-height: 820px; } }
@media (max-width: 640px) { #hero { height: 72vh; } }

#hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: opacity .7s; }

.hero-grad-main { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.2) 40%, rgba(0,0,0,.85) 75%, #0a0a0a 100%); }
.hero-grad-side { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,.4) 0%, transparent 60%); }

#hero-content { position: absolute; bottom: 80px; left: 0; right: 0; padding: clamp(20px,4vw,52px); z-index: 2; }
@media (max-width: 640px) { #hero-content { bottom: 40px; } }

.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--brand); color: #000; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 4px 12px; border-radius: 9999px; margin-bottom: 12px; }
#hero-title { font-size: clamp(1.5rem,3.8vw,3.2rem); font-weight: 900; color: #fff; line-height: 1; letter-spacing: -.03em; margin-bottom: 10px; text-shadow: 0 2px 24px rgba(0,0,0,.8); max-width: 600px; }
#hero-desc { font-size: clamp(.78rem,.9vw,.9rem); color: rgba(255,255,255,.7); max-width: 460px; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.hero-cat { font-size: .7rem; font-weight: 700; padding: 3px 10px; border: 1px solid rgba(255,255,255,.3); border-radius: 9999px; color: #ccc; }
.hero-views { font-size: .73rem; font-weight: 600; color: #999; }

.watch-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 26px; background: var(--brand); color: #000; font-size: .85rem; font-weight: 800; border-radius: 9999px; border: none; cursor: pointer; transition: all .2s; letter-spacing: -.01em; }
.watch-btn:hover { background: #fff; transform: scale(1.03); }
.watch-btn svg { fill: currentColor; width: 13px; height: 13px; transform: translateX(1px); }

#hero-dots { position: absolute; bottom: 18px; right: 32px; display: flex; gap: 5px; z-index: 3; }
.hero-dot { width: 6px; height: 6px; border-radius: 9999px; background: rgba(255,255,255,.3); border: none; cursor: pointer; padding: 0; transition: all .25s; }
.hero-dot.active { width: 22px; background: var(--brand); }

.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 38px; height: 38px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.15); border-radius: 50%; color: #fff; font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s, background .2s; outline: none; }
.hero-arrow:hover { background: var(--brand); border-color: var(--brand); }
#hero:hover .hero-arrow { opacity: 1; }
#hero-prev { left: 14px; }
#hero-next { right: 14px; }

/* ══ SECTIONS ══ */
#home-sections { max-width: 1560px; margin: 0 auto; padding: 24px 28px 60px; }
@media (max-width: 640px) { #home-sections { padding: 16px 12px 48px; } }

/* ── Recommended grid ── */
#recommended-section { max-width: 1560px; margin: 0 auto; padding: 0 28px 80px; }
@media (max-width: 640px) { #recommended-section { padding: 0 12px 80px; } }
#recommended-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
@media (max-width: 640px) { #recommended-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.recommended-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.recommended-header .section-icon { width: 32px; height: 32px; background: var(--brand); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: .85rem; }
.recommended-header .section-title { font-size: 1rem; font-weight: 800; color: #fff; }
#recommended-loader { text-align: center; padding: 20px; color: #555; font-size: .82rem; }

.section { margin-bottom: 28px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-left { display: flex; align-items: center; gap: 10px; }
.section-icon { width: 36px; height: 36px; background: rgba(242,125,38,.12); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.section-title { font-size: 1.05rem; font-weight: 800; color: #fff; }
.section-more { font-size: .72rem; font-weight: 700; color: #666; display: flex; align-items: center; gap: 3px; letter-spacing: .06em; text-transform: uppercase; transition: color .2s; }
.section-more:hover { color: var(--brand); }

.row-wrap { position: relative; }
.row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 2px; }
.row-btn { position: absolute; top: 50%; transform: translateY(-65%); z-index: 5; width: 34px; height: 54px; background: rgba(0,0,0,.75); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; color: #fff; font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: all .2s; outline: none; }
.row-btn:hover { background: var(--brand); border-color: var(--brand); }
.row-wrap:hover .row-btn { opacity: 1; }
.row-btn.prev { left: -14px; }
.row-btn.next { right: -14px; }

/* ══ VIDEO CARD ══ */
.vcard { flex: 0 0 calc(25% - 11px); min-width: 220px; cursor: pointer; display: block; }

/* ══ PLAYLIST CARD MULTI-THUMB (Netflix style) ══ */
.pl-multithumb { position:relative; aspect-ratio:16/9; border-radius:10px; overflow:hidden; background:#111; margin-bottom:8px; }
.pl-multithumb-grid { display:grid; grid-template-columns:1fr 1fr; grid-template-rows:1fr 1fr; width:100%; height:100%; gap:2px; }
.pl-multithumb-grid img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .4s; }
.vcard:hover .pl-multithumb-grid img { transform:scale(1.06); }
.pl-multithumb-single img { width:100%; height:100%; object-fit:cover; transition:transform .4s; }
.vcard:hover .pl-multithumb-single img { transform:scale(1.06); }
.pl-multithumb-overlay { position:absolute;inset:0;background:linear-gradient(to top,rgba(0,0,0,.75) 0%,transparent 55%);opacity:0;transition:opacity .3s; }
.vcard:hover .pl-multithumb-overlay { opacity:1; }
.pl-multithumb-play { position:absolute;inset:0;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .2s; }
.vcard:hover .pl-multithumb-play { opacity:1; }
.pl-ep-badge { position:absolute;bottom:6px;left:6px;background:rgba(0,0,0,.82);color:#fff;font-size:.6rem;font-weight:800;padding:2px 8px;border-radius:4px;letter-spacing:.04em; }
.pl-series-badge { position:absolute;top:6px;left:6px;background:var(--brand);color:#000;font-size:.58rem;font-weight:800;padding:2px 7px;border-radius:4px;letter-spacing:.06em;text-transform:uppercase; }

/* ══ CONTINUE WATCHING ══ */
.cw-section { margin-bottom:32px; padding-bottom:32px; border-bottom:1px solid var(--border); }
.cw-row { display:flex; gap:10px; overflow-x:auto; padding-bottom:4px; }
.cw-card { flex:0 0 180px; width:180px; cursor:pointer; position:relative; display:flex; flex-direction:column; }
.cw-thumb { position:relative; width:180px; height:101px; border-radius:8px; overflow:hidden; background:#1a1a1a; margin-bottom:6px; flex-shrink:0; }
.cw-thumb img { width:100%; height:100%; object-fit:cover; transition:transform .3s; }
.cw-card:hover .cw-thumb img { transform:scale(1.05); }
.cw-play { position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.35);opacity:0;transition:opacity .2s; }
.cw-card:hover .cw-play { opacity:1; }
.cw-play-icon { width:34px;height:34px;background:var(--brand);border-radius:50%;display:flex;align-items:center;justify-content:center; }
.cw-play-icon svg { fill:#fff;width:11px;height:11px;transform:translateX(1px); }
.cw-progress { position:absolute;bottom:0;left:0;right:0;height:3px;background:rgba(255,255,255,.15); }
.cw-progress-bar { height:100%;background:var(--brand);border-radius:0 3px 3px 0; width:40%; }
.cw-title { font-size:.72rem;font-weight:700;color:#bbb;width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3; }
.cw-card:hover .cw-title { color:var(--brand); }
.cw-meta { font-size:.65rem;color:#555;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
@media(max-width:640px){ .cw-card { flex:0 0 140px; width:140px; } .cw-thumb { width:140px; height:79px; } .cw-title { width:140px; } }
@media (max-width: 640px) { .vcard { flex: 0 0 calc(50% - 6px); min-width: 150px; } }

.vcard-thumb { position: relative; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #1a1a1a; margin-bottom: 8px; }
.ep-badge { position:absolute; width:32px; height:32px; background:var(--brand); border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:.8rem; font-weight:900; color:#fff; box-shadow:0 2px 8px rgba(0,0,0,.6); border:2px solid rgba(255,255,255,.2); z-index:3; line-height:1; top:7px; left:7px; }
.ep-badge--top-left     { top:7px;    left:7px;   bottom:auto; right:auto; }
.ep-badge--top-right    { top:7px;    right:7px;  bottom:auto; left:auto;  }
.ep-badge--bottom-left  { bottom:7px; left:7px;   top:auto;    right:auto; }
.ep-badge--bottom-right { bottom:7px; right:7px;  top:auto;    left:auto;  }
.vcard-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.vcard:hover .vcard-thumb img { transform: scale(1.07); }
.vcard-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 55%); opacity: 0; transition: opacity .3s; }
.vcard:hover .vcard-overlay { opacity: 1; }
.vcard-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; }
.vcard:hover .vcard-play { opacity: 1; }
.vcard-play-icon { width: 42px; height: 42px; background: rgba(242,125,38,.92); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 18px rgba(242,125,38,.4); }
.vcard-play-icon svg { fill: #fff; width: 14px; height: 14px; transform: translateX(1.5px); }
.vcard-duration { position: absolute; bottom: 6px; right: 6px; font-size: .62rem; font-weight: 700; background: rgba(0,0,0,.78); color: #fff; padding: 2px 6px; border-radius: 4px; }
.vcard-series { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.72); color: #ddd; font-size: .6rem; font-weight: 700; padding: 2px 7px; border-radius: 4px; letter-spacing: .04em; }
.vcard-title { font-size: .82rem; font-weight: 700; color: #d4d4d8; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; transition: color .2s; }
.vcard:hover .vcard-title { color: var(--brand); }
.vcard-sub { font-size: .72rem; font-weight: 600; color: #555; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ══ GRID ══ */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
@media (max-width: 480px) { .video-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; } }

/* ══ SKELETON ══ */
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton { background: linear-gradient(90deg, #1a1a1a 25%, #222 50%, #1a1a1a 75%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
.skel-card { flex: 0 0 calc(25% - 11px); min-width: 220px; }
.skel-thumb { aspect-ratio: 16/9; border-radius: 10px; }
.skel-title { height: 11px; margin-top: 8px; width: 85%; }
.skel-sub   { height: 9px;  margin-top: 4px; width: 55%; }

/* ══ WATCH PAGE ══ */
.watch-page { padding-top: 60px; }

/* Desktop: two-column grid */
.watch-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; max-width: 1280px; margin: 0 auto; padding: 0 24px 60px; }

/* ── Player ── */
.player-outer { position: relative; background: #000; border-radius: 14px; overflow: hidden; }
.player-wrap { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; overflow: hidden; }
/* ── AD CARD ─────────────────────────────────────── */
.vcard-ad { cursor: pointer; }
.vcard-ad .vcard-thumb { position: relative; background: #111; }
.vcard-ad-badge {
  position: absolute; bottom: 6px; left: 6px;
  background: rgba(242,125,38,.9); color: #000;
  font-size: .6rem; font-weight: 900;
  padding: 2px 7px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: .05em;
  z-index: 2;
}
.sugg-ad { cursor: pointer; opacity: .9; }
.sugg-ad:hover { opacity: 1; }
.sugg-ad .sugg-thumb { position: relative; }

#preroll-overlay { display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #0a0a0a; z-index: 20; flex-direction: column; align-items: stretch; justify-content: space-between; padding: 16px 20px; overflow: hidden; }
#preroll-overlay.active { display: flex !important; }
.player-wrap iframe { width: 100%; height: 100%; border: none; display: block; }

/* Mobile: video sticky top, page scrolls normally */
@media (max-width: 960px) {
  /* Make watch page fill the screen with fixed player */
  #page-watch.active { display: flex; flex-direction: column; height: 100vh; overflow: hidden; padding-bottom: 68px; }
  .watch-layout { grid-template-columns: 1fr; gap: 0; padding: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
  .watch-col-left { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
  /* Player stays fixed at top — never scrolls away */
  .player-outer { border-radius: 0; flex-shrink: 0; z-index: 150; }
  /* Everything below player scrolls independently */
  .watch-scroll-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: 80px; }
  .watch-col-right { padding: 0 14px; }
  .watch-info-wrap { padding: 0 14px; }
  #playlist-panel  { margin: 12px 14px 0; }
  .comments-section { margin: 0 14px; }
}


/* Placeholder keeps space for the real player when mini is active */


/* Mobile info padding */
@media (max-width: 960px) {
  .watch-info-wrap { padding: 0 14px; }
}

/* ── Filter chips (YouTube style) ── */
.watch-filter-row { display:flex; gap:8px; overflow-x:auto; padding:10px 0 2px; scrollbar-width:none; }
.watch-filter-row::-webkit-scrollbar { display:none; }
.watch-filter-chip { flex-shrink:0; padding:5px 14px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.08); border-radius:9999px; font-size:.73rem; font-weight:700; color:#666; cursor:pointer; transition:all .2s; white-space:nowrap; }
.watch-filter-chip.active { background:var(--brand); color:#fff; border-color:var(--brand); }
.watch-filter-chip:hover:not(.active) { background:rgba(255,255,255,.1); color:#ccc; }

.watch-source-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 6px; }
.watch-source-badge { padding: 3px 10px; background: #4338ca; border-radius: 6px; font-size: .65rem; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing:.04em; }
.watch-cat-label { font-size: .75rem; color: #555; font-weight: 700; background: rgba(255,255,255,.05); padding: 3px 10px; border-radius: 6px; border: 1px solid var(--border); }
.watch-next-btn { margin-left: auto; padding: 6px 14px; background: var(--brand); color: #000; font-size: .75rem; font-weight: 800; border-radius: 9999px; border: none; cursor: pointer; transition: all .2s; display:flex; align-items:center; gap:6px; }
.watch-next-btn:hover { background: #fff; transform: translateX(2px); }
.countdown-ring { flex-shrink:0; }
.watch-title { font-size: 1.3rem; font-weight: 900; color: #fff; line-height: 1.25; margin: 10px 0 14px; letter-spacing:-.01em; }
.watch-meta { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 14px; flex-wrap: wrap; }
.watch-stat label { font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: #444; display: block; margin-bottom:2px; }
.watch-stat span  { font-size: .95rem; font-weight: 800; color: #ddd; }
.watch-divider { width: 1px; height: 30px; background: var(--border); flex-shrink:0; }
.share-btn { display: flex; align-items: center; gap: 6px; padding: 7px 14px; background: rgba(255,255,255,.06); border: 1px solid var(--border); border-radius: 9999px; font-size: .74rem; font-weight: 700; color: #aaa; cursor: pointer; transition: all .2s; }
.share-btn:hover { background: rgba(255,255,255,.12); color: #fff; border-color:#555; }
.watch-desc { font-size: .82rem; color: #555; line-height: 1.7; font-weight: 500; margin-top:12px; }
.watch-desc-expand { font-size:.75rem; font-weight:700; color:var(--brand); cursor:pointer; margin-top:4px; display:inline-block; }
.watch-tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.watch-tag { font-size:.7rem; font-weight:700; color:#555; background:rgba(255,255,255,.04); border:1px solid var(--border); border-radius:9999px; padding:3px 10px; transition:all .2s; cursor:pointer; }
.watch-tag:hover { color:var(--brand); border-color:var(--brand); }

/* ══ LIKE/DISLIKE ══ */
.react-row { display:flex; align-items:center; gap:8px; margin:14px 0; }
.react-btn { display:flex; align-items:center; gap:6px; padding:7px 16px; background:var(--bg2); border:1px solid var(--border2); border-radius:9999px; font-size:.78rem; font-weight:700; color:#aaa; cursor:pointer; transition:all .2s; }
.react-btn:hover { border-color:#555; color:#fff; }
.react-btn.liked  { background:rgba(34,197,94,.12);  border-color:rgba(34,197,94,.4);  color:#22c55e; }
.react-btn.disliked { background:rgba(239,68,68,.12); border-color:rgba(239,68,68,.4); color:#ef4444; }
.react-btn svg { width:15px; height:15px; fill:currentColor; }

/* ══ SHARE PANEL ══ */
.share-panel { display:none; position:absolute; right:0; top:calc(100% + 8px); background:var(--bg2); border:1px solid var(--border2); border-radius:14px; padding:10px; z-index:50; min-width:200px; box-shadow:0 8px 32px rgba(0,0,0,.5); }
.share-panel.open { display:block; animation:fadeUp .18s ease both; }
.share-option { display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:9px; cursor:pointer; font-size:.8rem; font-weight:700; color:#bbb; transition:all .15s; border:none; background:none; width:100%; text-align:left; }
.share-option:hover { background:rgba(255,255,255,.06); color:#fff; }
.share-option svg { width:16px; height:16px; flex-shrink:0; }
.share-wrap { position:relative; }

/* ══ COMMENTS ══ */
.comments-section { margin-top:24px; padding-top:20px; border-top:1px solid var(--border); }
/* Username setup */
.username-setup-card { background:var(--bg3); border:1px solid var(--border2); border-radius:14px; padding:20px; margin-bottom:20px; text-align:center; }
.username-setup-icon { font-size:1.8rem; margin-bottom:8px; }
.username-setup-title { font-size:.92rem; font-weight:800; color:#fff; margin-bottom:4px; }
.username-setup-desc { font-size:.75rem; color:#555; margin-bottom:14px; line-height:1.5; }
.username-setup-row { text-align:left; }
.username-display-row { display:flex; align-items:center; gap:8px; margin-bottom:7px; }
.username-display-name { font-size:.82rem; font-weight:800; color:#ddd; }
.username-display-badge { font-size:.62rem; font-weight:800; color:#22c55e; background:rgba(34,197,94,.1); padding:2px 8px; border-radius:9999px; border:1px solid rgba(34,197,94,.2); }
.comments-title { font-size:.95rem; font-weight:800; color:#fff; margin-bottom:16px; display:flex; align-items:center; gap:8px; }
.comment-form { display:flex; gap:10px; margin-bottom:20px; }
.comment-avatar { width:34px; height:34px; border-radius:50%; background:var(--brand); display:flex; align-items:center; justify-content:center; font-size:.8rem; font-weight:800; color:#000; flex-shrink:0; }
.comment-avatar.sm { width:26px; height:26px; font-size:.68rem; }
.comment-input-wrap { flex:1; }
.comment-name-row { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.comment-name-input { flex:1; background:var(--bg3); border:1px solid var(--border2); border-radius:8px; padding:7px 12px; color:var(--text); font-size:.78rem; outline:none; font-family:inherit; transition:border-color .2s; }
.comment-name-input:focus { border-color:var(--brand); }
.comment-name-input:disabled { opacity:.5; cursor:not-allowed; }
.name-locked-badge { font-size:.65rem; color:#22c55e; font-weight:700; white-space:nowrap; }
.comment-text-input { width:100%; background:var(--bg3); border:1px solid var(--border2); border-radius:10px; padding:9px 12px; color:var(--text); font-size:.82rem; outline:none; resize:none; min-height:72px; font-family:inherit; transition:border-color .2s; }
.comment-text-input:focus { border-color:var(--brand); }
.comment-submit { margin-top:6px; padding:7px 18px; background:var(--brand); color:#000; font-size:.76rem; font-weight:800; border:none; border-radius:9999px; cursor:pointer; transition:all .2s; }
.comment-submit:hover { background:#fff; }
.comment-item { display:flex; gap:10px; margin-bottom:14px; }
.comment-body { flex:1; min-width:0; }
.comment-author { font-size:.78rem; font-weight:800; color:#ddd; margin-bottom:3px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.comment-time { font-size:.65rem; color:#555; font-weight:500; }
.comment-text { font-size:.82rem; color:#888; line-height:1.6; margin-bottom:6px; }
.comment-actions { display:flex; align-items:center; gap:12px; }
.comment-reply-btn { background:none; border:none; color:#555; font-size:.72rem; font-weight:700; cursor:pointer; padding:0; transition:color .2s; }
.comment-reply-btn:hover { color:var(--brand); }
.comment-delete { background:none; border:none; color:#444; font-size:.7rem; cursor:pointer; padding:2px 6px; border-radius:4px; transition:all .2s; }
.comment-delete:hover { color:#ef4444; background:rgba(239,68,68,.1); }
/* Nested replies */
.replies-wrap { margin-top:10px; padding-left:14px; border-left:2px solid rgba(255,255,255,.06); display:flex; flex-direction:column; gap:10px; }
.reply-form-wrap { margin-top:8px; }
.reply-form { display:flex; gap:8px; }
.reply-text-input { flex:1; background:var(--bg3); border:1px solid var(--border2); border-radius:8px; padding:7px 11px; color:var(--text); font-size:.78rem; outline:none; resize:none; min-height:54px; font-family:inherit; transition:border-color .2s; }
.reply-text-input:focus { border-color:var(--brand); }
.reply-submit { align-self:flex-end; padding:6px 14px; background:var(--brand); color:#000; font-size:.72rem; font-weight:800; border:none; border-radius:9999px; cursor:pointer; transition:all .2s; }
.reply-submit:hover { background:#fff; }
.reply-cancel { align-self:flex-end; padding:6px 10px; background:none; border:1px solid var(--border2); color:#666; font-size:.72rem; font-weight:700; border-radius:9999px; cursor:pointer; margin-left:4px; transition:all .2s; }
.reply-cancel:hover { color:#fff; border-color:#555; }
.view-more-replies { background:none; border:none; color:var(--brand); font-size:.72rem; font-weight:700; cursor:pointer; padding:4px 0; transition:opacity .2s; }
.view-more-replies:hover { opacity:.75; }
.replying-to { font-size:.7rem; color:#555; margin-bottom:4px; }
.comments-empty { font-size:.82rem; color:#444; padding:16px 0; }
.comments-loading { display:flex; gap:6px; align-items:center; color:#444; font-size:.78rem; padding:10px 0; }

/* ══ PLAYLIST PROGRESS ══ */
.pl-item.watched .pl-thumb::after { content:'✓'; position:absolute; inset:0; background:rgba(34,197,94,.35); display:flex; align-items:center; justify-content:center; font-size:1.1rem; color:#fff; font-weight:900; }
.pl-watched-dot { width:7px; height:7px; border-radius:50%; background:#22c55e; flex-shrink:0; margin-left:auto; }

.playlist-panel { background: linear-gradient(135deg, rgba(242,125,38,.06), rgba(0,0,0,0)); border: 1px solid rgba(242,125,38,.15); border-radius: 14px; padding: 14px; margin-bottom: 18px; }
.playlist-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom:10px; border-bottom:1px solid rgba(242,125,38,.1); }
.playlist-label { font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .15em; color: var(--brand); display:flex; align-items:center; gap:6px; }
.playlist-progress { font-size: .7rem; font-weight: 800; background: rgba(242,125,38,.15); color: var(--brand); padding: 3px 10px; border-radius: 9999px; border:1px solid rgba(242,125,38,.2); }
.playlist-items { max-height: 340px; overflow-y: auto; }

.pl-item { display: flex; gap: 9px; padding: 6px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; transition: all .18s; }
.pl-item:hover { background: rgba(255,255,255,.04); }
.pl-item.current { background: rgba(242,125,38,.08); border-color: rgba(242,125,38,.22); }
.pl-thumb { width: 70px; aspect-ratio: 16/9; border-radius: 6px; overflow: hidden; background: #1a1a1a; flex-shrink: 0; position: relative; }
.pl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pl-thumb-overlay { position: absolute; inset: 0; background: rgba(242,125,38,.38); display: flex; align-items: center; justify-content: center; }
.pl-title { font-size: .73rem; font-weight: 700; color: #bbb; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.pl-item.current .pl-title { color: var(--brand); }
.pl-dur { font-size: .65rem; color: #555; font-weight: 600; margin-top: 3px; }

.suggested-title { font-size: .85rem; font-weight: 800; color: #888; text-transform:uppercase; letter-spacing:.1em; margin-bottom: 14px; padding-bottom:8px; border-bottom:1px solid var(--border); }
.sugg-item { display: flex; gap: 10px; margin-bottom: 13px; cursor: pointer; }
.sugg-thumb { width: 118px; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: #1a1a1a; flex-shrink: 0; position: relative; }
.sugg-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.sugg-item:hover .sugg-thumb img { transform: scale(1.05); }
.sugg-dur { position: absolute; bottom: 4px; right: 4px; font-size: .61rem; font-weight: 700; background: rgba(0,0,0,.8); color: #fff; padding: 1px 5px; border-radius: 3px; }
.sugg-info { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; }
.sugg-title-text { font-size: .76rem; font-weight: 700; color: #bbb; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.sugg-item:hover .sugg-title-text { color: var(--brand); }
.sugg-meta { font-size: .67rem; font-weight: 600; color: #555; }
.sugg-meta em { color: var(--brand); font-style: normal; }

/* ══ CATEGORY / SEARCH ══ */
/* ── Category Banner ── */
.cat-banner { position:relative; width:100%; padding-top:60px; min-height:280px; display:flex; align-items:flex-end; overflow:hidden; }
.cat-banner-bg { position:absolute; inset:0; background-size:cover; background-position:center; filter:blur(18px) brightness(.35) saturate(1.4); transform:scale(1.08); transition:background-image .4s; }
.cat-banner-overlay { position:absolute; inset:0; background:linear-gradient(to bottom, rgba(8,8,8,.2) 0%, rgba(8,8,8,.5) 60%, rgba(8,8,8,1) 100%); }
.cat-banner-content { position:relative; z-index:2; max-width:1280px; width:100%; margin:0 auto; padding:32px 24px 36px; display:flex; align-items:center; gap:18px; }
.cat-banner-icon { width:56px; height:56px; background:rgba(242,125,38,.15); border:1px solid rgba(242,125,38,.25); border-radius:16px; display:flex; align-items:center; justify-content:center; flex-shrink:0; color:var(--brand); }
.cat-banner-icon svg { width:24px; height:24px; }
.cat-banner-title { font-size:2.2rem; font-weight:900; color:#fff; letter-spacing:-.03em; line-height:1; text-shadow:0 2px 12px rgba(0,0,0,.5); }
.cat-banner-meta { font-size:.8rem; color:rgba(255,255,255,.45); margin-top:6px; font-weight:600; }
@media (max-width:640px) {
  .cat-banner { min-height:200px; }
  .cat-banner-title { font-size:1.6rem; }
  .cat-banner-content { padding:24px 14px 28px; gap:14px; }
  .cat-banner-icon { width:44px; height:44px; border-radius:12px; }
}
.page-header { max-width: 1280px; margin: 0 auto; padding: 68px 24px 0; }
@media (max-width: 640px) { .page-header { padding: 58px 14px 0; } }
@media (max-width: 960px) { #page-search { min-height: 100vh; padding-bottom: 80px; } }
.page-header-row { display: flex; align-items: center; gap: 14px; padding: 24px 0 18px; }
.page-header-icon { width: 48px; height: 48px; background: rgba(242,125,38,.1); border-radius: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.page-header-icon svg { fill: var(--brand); width: 22px; height: 22px; }
.page-header-title { font-size: 1.9rem; font-weight: 900; color: #fff; letter-spacing: -.03em; }
.page-header-desc { font-size: .82rem; color: #666; margin-top: 3px; }
.page-content { max-width: 1280px; margin: 0 auto; padding: 0 24px 60px; }
@media (max-width: 640px) { .page-content { padding: 0 14px 40px; } }

.back-btn { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 700; color: #777; background: none; border: none; cursor: pointer; padding: 0; margin-bottom: 18px; transition: color .2s; }
.back-btn:hover { color: #fff; }
.back-btn svg { stroke: #777; transition: stroke .2s; }
.back-btn:hover svg { stroke: #fff; }

.empty-state { text-align: center; padding: 80px 20px; }
.empty-state-icon { font-size: 2.8rem; margin-bottom: 14px; opacity: .25; }
.empty-state p { font-size: .95rem; font-weight: 700; color: #444; }

/* ══ FOOTER ══ */
/* ── Full footer (home only) ── */
footer { border-top: 1px solid var(--border); padding: 48px 32px 32px; text-align: center; }
.footer-logo { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.footer-desc { font-size: .8rem; color: #555; max-width: 440px; margin: 0 auto 20px; line-height: 1.6; }
.footer-links { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.footer-links a { font-size: .72rem; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: .08em; transition: color .2s; }
.footer-links a:hover { color: var(--brand); }
.footer-links a.active { color: var(--brand); }
.footer-copy { font-size: .7rem; color: #333; margin-top: 8px; }

/* ── Slim footer (inner pages) ── */
.slim-footer { border-top: 1px solid var(--border); padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.slim-footer-copy { font-size: .7rem; color: #333; }
.slim-footer-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.slim-footer-links a { font-size: .7rem; font-weight: 700; color: #444; text-transform: uppercase; letter-spacing: .06em; transition: color .2s; }
.slim-footer-links a:hover { color: var(--brand); }
@media (max-width: 640px) {
  .slim-footer { justify-content: center; text-align: center; }
  .slim-footer-links { justify-content: center; }
}

/* ══ PAGE TRANSITIONS ══ */
.page { animation: none; }
.page.active { animation: fadeUp .28s ease both; }
@keyframes fadeUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }

/* ══ MOBILE BOTTOM NAV ══ */
#bottom-nav { display:none; position:fixed; bottom:0; left:0; right:0; z-index:300; background:rgba(10,10,10,.97); border-top:1px solid var(--border); padding:8px 0 max(8px,env(safe-area-inset-bottom)); }
#bottom-nav a { display:flex; flex-direction:column; align-items:center; gap:3px; flex:1; font-size:.58rem; font-weight:700; color:#555; text-transform:uppercase; letter-spacing:.06em; text-decoration:none; padding:4px 0; transition:color .2s; }
#bottom-nav a.active, #bottom-nav a:hover { color:var(--brand); }
#bottom-nav svg { width:20px; height:20px; }
#bottom-nav-row { display:flex; align-items:center; }
@media (max-width:767px) { #bottom-nav { display:block; } body { padding-bottom:68px; } }

/* ══ HISTORY / CONTINUE WATCHING ══ */
.history-strip { display:flex; gap:10px; overflow-x:auto; padding-bottom:4px; }
.history-chip { flex-shrink:0; display:flex; align-items:center; gap:8px; background:#1a1a1a; border:1px solid var(--border); border-radius:9999px; padding:5px 12px 5px 5px; cursor:pointer; transition:border-color .2s; }
.history-chip:hover { border-color:var(--brand); }
.history-chip img { width:36px; height:36px; border-radius:50%; object-fit:cover; }
.history-chip-title { font-size:.72rem; font-weight:700; color:#ccc; max-width:120px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ══ SEARCH RESULTS HIGHLIGHT ══ */
.search-highlight { background:rgba(242,125,38,.18); color:var(--brand); border-radius:3px; padding:0 2px; }

/* ══ SCROLL TO TOP BTN ══ */
#scroll-top { position:fixed; bottom:80px; right:20px; z-index:250; width:38px; height:38px; background:var(--brand); border:none; border-radius:50%; color:#000; font-size:1.1rem; cursor:pointer; opacity:0; pointer-events:none; transition:opacity .25s, transform .25s; display:flex; align-items:center; justify-content:center; box-shadow:0 4px 14px rgba(242,125,38,.4); }
#scroll-top.visible { opacity:1; pointer-events:auto; }
#scroll-top:hover { transform:scale(1.1); }
@media (max-width:767px) { #scroll-top { bottom:88px; } }

/* ══ BETTER SEARCH BAR ══ */


/* ══ VIDEO CARD PROGRESS BAR ══ */
.vcard-progress { position:absolute; bottom:0; left:0; height:3px; background:var(--brand); border-radius:0 0 0 10px; transition:width .3s; }

/* ══ RELATED TAG CHIPS ══ */
.tag-chips { display:flex; gap:6px; flex-wrap:wrap; margin-top:12px; }
.tag-chip { font-size:.68rem; font-weight:700; color:#888; background:#1a1a1a; border:1px solid #2a2a2a; border-radius:9999px; padding:3px 10px; cursor:pointer; transition:all .2s; }
.tag-chip:hover { color:#fff; border-color:#444; background:#222; }

/* ══ LOADING OVERLAY ══ */
#page-loader { position:fixed; inset:0; background:#0a0a0a; z-index:9000; display:flex; align-items:center; justify-content:center; transition:opacity .4s; }
#page-loader.hidden { opacity:0; pointer-events:none; }
.loader-ring { width:40px; height:40px; border:3px solid #1a1a1a; border-top-color:var(--brand); border-radius:50%; animation:spin .7s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
