:root{
  --bg:#000;
  --panel:#0a0a0a;
  --panel2:#101010;
  --border:rgba(255,255,255,.10);
  --text:#fff;
  --muted:#bdbdbd;
  --muted2:#8f8f8f;
  --accent:#e50914;
  --shadow: 0 14px 34px rgba(0,0,0,.60);
  --r:18px;
  --r2:14px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a{color:inherit; text-decoration:none}
img{display:block; max-width:100%}

.container{
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 14px 96px;
}

/* Top bar */
.topbar{
  position:sticky;
  top:0;
  z-index:20;
  padding: 12px 14px;
  background: linear-gradient(to bottom, rgba(0,0,0,.96), rgba(0,0,0,.62));
  backdrop-filter: blur(10px);
  border-bottom:1px solid rgba(255,255,255,.06);
}
.topbarRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.brand{
  font-weight: 1000;
  letter-spacing:.6px;
  font-size: 18px;
}
.brand .dot{color:var(--accent)}
.iconBtn{
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:#fff;
  height:40px;
  padding:0 12px;
  border-radius: var(--r2);
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  user-select:none;
}
.iconBtn:active{transform: scale(.98)}
.iconBtn .tiny{font-size:12px; color: var(--muted)}
.searchBar{
  margin-top: 10px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.input{
  flex:1;
  min-width: 190px;
  height:44px;
  padding:0 14px;
  border-radius: var(--r2);
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color:#fff;
  outline:none;
}
.select{
  height:44px;
  padding:0 14px;
  border-radius: var(--r2);
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color:#fff;
  outline:none;
}
.btn{
  height:44px;
  padding:0 14px;
  border-radius: var(--r2);
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color:#fff;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-weight: 900;
  user-select:none;
}
.btn:active{transform:scale(.99)}
.btn.primary{
  background: var(--accent);
  border-color: var(--accent);
}
.btn.danger{
  background: #2a0b0b;
  border-color: #3a0b0b;
  color: #ffb4b4;
}

.sectionTitle{
  margin: 14px 0 10px;
  font-size: 15px;
  font-weight: 1000;
  letter-spacing:.3px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.sectionTitle .sub{
  font-size:12px;color:var(--muted2);font-weight:800
}

/* Grid cards */
.grid{
  display:grid;
  gap:12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (min-width: 520px){ .grid{grid-template-columns: repeat(4, minmax(0, 1fr));} }
@media (min-width: 800px){ .grid{grid-template-columns: repeat(6, minmax(0, 1fr));} }

.card{ position:relative; }

.poster{
  aspect-ratio: 2/3;
  border-radius: 16px;
  overflow:hidden;
  background:#0b0b0b;
  border:1px solid rgba(255,255,255,.08);
  box-shadow: 0 10px 25px rgba(0,0,0,.45);
  position:relative;
}
.poster img{ width:100%; height:100%; object-fit:cover; }

.badge{
  position:absolute;
  top:10px; left:10px;
  background: rgba(0,0,0,.70);
  border: 1px solid rgba(255,255,255,.10);
  padding: 6px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 1000;
}

.metaRow{ padding-top:8px; }
.title{
  font-weight: 1000;
  font-size: 13px;
  line-height: 1.2;
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}
.meta{
  color: var(--muted2);
  font-size: 12px;
  margin-top:4px;
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

/* ✅ FIX: 3-dots click area */
.dotsBtn{
  position:absolute;
  top:10px;
  right:10px;
  width:36px;
  height:36px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.72);
  border:1px solid rgba(255,255,255,.12);
  font-size: 18px;
  cursor:pointer;
  user-select:none;
  z-index:6;
}
.dotsBtn:active{transform:scale(.98)}

.menu{
  position:absolute;
  right:10px;
  top:52px;
  background: #0b0b0b;
  border:1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 8px;
  min-width: 180px;
  display:none;
  z-index:30;
  box-shadow: var(--shadow);
}
.menu.show{display:block}
.menu button{
  width:100%;
  text-align:left;
  padding: 10px 12px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color:#fff;
  cursor:pointer;
  font-weight: 1000;
}
.menu button.danger{
  background:#2a0b0b;
  border-color:#3a0b0b;
  color:#ffb4b4;
}

/* Bottom nav */
.bottomNav{
  position:fixed;
  left:0; right:0; bottom:0;
  z-index:40;
  background: rgba(0,0,0,.90);
  border-top:1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
}
.bottomNavInner{
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 12px;
  display:flex;
  justify-content:space-around;
  gap:10px;
}
.navItem{
  flex:1;
  text-align:center;
  padding: 10px 8px;
  border-radius: 16px;
  border:1px solid transparent;
  color: var(--muted2);
  font-weight: 1000;
  font-size: 12px;
  background: transparent;
}
.navItem.active{
  color:#fff;
  border-color: rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
}
.navItem .emoji{display:block; font-size: 18px; margin-bottom:4px}

/* Watch page (modern look without changing player logic) */
.watchHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin: 6px 0 12px;
}
.watchTitle{
  font-size: 16px;
  font-weight: 1100;
  line-height: 1.2;
}
.playerWrap{
  border-radius: 18px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  background:#000;
  box-shadow: var(--shadow);
}
.player{ width:100%; background:#000; }
.bigBadge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 1100;
}
.plot{
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
  margin-top: 10px;
}

/* Add page */
.cardBox{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.row{ display:flex; gap:10px; flex-wrap:wrap; }
.col{ flex:1; min-width: 210px; }
.label{ font-size:12px; color: var(--muted2); font-weight: 1000; margin: 10px 0 6px; }
.posterPreview{
  border-radius: 16px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  background:#0b0b0b;
  aspect-ratio: 2/3;
  max-width: 220px;
}
.posterPreview img{ width:100%; height:100%; object-fit:cover; }

/* Jobs */
.jobCard{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.jobTop{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.jobTitle{ font-weight: 1100; font-size: 14px; }
.jobMeta{ color: var(--muted2); font-size: 12px; margin-top:4px; }
.progress{
  height:10px;
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  overflow:hidden;
  margin-top: 10px;
}
.progress > div{
  height:100%;
  width:0%;
  background: var(--accent);
}
.mini{ font-size:12px; color: var(--muted); margin-top: 8px; }
.actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top: 10px; }

/* Login */
.loginWrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.loginCard{
  width:100%;
  max-width: 430px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid rgba(255,255,255,.12);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.loginBrand{
  font-size: 22px;
  font-weight: 1200;
  letter-spacing: .6px;
}
.loginSub{color: var(--muted); margin-top:8px; margin-bottom: 14px}
.loginErr{
  background:#2a0b0b;
  border:1px solid #3a0b0b;
  color:#ffb4b4;
  padding: 12px;
  border-radius: 16px;
  margin-bottom: 12px;
  font-weight: 1000;
}
.smallHint{color: var(--muted2); font-size: 12px; margin-top: 10px}

