:root{
  --bg:#0b0f14;
  --panel:#0f1621;
  --text:#e9eef7;
  --muted:#9cb0c9;
  --line:rgba(255,255,255,.08);
  --accent:#4cc9f0;
  --accent2:#b5179e;
  --shadow: 0 18px 60px rgba(0,0,0,.55);
  --r:18px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background:
    radial-gradient(1200px 800px at 20% -10%, rgba(76,201,240,.16), transparent 50%),
    radial-gradient(1000px 700px at 110% 10%, rgba(181,23,158,.12), transparent 45%),
    var(--bg);
  color:var(--text);
}
a{color:inherit;text-decoration:none}
.wrap{max-width:1200px;margin:0 auto;padding:22px 18px 60px}

.topbar{
  position:sticky; top:0; z-index:20;
  background: rgba(11,15,20,.72);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
  padding:14px 16px;
  display:flex; align-items:center; justify-content:space-between;
}
.brand{display:flex; align-items:center; gap:12px}
.logo-dot{
  width:14px;height:14px;border-radius:999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 0 6px rgba(76,201,240,.12);
}
.brand-link{font-weight:800; letter-spacing:.2px}
.brand-sub{color:var(--muted); font-size:12px; margin-left:4px}

.search{display:flex; align-items:center; gap:8px; background:rgba(255,255,255,.04);
  border:1px solid var(--line); border-radius:999px; padding:8px 10px; min-width:320px}
.search input{
  width:100%;
  background:transparent; border:0; outline:none; color:var(--text);
  font-size:14px;
}
.btn{
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color:var(--text);
  padding:9px 12px;
  border-radius:12px;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover{transform: translateY(-1px); border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.08)}
.btn:active{transform: translateY(0px)}
.btn.disabled, .btn[aria-disabled="true"]{opacity:.45; pointer-events:none}
.btn-ghost{background:transparent}

.h1{margin:0; font-size:28px; letter-spacing:.2px}
.h2{margin:22px 0 12px; font-size:14px; color:var(--muted); letter-spacing:.16em; text-transform:uppercase}

.notice{
  margin:18px 0;
  padding:14px 14px;
  border:1px dashed rgba(255,255,255,.18);
  border-radius:var(--r);
  color:var(--muted);
  background: rgba(255,255,255,.03);
}

.crumbs{
  display:flex; flex-wrap:wrap; align-items:center; gap:8px;
  margin:6px 0 16px;
  color:var(--muted);
  font-size:13px;
}
.crumb{padding:6px 10px; border-radius:999px; border:1px solid transparent}
.crumb:hover{border-color:var(--line); background:rgba(255,255,255,.04)}
.crumb-sep{opacity:.6}

.section-head{
  display:flex; align-items:flex-end; justify-content:space-between; gap:14px;
  margin:8px 0 6px;
}
.meta-line{display:flex; flex-wrap:wrap; gap:8px; margin-top:10px}
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:7px 10px; border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  font-size:12px;
  color:var(--muted);
}

.grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:14px;
}
@media (max-width: 1050px){ .grid{grid-template-columns: repeat(3, 1fr);} .search{min-width:260px} }
@media (max-width: 760px){ .grid{grid-template-columns: repeat(2, 1fr);} .search{min-width:0; width: 52vw;} }
@media (max-width: 480px){ .grid{grid-template-columns: repeat(1, 1fr);} .search{width: 62vw;} }

.tile{
  border:1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border-radius: var(--r);
  overflow:hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.24);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
  position:relative;
}
.tile:hover{
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.18);
  box-shadow: var(--shadow);
}
.tile-media{
  position:relative;
  height: 150px;
  background: rgba(0,0,0,.35);
  overflow:hidden;
}
.tile-media video{
  width:100%; height:100%; object-fit:cover; display:block;
  filter: contrast(1.02) saturate(1.02);
}
.tile-gradient{
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.20), rgba(0,0,0,.72));
  pointer-events:none;
  z-index:2;
}
.tile-fallback{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  z-index:1;
}
.folder-icon{font-size:46px; opacity:.92; filter: drop-shadow(0 12px 24px rgba(0,0,0,.5));}

.tile-body{padding:12px 12px 14px}
.tile-title{font-weight:750; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.tile-sub{
  margin-top:6px;
  color:var(--muted);
  font-size:12px;
  display:flex; align-items:center; gap:8px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.dot{opacity:.6}

.list{display:flex; flex-direction:column; gap:10px}
.rowcard{
  display:flex; align-items:center; gap:12px;
  border:1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255,255,255,.03);
  padding:10px;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.rowcard:hover{transform: translateY(-2px); border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.05)}
.rowcard-media{
  position:relative;
  width: 140px; height: 78px;
  border-radius: 14px;
  overflow:hidden;
  background: rgba(0,0,0,.35);
  flex: 0 0 auto;
}
.rowcard-media video{width:100%; height:100%; object-fit:cover}
.rowcard-gradient{position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.72)); z-index:2}
.rowcard-fallback{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-size:28px; color:rgba(233,238,247,.9);
  z-index:1;
}
.rowcard-body{min-width:0; flex:1}
.rowcard-title{font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.rowcard-sub{margin-top:4px; color:var(--muted); font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.rowcard-cta{font-size:12px; color:rgba(233,238,247,.95); border:1px solid var(--line); padding:8px 10px; border-radius:999px; background: rgba(255,255,255,.04)}

.watch-top{
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  margin:10px 0 12px;
}
.watch-title{min-width:0; flex:1}
.kicker{font-size:12px; color:var(--muted); margin-bottom:6px}
.watch-nav{display:flex; gap:10px}

.player-shell{
  position:relative;
  border-radius: 22px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background:#000;
  box-shadow: var(--shadow);
}
.player{
  width:100%;
  max-height: calc(100vh - 260px);
  height:auto;
  display:block;
}
.unmute{
  position:absolute; left:18px; bottom:18px;
  border:1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.45);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 999px;
  font-weight:700;
  cursor:pointer;
  backdrop-filter: blur(10px);
}
.unmute:hover{background: rgba(0,0,0,.58)}

.watch-bottom{margin-top:14px}
.queue{margin-top:14px}
.queue-title{color:var(--muted); font-size:12px; letter-spacing:.16em; text-transform:uppercase; margin-bottom:10px}
.queue-items{display:flex; flex-direction:column; gap:8px}
.queue-item{
  display:flex; align-items:center; gap:10px;
  border:1px solid var(--line);
  border-radius: 14px;
  padding:10px 12px;
  background: rgba(255,255,255,.03);
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.queue-item:hover{transform: translateY(-1px); background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.18)}
.queue-item.active{border-color: rgba(76,201,240,.28); background: rgba(76,201,240,.08)}
.queue-dot{width:30px; height:30px; border-radius:10px; display:flex; align-items:center; justify-content:center; background: rgba(0,0,0,.28); border:1px solid var(--line)}
.queue-name{min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}

/* Autoplay previews */
.tile-media .tile-fallback, .rowcard-media .rowcard-fallback { opacity: .20; }
.tile-media.has-video .tile-fallback, .rowcard-media.has-video .rowcard-fallback { display:none; }
.tile-media video, .rowcard-media video { filter: brightness(.95) contrast(1.06) saturate(1.04); }
