:root{
  --bg:#0b0f1a;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.09);
  --border: rgba(255,255,255,.12);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.65);
  --muted2: rgba(255,255,255,.45);
  --brand: #7c5cff;
  --brand2:#22c55e;
  --danger:#ef4444;
  --shadow: 0 12px 40px rgba(0,0,0,.35);
  --radius: 16px;
  --radius2: 22px;
  --max: 1100px;
  --ring: 0 0 0 3px rgba(124,92,255,.25);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(124,92,255,.25), transparent 55%),
    radial-gradient(900px 500px at 90% 25%, rgba(34,197,94,.18), transparent 55%),
    radial-gradient(700px 400px at 60% 90%, rgba(56,189,248,.12), transparent 55%),
    var(--bg);
}

a{color:inherit; text-decoration:none}
.container{max-width:var(--max); margin:0 auto; padding:18px 14px 40px}
.row{display:flex; gap:12px; align-items:center; flex-wrap:wrap}
.spacer{flex:1}
.hr{height:1px; background:var(--border); margin:14px 0}

.topnav{
  position:sticky; top:0; z-index:5;
  backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(11,15,26,.88), rgba(11,15,26,.55));
  border-bottom:1px solid var(--border);
}

.brand{
  display:flex; align-items:center; gap:10px;
  font-weight:800; letter-spacing:.2px;
}
.brand-badge{
  width:38px; height:38px; border-radius:12px;
  background: linear-gradient(135deg, rgba(124,92,255,.95), rgba(34,197,94,.75));
  box-shadow: var(--shadow);
}

.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  border-radius:999px;
  color:var(--text);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.pill:hover{transform: translateY(-1px); background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.18)}
.pill.primary{
  background: linear-gradient(135deg, rgba(124,92,255,.95), rgba(124,92,255,.60));
  border-color: rgba(124,92,255,.35);
}
.pill.danger{
  background: rgba(239,68,68,.14);
  border-color: rgba(239,68,68,.35);
}

.card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
}
.card-pad{padding:14px}
.card-soft{
  background: rgba(255,255,255,.04);
  border:1px solid var(--border);
  border-radius: var(--radius);
}

.input, .select, .textarea{
  width:100%;
  padding:12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.22);
  color: var(--text);
  outline:none;
}
.input:focus, .select:focus, .textarea:focus{
  box-shadow: var(--ring);
  border-color: rgba(124,92,255,.5);
}
.textarea{min-height:110px; resize:vertical}
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 14px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover{transform: translateY(-1px); background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.18)}
.btn.primary{
  background: linear-gradient(135deg, rgba(124,92,255,.95), rgba(124,92,255,.60));
  border-color: rgba(124,92,255,.35);
}
.btn.ghost{background: transparent}
.btn.danger{background: rgba(239,68,68,.14); border-color: rgba(239,68,68,.35)}

.grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap:14px;
  margin-top: 14px;
}
.thumb{
  width:100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 16px;
  display:block;
  background: #000;
  border: 1px solid rgba(255,255,255,.10);
}
.title{font-weight:800; letter-spacing:.1px; margin:10px 0 4px}
.meta{color:var(--muted); font-size:12px}
.desc{color: rgba(255,255,255,.82); line-height:1.45}

.player{
  width:100%;
  border-radius: 18px;
  background:#000;
  border:1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow);
}

.kbd{
  font-size:12px;
  color: var(--muted);
  border:1px solid var(--border);
  padding:3px 8px;
  border-radius:999px;
  background: rgba(255,255,255,.03);
}

.comment{
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  border-radius: 16px;
  padding: 12px;
  margin: 10px 0;
}
.comment .meta{margin-bottom:6px}
.hidden-note{color:#ffb4b4; font-size:12px}

.footer{
  margin-top: 22px;
  color: var(--muted2);
  font-size: 12px;
}

.layout{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap:14px;
  margin-top:14px;
}
@media (max-width: 920px){
  .layout{ grid-template-columns: 1fr; }
}
.sticky{
  position: sticky;
  top: 86px; /* below nav */
}
.section-title{
  font-weight:900;
  letter-spacing:.15px;
  margin:0 0 10px;
}
.small{font-size:12px; color: var(--muted);}

/* Skeleton loading */
.skel{
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
}
.skel::after{
  content:"";
  position:absolute; inset:0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent);
  animation: skel 1.2s infinite;
}
@keyframes skel{
  100% { transform: translateX(100%); }
}
.skel-line{ height: 12px; margin: 8px 0; border-radius: 999px; }
.skel-btn{ height: 34px; width: 100%; border-radius: 999px; margin: 8px 0; }
.skel-thumb{ aspect-ratio:16/9; border-radius:16px; margin-bottom:10px; }
.skel-card{ border-radius: var(--radius2); padding: 12px; }

.watch-layout{
  display:grid;
  grid-template-columns: 1fr 360px;
  gap:14px;
  margin-top:14px;
}
@media (max-width: 980px){
  .watch-layout{ grid-template-columns: 1fr; }
}
.upnext-item{
  display:flex;
  gap:10px;
  padding:10px;
  border-radius: 16px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.upnext-item:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.18);
}
.upnext-thumb{
  width: 140px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 14px;
  background:#000;
  border:1px solid rgba(255,255,255,.10);
  flex: 0 0 auto;
}
.toggle{
  display:flex; align-items:center; gap:10px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
}
.switch{
  width:44px; height:26px; border-radius:999px;
  background: rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.14);
  position:relative;
  cursor:pointer;
}
.switch::after{
  content:"";
  position:absolute; top:50%; left:4px;
  width:18px; height:18px; border-radius:999px;
  transform: translateY(-50%);
  background: rgba(255,255,255,.85);
  transition: left .15s ease;
}
.switch.on{
  background: rgba(34,197,94,.22);
  border-color: rgba(34,197,94,.35);
}
.switch.on::after{ left: 22px; }
