:root {
  --bg: #141414;
  --bg-2: #1f1f1f;
  --bg-3: #2a2a2a;
  --border: rgba(255, 255, 255, 0.1);
  --text: #ffffff;
  --muted: #b3b3b3;
  --accent: #e50914;
  --accent-hover: #f6121d;
  --danger: #ff4d5a;
  --ok: #46d369;
  --radius: 4px;
  --gutter: clamp(16px, 4vw, 60px);
  --nav-h: 68px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); }
body { font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif; line-height: 1.5; min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
img { display: block; }
[hidden] { display: none !important; }
#app { padding-top: var(--nav-h); }
#app.flush { padding-top: 0; }

/* ---------- nav ---------- */
#nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.75) 10%, transparent); transition: background 0.4s; }
#nav.solid { background: var(--bg); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04); }
.nav-inner { display: flex; align-items: center; gap: 36px; height: var(--nav-h); padding: 0 var(--gutter); }
.logo { font-family: "Bebas Neue", Impact, sans-serif; font-size: 36px; line-height: 1; letter-spacing: 0.04em; color: var(--accent); text-transform: uppercase; white-space: nowrap; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); }
.links { display: flex; gap: 20px; font-size: 14px; color: #e5e5e5; }
.links a { transition: color 0.3s; }
.links a:hover { color: var(--muted); }
.links a.active { color: #fff; font-weight: 700; }
.search { margin-left: auto; }
.search input { width: 230px; background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 2px; padding: 7px 12px 7px 34px; outline: none; font-size: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4.5 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 10px center; background-size: 16px; }
.search input:focus { border-color: #fff; background-color: rgba(0, 0, 0, 0.85); }
.avatar { width: 32px; height: 32px; border-radius: 4px; display: grid; place-items: center; font-weight: 700; font-size: 15px; background: #0071eb; flex-shrink: 0; }

@media (max-width: 860px) {
  :root { --nav-h: 96px; }
  .nav-inner { flex-wrap: wrap; height: auto; min-height: var(--nav-h); padding-top: 10px; padding-bottom: 8px; gap: 8px 16px; }
  .logo { font-size: 30px; }
  .links { order: 3; width: 100%; overflow-x: auto; gap: 18px; scrollbar-width: none; }
  .search input { width: 150px; }
}

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: var(--radius); padding: 10px 24px; font-weight: 700; font-size: 16px; cursor: pointer; background: rgba(109, 109, 110, 0.7); color: #fff; transition: background 0.2s, opacity 0.2s; white-space: nowrap; }
.btn:hover { background: rgba(109, 109, 110, 0.45); }
.btn.primary { background: #fff; color: #000; }
.btn.primary:hover { background: rgba(255, 255, 255, 0.75); }
.btn.ghost { background: rgba(109, 109, 110, 0.7); }
.btn.accent { background: var(--accent); color: #fff; }
.btn.accent:hover { background: var(--accent-hover); }
.btn.small { padding: 7px 14px; font-size: 14px; }
.btn.danger { color: var(--danger); }
.btn.icon { padding: 10px; border-radius: 50%; background: transparent; }
.btn.icon:hover { background: rgba(255, 255, 255, 0.1); }
.btn svg { width: 22px; height: 22px; }
.btn.small svg { width: 16px; height: 16px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; font-size: 13px; color: var(--muted); }
.field input { background: #333; border: 0; border-bottom: 2px solid transparent; border-radius: var(--radius); padding: 14px 16px; outline: none; color: #fff; font-size: 16px; }
.field input:focus { background: #454545; border-bottom-color: #e87c03; }
.error { color: #e87c03; font-size: 14px; min-height: 20px; margin-bottom: 8px; }
.muted { color: var(--muted); }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(ellipse at top, rgba(229, 9, 20, 0.25), transparent 60%), radial-gradient(ellipse at bottom, rgba(0, 0, 0, 0.9), #000), #000; }
.auth-card { width: 100%; max-width: 450px; background: rgba(0, 0, 0, 0.75); border-radius: 4px; padding: 48px 56px 56px; }
@media (max-width: 520px) { .auth-card { padding: 36px 24px; } }
.auth-card .logo { display: block; text-align: center; margin-bottom: 18px; font-size: 52px; }
.auth-card h2 { font-size: 28px; font-weight: 700; color: #fff; margin-bottom: 26px; line-height: 1.2; }
.auth-card .btn { width: 100%; padding: 14px; margin-top: 10px; }
.auth-switch { margin-top: 22px; font-size: 15px; color: #737373; }
.auth-switch a { color: #fff; cursor: pointer; }
.auth-switch a:hover { text-decoration: underline; }

/* ---------- hero ---------- */
.hero { position: relative; height: min(88vh, 860px); min-height: 500px; display: flex; align-items: center; padding: var(--nav-h) var(--gutter) 0; margin-bottom: -120px; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 20%; }
.hero-bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, var(--bg) 8%, rgba(20, 20, 20, 0.85) 24%, rgba(20, 20, 20, 0.4) 46%, transparent 66%), linear-gradient(77deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.35) 45%, transparent 75%); }
.hero-content { position: relative; max-width: 560px; }
.hero h1 { font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; font-size: clamp(48px, 7vw, 100px); line-height: 0.92; letter-spacing: 0.01em; margin-bottom: 16px; text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.5); }
.hero p { color: #fff; font-size: clamp(14px, 1.3vw, 18px); margin-bottom: 24px; text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: #bcbcbc; font-size: 15px; margin-bottom: 14px; }
.meta .pill { border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 3px; padding: 0 6px; font-size: 12px; }
.meta .star { color: var(--ok); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 700px) {
  .hero { height: 70vh; align-items: flex-end; padding-bottom: 150px; }
}

/* ---------- rows & cards ---------- */
.page { padding: 30px var(--gutter) 60px; }
.section { margin: 10px 0 20px; position: relative; z-index: 1; }
.section h2 { font-size: clamp(16px, 1.4vw, 22px); font-weight: 700; color: #e5e5e5; margin: 0 var(--gutter) 0; }
.page .section h2 { margin: 0 0 12px; }
.row { display: flex; gap: 8px; overflow-x: auto; padding: 14px var(--gutter) 34px; scroll-padding: 0 var(--gutter); scroll-snap-type: x proximity; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.row > * { scroll-snap-align: start; flex-shrink: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 26px 8px; }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.card { width: clamp(130px, 13vw, 200px); cursor: pointer; display: block; position: relative; transition: transform 0.25s ease, z-index 0s 0.25s; z-index: 1; }
.grid .card { width: auto; }
.card:hover { transform: scale(1.08); z-index: 5; transition: transform 0.25s ease 0.1s, z-index 0s; }
.card .art { position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); transition: box-shadow 0.25s; }
.card:hover .art { box-shadow: 0 12px 28px rgba(0, 0, 0, 0.75); }
.card .art img { width: 100%; height: 100%; object-fit: cover; }
.card .title { font-size: 14px; font-weight: 600; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #e5e5e5; }
.card .sub { font-size: 12px; color: #8c8c8c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.landscape { width: clamp(220px, 22vw, 340px); }
.grid .card.landscape { width: auto; }
.card.landscape .art { aspect-ratio: 16 / 9; }
.placeholder { width: 100%; height: 100%; display: flex; align-items: flex-end; padding: 12px; font-family: "Bebas Neue", Impact, sans-serif; font-size: 26px; line-height: 0.95; letter-spacing: 0.02em; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.badge { position: absolute; top: 0; left: 0; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; padding: 3px 7px; border-radius: 0 0 4px 0; }
.badge.done { left: auto; right: 6px; top: 6px; border-radius: 50%; width: 22px; height: 22px; padding: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.75); color: var(--ok); border: 1px solid var(--ok); font-size: 12px; }
.bar { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 3px; background: rgba(255, 255, 255, 0.3); border-radius: 2px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.card .hide-btn { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.6); background: rgba(20, 20, 20, 0.8); cursor: pointer; opacity: 0; transition: opacity 0.2s; font-size: 12px; line-height: 1; }
.card .hide-btn:hover { border-color: #fff; }
.card:hover .hide-btn { opacity: 1; }
@media (hover: none) { .card .hide-btn { opacity: 1; } .card:hover { transform: none; } }
.empty { color: var(--muted); padding: 60px 0; text-align: center; }
.empty h3 { color: var(--text); font-size: 22px; margin-bottom: 8px; }
code { background: var(--bg-3); border-radius: 3px; padding: 2px 6px; font-size: 13px; word-break: break-all; }

/* ---------- detail ---------- */
.detail-hero { position: relative; padding: calc(var(--nav-h) + 80px) var(--gutter) 40px; min-height: 560px; display: flex; align-items: flex-end; }
.detail-hero .hero-bg::after { background: linear-gradient(to top, var(--bg) 0%, var(--bg) 6%, rgba(20, 20, 20, 0.8) 26%, rgba(20, 20, 20, 0.35) 50%, transparent 70%), linear-gradient(77deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.45) 50%, transparent 85%); }
.detail { position: relative; display: flex; gap: 36px; align-items: flex-end; width: 100%; }
.detail .poster { width: 200px; flex-shrink: 0; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8); }
.detail .poster img { width: 100%; height: 100%; object-fit: cover; }
.detail h1 { font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; font-size: clamp(44px, 6vw, 84px); line-height: 0.95; letter-spacing: 0.01em; margin-bottom: 12px; }
.detail .overview { max-width: 640px; color: #e5e5e5; font-size: 16px; margin-bottom: 22px; }
@media (max-width: 700px) {
  .detail { flex-direction: column; align-items: flex-start; gap: 20px; }
  .detail .poster { width: 130px; }
}
.seasons { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.seasons button { background: transparent; border: 1px solid #4d4d4d; border-radius: var(--radius); padding: 8px 16px; cursor: pointer; font-size: 15px; font-weight: 700; color: #e5e5e5; }
.seasons button:hover { border-color: #fff; }
.seasons button.active { background: #fff; border-color: #fff; color: #000; }
.episodes { display: grid; border-top: 1px solid #404040; }
.ep { display: grid; grid-template-columns: 40px 180px 1fr auto; gap: 20px; align-items: center; padding: 20px 16px; border-bottom: 1px solid #404040; cursor: pointer; transition: background 0.15s; }
.ep:hover { background: #1c1c1c; }
.ep.current { background: #262626; }
.ep .num { font-size: 26px; color: #d2d2d2; text-align: center; }
.ep .art { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.ep .art img { width: 100%; height: 100%; object-fit: cover; }
.ep .art .placeholder { font-size: 30px; }
.ep h4 { font-size: 16px; margin-bottom: 4px; }
.ep p { font-size: 14px; color: #d2d2d2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep .check { width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.5); background: rgba(42, 42, 42, 0.6); cursor: pointer; display: grid; place-items: center; color: rgba(255, 255, 255, 0.5); }
.ep .check svg { width: 18px; height: 18px; }
.ep .check:hover { border-color: #fff; color: #fff; }
.ep .check.on { border-color: var(--ok); color: var(--ok); }
@media (max-width: 700px) {
  .ep { grid-template-columns: 120px 1fr auto; gap: 12px; padding: 14px 4px; }
  .ep .num { display: none; }
}

/* ---------- player ---------- */
.watch { position: fixed; inset: 0; background: #000; z-index: 100; }
.watch video { width: 100%; height: 100%; background: #000; }
.watch-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 14px; padding: 18px 22px 50px; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent); transition: opacity 0.3s; z-index: 2; }
.watch-top .t { font-weight: 700; font-size: 18px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.watch-top .t small { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }
.watch.idle .watch-top { opacity: 0; pointer-events: none; }
.watch.idle { cursor: none; }
.overlay-card { position: absolute; right: 28px; bottom: 90px; background: rgba(20, 20, 20, 0.95); border-radius: var(--radius); padding: 20px; width: 330px; z-index: 3; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7); }
.overlay-card h4 { margin-bottom: 4px; }
.overlay-card p { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.center-msg { position: absolute; inset: 0; display: grid; place-items: center; z-index: 3; background: rgba(0, 0, 0, 0.7); }
.center-msg > div { text-align: center; max-width: 440px; padding: 20px; }
.center-msg p { color: var(--muted); margin: 8px 0 18px; }

/* ---------- party ---------- */
.party { position: fixed; inset: 0; display: grid; grid-template-columns: 1fr 350px; background: #000; z-index: 100; }
.party .stage { position: relative; min-height: 0; }
.party .stage video { width: 100%; height: 100%; background: #000; }
.party aside { background: #181818; border-left: 1px solid #2a2a2a; display: flex; flex-direction: column; min-height: 0; }
.party aside header { padding: 18px; border-bottom: 1px solid #2a2a2a; }
.party aside header .code { font-family: "Bebas Neue", Impact, sans-serif; font-size: 34px; line-height: 1; letter-spacing: 0.12em; color: var(--accent); }
.party .people { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.party .people span { background: var(--bg-3); border-radius: 3px; padding: 3px 10px; font-size: 13px; }
.party .people span.host { box-shadow: inset 0 0 0 1px var(--accent); }
.chat { flex: 1; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.chat .msg b { color: var(--accent); margin-right: 6px; }
.chat .msg.me b { color: #0099ff; }
.chat .sys { color: #737373; font-size: 12px; text-align: center; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #2a2a2a; }
.chat-form input { flex: 1; min-width: 0; background: #333; border: 0; border-radius: var(--radius); padding: 10px 12px; outline: none; }
.chat-form input:focus { background: #454545; }
.switch { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 12px; cursor: pointer; accent-color: var(--accent); }
@media (max-width: 860px) {
  .party { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .party .stage { aspect-ratio: 16 / 9; }
  .party aside { border-left: 0; border-top: 1px solid #2a2a2a; }
}

/* ---------- profile / admin ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 28px; }
.stat { background: var(--bg-2); border-radius: var(--radius); padding: 20px; border-top: 3px solid var(--accent); }
.stat b { display: block; font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; font-size: 44px; line-height: 1; letter-spacing: 0.02em; margin-bottom: 4px; }
.stat span { color: var(--muted); font-size: 13px; }
.chart { background: var(--bg-2); border-radius: var(--radius); padding: 20px; }
.chart .bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; }
.chart .bars div { flex: 1; background: var(--accent); border-radius: 2px 2px 0 0; min-height: 2px; opacity: 0.85; }
.chart .bars div:hover { opacity: 1; }
.chart .axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 8px; }
.panel { background: var(--bg-2); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.panel h3 { margin-bottom: 12px; font-size: 17px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-weight: 500; padding: 8px; border-bottom: 1px solid #404040; }
.table td { padding: 10px 8px; border-bottom: 1px solid #333; }
.table-wrap { overflow-x: auto; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.toolbar h1 { font-size: clamp(26px, 3vw, 38px); font-weight: 700; margin-right: auto; }
.toolbar select { background: #000; border: 1px solid #fff; border-radius: 0; padding: 6px 10px; font-size: 14px; }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: #fff; color: #000; padding: 11px 18px; border-radius: var(--radius); font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: all 0.25s; z-index: 300; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.spinner { width: 44px; height: 44px; border: 3px solid transparent; border-top-color: var(--accent); border-right-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 120px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- admin panel ---------- */
.small { font-size: 13px; }
.grow { flex: 1; min-width: 0; }
.tabs { display: flex; gap: 26px; border-bottom: 1px solid #333; margin-bottom: 26px; overflow-x: auto; }
.tabs a { padding: 0 2px 12px; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: #fff; }
.tabs a.active { color: #fff; border-bottom-color: var(--accent); }
.admin .two-col { margin-bottom: 20px; }
.admin .two-col > .panel, .admin .two-col > .chart { margin-bottom: 0; }
.tag { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 6px; border-radius: 3px; background: #404040; color: #ddd; margin-left: 6px; vertical-align: middle; }
.tag.red { background: var(--accent); color: #fff; }
.mini-avatar { width: 34px; height: 34px; border-radius: 4px; display: inline-grid; place-items: center; font-weight: 700; font-size: 15px; flex-shrink: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #2c2c2c; }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover b { text-decoration: underline; }
.list-row b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.rank { font-family: "Bebas Neue", Impact, sans-serif; font-size: 28px; line-height: 1; color: var(--accent); width: 24px; text-align: center; }
.mini-bar { height: 3px; background: #404040; border-radius: 2px; margin-top: 6px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--accent); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filters input, .filters select, .plain-input { background: #333; border: 0; border-radius: var(--radius); padding: 9px 12px; outline: none; font-size: 14px; color: #fff; }
.filters input { flex: 1; min-width: 180px; max-width: 320px; }
.filters input:focus, .plain-input:focus { background: #454545; }
.filters .btn { margin-left: auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.flush-panel { padding: 0; overflow: hidden; }
.users-table th { padding: 12px 16px; background: #1a1a1a; }
.users-table td { padding: 12px 16px; vertical-align: middle; }
.users-table tbody tr { cursor: pointer; transition: background 0.15s; }
.users-table tbody tr:hover { background: #262626; }
.users-table tr.dim td { opacity: 0.5; }
.user-cell { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.back-link:hover { color: #fff; }
.back-link svg { width: 16px; height: 16px; }
.user-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.user-head .mini-avatar { width: 64px; height: 64px; font-size: 28px; }
.user-head h2 { font-size: 26px; line-height: 1.2; }
.history { max-height: 420px; overflow-y: auto; padding-right: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { background: #333; border-radius: 3px; padding: 4px 10px; font-size: 13px; }
.inline-form { display: flex; gap: 8px; align-items: flex-start; }
.inline-form .field { flex: 1; margin: 0; }
.inline-form .field input { padding: 9px 12px; font-size: 14px; }
.inline-form .plain-input { flex: 1; min-width: 0; }
.inline-form .btn { flex-shrink: 0; }
.action-list { display: flex; flex-wrap: wrap; gap: 8px; }
.danger-zone { border: 1px solid rgba(229, 9, 20, 0.45); }
.danger-zone h3 { color: var(--danger); }
.btn.danger { background: rgba(229, 9, 20, 0.12); }
.btn.danger:hover { background: rgba(229, 9, 20, 0.25); }
.invite-code { font-family: "Bebas Neue", Impact, sans-serif; font-size: 44px; letter-spacing: 0.12em; line-height: 1; color: #fff; }
.users-table td, .users-table th { white-space: nowrap; }
@media (max-width: 760px) {
  .users-table th:nth-child(3), .users-table td:nth-child(3), .users-table th:nth-child(5), .users-table td:nth-child(5), .users-table th:nth-child(6), .users-table td:nth-child(6) { display: none; }
  .users-table th, .users-table td { padding: 10px; }
  .filters .btn { margin-left: 0; }
}

/* ---------- reviews ---------- */
.reviews { margin-top: 36px; }
.reviews h2 { font-size: 22px; margin-bottom: 16px; }
.review-top { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start; margin-bottom: 24px; }
@media (max-width: 700px) { .review-top { grid-template-columns: 1fr; } }
.score { background: var(--bg-2); border-radius: var(--radius); padding: 20px; border-top: 3px solid var(--ok); }
.score b { display: block; font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; font-size: 56px; line-height: 1; }
.score span { color: var(--muted); font-size: 13px; }
.my-review { background: var(--bg-2); border-radius: var(--radius); padding: 18px; }
.thumbs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.thumb { background: #333; border: 2px solid transparent; border-radius: 999px; padding: 7px 16px; cursor: pointer; font-weight: 600; font-size: 14px; }
.thumb:hover { border-color: #666; }
.thumb.on { border-color: var(--ok); background: rgba(70, 211, 105, 0.15); }
.thumb.on.down { border-color: var(--accent); background: rgba(229, 9, 20, 0.15); }
.my-review textarea { width: 100%; background: #333; border: 0; border-radius: var(--radius); padding: 12px; color: #fff; font: inherit; font-size: 14px; resize: vertical; outline: none; margin-bottom: 10px; }
.my-review textarea:focus { background: #3d3d3d; }
.my-review .error { margin: 8px 0 0; min-height: 0; }
.review-list { display: grid; }
.review { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid #2c2c2c; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 4px; }
.review p { color: #ddd; font-size: 15px; white-space: pre-wrap; }
.thumb-tag { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; }
.thumb-tag.up { background: rgba(70, 211, 105, 0.15); color: var(--ok); }
.thumb-tag.down { background: rgba(229, 9, 20, 0.15); color: #ff6b73; }
.link-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; text-decoration: underline; padding: 0; }
.link-btn:hover { color: #fff; }

/* ---------- requests ---------- */
.seg { display: inline-flex; background: #333; border-radius: var(--radius); padding: 3px; margin-bottom: 16px; }
.seg input { display: none; }
.seg span { display: block; padding: 6px 16px; border-radius: 3px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg input:checked + span { background: #fff; color: #000; }
.request-list { display: grid; gap: 8px; }
.request { display: flex; gap: 16px; align-items: center; background: var(--bg-2); border-radius: var(--radius); padding: 14px 16px; }
.request.closed { opacity: 0.8; }
.vote { display: grid; place-items: center; width: 52px; min-height: 52px; flex-shrink: 0; background: #2c2c2c; border: 2px solid transparent; border-radius: var(--radius); cursor: pointer; color: var(--muted); font-size: 13px; line-height: 1.1; }
.vote b { font-size: 18px; color: #fff; }
.vote:hover { border-color: #555; }
.vote.on { border-color: var(--accent); color: var(--accent); background: rgba(229, 9, 20, 0.12); }
.req-title { font-size: 16px; margin-bottom: 2px; }
.req-title .tag { margin-left: 4px; }
.request p { color: #ccc; margin-bottom: 2px; }
.admin-note { color: #e87c03 !important; }
.req-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.status { flex-shrink: 0; width: 76px; text-align: center; font-size: 12px; font-weight: 700; padding: 6px 0; border-radius: var(--radius); background: #333; color: var(--muted); }
.status.added { background: rgba(70, 211, 105, 0.15); color: var(--ok); }
@media (max-width: 700px) { .request { flex-wrap: wrap; } .req-actions { width: 100%; justify-content: flex-start; } }
a.stat { display: block; transition: background 0.2s; }
a.stat:hover { background: #2a2a2a; }

/* ---------- party extras ---------- */
.react-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 4; }
.float-react { position: absolute; bottom: 70px; display: grid; justify-items: center; animation: float-up 2.8s ease-out forwards; }
.float-react span { font-size: 42px; line-height: 1; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6)); }
.float-react small { font-size: 11px; font-weight: 700; background: rgba(0, 0, 0, 0.6); padding: 1px 6px; border-radius: 999px; margin-top: 2px; }
@keyframes float-up {
  0% { transform: translate(0, 0) scale(0.5); opacity: 0; }
  12% { transform: translate(0, -30px) scale(1.15); opacity: 1; }
  75% { opacity: 1; }
  100% { transform: translate(var(--drift), -55vh) scale(1); opacity: 0; }
}
.react-bar { display: flex; justify-content: space-between; gap: 2px; padding: 8px 10px; border-top: 1px solid #2a2a2a; }
.react-bar button { flex: 1; background: none; border: 0; font-size: 22px; padding: 6px 0; border-radius: var(--radius); cursor: pointer; transition: transform 0.1s, background 0.15s; }
.react-bar button:hover { background: #2a2a2a; transform: scale(1.2); }
.react-bar button:active { transform: scale(0.9); }
.ready-panel { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(0, 0, 0, 0.65); }
.ready-card { background: #181818; border-radius: 6px; padding: 26px 28px; width: min(400px, 90%); text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7); border-top: 3px solid var(--accent); }
.ready-card h3 { font-size: 22px; margin-bottom: 4px; }
.ready-people { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 16px 0 20px; }
.ready-people span { background: #2c2c2c; border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--muted); }
.ready-people span.yes { background: rgba(70, 211, 105, 0.15); color: var(--ok); }
.ready-card .actions { justify-content: center; }
.countdown { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; font-family: "Bebas Neue", Impact, sans-serif; font-size: min(40vh, 260px); color: #fff; text-shadow: 0 0 40px rgba(229, 9, 20, 0.8); background: rgba(0, 0, 0, 0.35); pointer-events: none; animation: pop 1s ease-out infinite; }
@keyframes pop { 0% { transform: scale(1.3); opacity: 0.4; } 30% { transform: scale(1); opacity: 1; } }

/* ---------- add media ---------- */
.job-list { display: grid; gap: 8px; }
.job { display: flex; gap: 16px; align-items: center; background: var(--bg-2); border-radius: var(--radius); padding: 14px 16px; border-left: 3px solid #444; }
.job.downloading, .job.queued { border-left-color: #0071eb; }
.job.processing { border-left-color: #e87c03; }
.job.done { border-left-color: var(--ok); }
.job.failed { border-left-color: var(--danger); }
.job-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-bottom: 4px; }
.job-head .tag { margin-left: 0; }
.job-status { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted); }
.job-bar { height: 5px; margin: 6px 0; }
.job.processing .job-bar i { background: #e87c03; }
.switch.confirm { margin: 4px 0 14px; color: #ddd; }
@media (max-width: 700px) { .job { flex-wrap: wrap; } .job .req-actions { width: 100%; justify-content: flex-start; } }

/* ---------- TV mode ---------- */
/* Bigger everything, safe margins for TV overscan, and a bold focus highlight instead of hover. */
html.tv { font-size: 18px; }
.tv body { --gutter: 5vw; cursor: none; }
.tv #nav { padding-top: 1.5vh; }
.tv .links { font-size: 18px; gap: 22px; white-space: nowrap; }
.tv .search input { width: 170px; }
.tv .links a { padding: 4px 2px; border-bottom: 3px solid transparent; }
.tv .links a:focus, .tv .links a.tv-focus { color: #fff; border-bottom-color: var(--accent); outline: none; }
.tv .search input:focus, .tv .search input.tv-focus { border-color: #fff; outline: none; box-shadow: 0 0 0 3px #fff; }
.tv .avatar:focus, .tv .avatar.tv-focus { outline: none; box-shadow: 0 0 0 4px #fff; }
.tv :focus, .tv .tv-focus { outline: none; }
.tv :focus-visible { outline: none; }

.tv .btn { font-size: 20px; padding: 14px 30px; transition: transform 0.15s, box-shadow 0.15s, background 0.15s; }
.tv .btn.small { font-size: 17px; padding: 10px 18px; }
.tv .btn:focus, .tv .btn.tv-focus { transform: scale(1.08); box-shadow: 0 0 0 4px #fff, 0 10px 30px rgba(0, 0, 0, 0.6); }
.tv .btn.primary:focus, .tv .btn.primary.tv-focus { background: #fff; }
.tv .btn:not(.primary):not(.accent):focus, .tv .btn:not(.primary):not(.accent).tv-focus { background: rgba(255, 255, 255, 0.28); }

.tv .row { padding-top: 26px; padding-bottom: 44px; gap: 14px; scroll-behavior: smooth; }
.tv .section h2 { font-size: 26px; }
.tv .card { width: 16vw; }
.tv .card.landscape { width: 28vw; }
.tv .grid { grid-template-columns: repeat(auto-fill, minmax(16vw, 1fr)); gap: 34px 14px; }
.tv .grid.wide { grid-template-columns: repeat(auto-fill, minmax(28vw, 1fr)); }
.tv .card:hover { transform: none; }
.tv .card:focus, .tv .card.tv-focus { transform: scale(1.1); z-index: 5; }
.tv .card:focus .art, .tv .card.tv-focus .art { box-shadow: 0 0 0 4px #fff, 0 16px 40px rgba(0, 0, 0, 0.8); }
.tv .card:focus .title, .tv .card.tv-focus .title { color: #fff; }
.tv .card .title { font-size: 17px; }
.tv .card .sub { font-size: 14px; }
.tv .hide-btn { display: none; }

.tv .hero h1 { font-size: clamp(64px, 8vw, 120px); }
.tv .hero p, .tv .detail .overview { font-size: 20px; }
.tv .meta { font-size: 18px; }
.tv .seasons button { font-size: 18px; padding: 10px 22px; }
.tv .seasons button:focus, .tv .seasons button.tv-focus { box-shadow: 0 0 0 3px #fff; transform: scale(1.06); }
.tv .ep { grid-template-columns: 50px 26vw 1fr auto; padding: 22px 18px; }
.tv .ep:focus, .tv .ep.tv-focus { background: #2a2a2a; box-shadow: inset 4px 0 0 #fff; }
.tv .ep h4 { font-size: 20px; }
.tv .ep p { font-size: 16px; }
.tv .ep .check:focus, .tv .ep .check.tv-focus { border-color: #fff; color: #fff; transform: scale(1.15); }
.tv .thumb:focus, .tv .vote:focus, .tv .seg span:focus-within, .tv .thumb.tv-focus, .tv .vote.tv-focus { box-shadow: 0 0 0 3px #fff; }
.tv .field input:focus, .tv textarea:focus, .tv .field input.tv-focus, .tv textarea.tv-focus { box-shadow: 0 0 0 3px #fff; }
.tv .link-btn:focus, .tv .link-btn.tv-focus { color: #fff; outline: 2px solid #fff; outline-offset: 3px; }
.tv .tabs a:focus, .tv .tabs a.tv-focus { color: #fff; border-bottom-color: #fff; }
.tv .react-bar button:focus, .tv .react-bar button.tv-focus { background: #3a3a3a; transform: scale(1.25); box-shadow: 0 0 0 2px #fff; }
.tv .chat { font-size: 17px; }

/* Player controls for the remote */
.tv-controls { display: none; }
.tv .tv-controls { display: block; position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 60px 5vw 4vh; background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent); opacity: 0; transform: translateY(20px); transition: opacity 0.3s, transform 0.3s; pointer-events: none; }
.tv .tv-show .tv-controls { opacity: 1; transform: none; pointer-events: auto; }
.tv .watch .watch-top, .tv .party .watch-top { opacity: 0; transition: opacity 0.3s; }
.tv .tv-show .watch-top { opacity: 1; }
.tv-progress { display: flex; align-items: center; gap: 16px; font-size: 18px; font-variant-numeric: tabular-nums; margin-bottom: 18px; }
.tv-bar { flex: 1; height: 6px; background: rgba(255, 255, 255, 0.3); border-radius: 3px; overflow: hidden; }
.tv-bar i { display: block; height: 100%; background: var(--accent); }
.tv-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.tv-buttons button { background: rgba(255, 255, 255, 0.15); border: 0; color: #fff; font-size: 20px; font-weight: 700; padding: 12px 24px; border-radius: 999px; cursor: pointer; transition: transform 0.15s, background 0.15s; }
.tv-buttons .tv-play { font-size: 26px; min-width: 90px; }
.tv-buttons button:focus, .tv-buttons button.tv-focus { background: #fff; color: #000; transform: scale(1.12); }
.tv .party { grid-template-columns: 1fr 28vw; }
.tv .overlay-card { width: 420px; padding: 26px; }
.tv .overlay-card h4 { font-size: 22px; }

/* ---------- voice chat ---------- */
.voice { padding: 12px 16px; border-bottom: 1px solid #2a2a2a; }
.voice-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.voice-people { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.voice-chip { display: inline-flex; align-items: center; gap: 4px; background: #2a2a2a; border-radius: 999px; padding: 3px 10px; font-size: 13px; color: var(--muted); transition: box-shadow 0.12s, color 0.12s; }
.voice-chip.can { color: #fff; }
.voice-chip.speaking { box-shadow: 0 0 0 2px var(--ok), 0 0 12px rgba(70, 211, 105, 0.6); }
.voice-chip .link-btn { text-decoration: none; margin-left: 2px; }
.voice-requests { display: grid; gap: 6px; margin-bottom: 10px; }
.voice-req { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; background: rgba(232, 124, 3, 0.12); border-left: 3px solid #e87c03; padding: 6px 8px; border-radius: 3px; }
.voice-req b { margin-right: auto; }
.voice-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.tmdb-credit { display: flex; gap: 10px; align-items: center; margin-top: 14px; font-size: 12px; color: var(--muted); }
.tmdb-credit span { background: linear-gradient(90deg, #90cea1, #01b4e4); color: #0d253f; font-weight: 800; font-size: 11px; padding: 2px 6px; border-radius: 3px; letter-spacing: 0.05em; }
