:root{
  --bg:#0b0d12;
  --panel:#111522;
  --panel2:#0f1320;
  --text:#e8ecf3;
  --muted:#a9b2c3;
  --stroke:rgba(255,255,255,.10);
  --shadow: 0 18px 55px rgba(0,0,0,.55);
  --radius: 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(1100px 600px at 15% 0%, rgba(88,101,242,.22) 0%, rgba(88,101,242,0) 55%),
    radial-gradient(900px 500px at 95% 10%, rgba(255,45,85,.20) 0%, rgba(255,45,85,0) 55%),
    var(--bg);
  color:var(--text);
}

/* Top bar */
.topbar{
  position:sticky; top:0;
  z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  gap:14px;
  padding:14px 18px;
  background: rgba(11,13,18,.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.brand{display:flex; align-items:center; gap:10px; min-width: 160px}
.logo{
  width:34px;height:34px;border-radius:12px;
  background: linear-gradient(135deg, #ff2d55 0%, #7c3aed 55%, #22c55e 100%);
  display:grid; place-items:center;
  font-weight:900;
}
.name{font-weight:800; letter-spacing:.2px}

.searchWrap{
  display:flex; align-items:center; gap:8px;
  width:min(520px, 100%);
  flex:1;
  justify-content:flex-end;
}
.search{
  width:100%;
  padding:11px 12px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.10);
  outline:none;
  background: rgba(17,21,34,.9);
  color:var(--text);
}
.search::placeholder{color:rgba(232,236,243,.55)}

/* Buttons */
.btn{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.10);
  color:var(--text);
  border-radius: 14px;
  padding:10px 12px;
  cursor:pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover{background: rgba(255,255,255,.15); transform: translateY(-1px);}
.btn:active{transform: translateY(0px);}
.btn.ghost{background: transparent}

/* Layout */
.container{padding: 18px}

/* Hero */
.hero{
  position:relative;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.09);
  background: linear-gradient(135deg, rgba(255,45,85,.16), rgba(124,58,237,.12), rgba(34,197,94,.10));
  border-radius: 22px;
  box-shadow: var(--shadow);
  margin: 6px 0 18px 0;
}
.heroGlow{
  position:absolute; inset:-80px;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 55%);
  filter: blur(20px);
  opacity: .55;
}
.heroInner{
  position:relative;
  padding: 22px;
  min-height: 160px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap: 10px;
}
.heroTag{
  display:inline-block;
  width:fit-content;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.30);
  color: rgba(232,236,243,.85);
}
.heroTitle{
  margin:0;
  font-size: clamp(22px, 3vw, 36px);
  letter-spacing: .2px;
}
.heroText{
  margin:0;
  color: rgba(232,236,243,.75);
  max-width: 62ch;
  line-height: 1.35;
}
.heroBtns{
  margin-top: 6px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.status{
  color:var(--muted);
  margin: 10px 2px 18px 2px
}

/* Rows (Netflix rails) */
.row{margin: 16px 0 28px 0}
.rowTitle{
  font-size: 16px;
  font-weight: 800;
  margin: 10px 4px;
}
.rail{
  display:flex;
  gap:12px;
  overflow:auto;
  padding: 6px 4px 12px 4px;
  scroll-snap-type: x mandatory;
}
.card{
  flex: 0 0 190px;
  scroll-snap-align: start;
  background: rgba(17,21,34,.75);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  cursor:pointer;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover{transform: translateY(-3px) scale(1.02); border-color: rgba(255,255,255,.22)}
.thumb{
  width:100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(255,45,85,.35), rgba(124,58,237,.25), rgba(34,197,94,.22));
  position:relative;
}
.thumb img{
  width:100%; height:100%;
  object-fit: cover;
  display:block;
}
.badge{
  position:absolute;
  left:10px; top:10px;
  padding:6px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(0,0,0,.55);
  border:1px solid rgba(255,255,255,.12);
}
.info{padding: 10px 11px 12px 11px}
.title{
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
  min-height: 33px;
}
.sub{
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  display:flex;
  gap:8px;
  align-items:center;
}

/* Modal player */
.modal.hidden{display:none}
.modal{
  position:fixed; inset:0;
  z-index:100;
  display:grid;
  place-items:center;
}
.modalBackdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.62);
}
.modalCard{
  position:relative;
  width:min(980px, 92vw);
  background: rgba(15,19,32,.95);
  border:1px solid rgba(255,255,255,.10);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 14px;
}
.modalTop{
  display:flex; justify-content:space-between; align-items:center;
  gap:12px;
  margin-bottom: 10px;
}
.modalTitle{font-weight:900}
.modalActions{display:flex; gap:8px; align-items:center}
video{
  width:100%;
  max-height: 64vh;
  border-radius: 18px;
  background:#000;
  border:1px solid rgba(255,255,255,.10);
}
.meta{
  margin-top: 10px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.pill{
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.12);
  color: var(--muted);
  background: rgba(255,255,255,.06);
}
.mono{font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;}
.hint{
  margin-top: 10px;
  color: rgba(232,236,243,.55);
  font-size: 12px;
  line-height: 1.35;
}