/* Eroviax - design tokens */
:root {
  --bg: #0c0b14;
  --surface: #15131f;
  --surface-2: #1d1a2b;
  --surface-3: #262238;
  --line: #2a2640;
  --text: #f2f0fa;
  --muted: #9a94b5;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --amber: #fbbf24;
  --grad: linear-gradient(135deg, #7c3aed 0%, #c026d3 55%, #ec4899 100%);
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar: 236px;
  --font-head: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font-body); }
body { min-height: 100vh; }
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; }
.muted { color: var(--muted); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- shell: sidebar + main ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--surface);
  border-right: 1px solid var(--line); padding: 20px 14px; overflow-y: auto; z-index: 30;
  scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent;
}
.main { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.content { width: 100%; max-width: 1480px; margin: 0 auto; padding: 0 28px 40px; flex: 1; }

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand b { font: 700 23px/1 var(--font-head); letter-spacing: -.5px; }
.brand b span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.side-nav a, .side-cats a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm);
  color: #d6d2ea; font-weight: 500; font-size: 14.5px;
}
.side-nav a svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.side-nav a:hover, .side-cats a:hover { background: var(--surface-2); color: #fff; }
.side-nav a.active { background: var(--surface-2); color: #fff; box-shadow: inset 3px 0 0 var(--pink); }
.side-nav a.active svg { color: var(--pink); opacity: 1; }
.side-title { margin: 22px 12px 8px; font: 600 11px/1 var(--font-head); letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.side-cats a { justify-content: space-between; padding: 8px 12px; font-size: 14px; }
.side-cats a span { color: var(--muted); font-size: 12px; }
.side-cats a.active { color: #fff; background: var(--surface-2); }
.side-foot { margin: 26px 12px 0; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--muted); }
.side-foot a:hover { color: #fff; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 14px 28px; background: rgba(12, 11, 20, .86); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { display: none; padding: 0; }
.search { flex: 1; max-width: 640px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.search:focus-within { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139, 92, 246, .25); }
.search svg { width: 18px; height: 18px; flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font-size: 15px; }
.icon-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; }
.icon-btn:hover { border-color: var(--violet); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.primary { background: var(--grad); border: 0; color: #fff; }

/* ---------- headings / sections ---------- */
h1, h2, h3 { font-family: var(--font-head); letter-spacing: -.3px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 28px 0 18px; }
.page-head h1 { font-size: 28px; margin: 0; line-height: 1.15; }
.page-head .count { color: var(--muted); font-size: 14px; }
.section { margin-top: 38px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { font-size: 21px; margin: 0; display: flex; align-items: center; gap: 10px; }
.section-head h2 i { width: 8px; height: 22px; border-radius: 4px; background: var(--grad); display: inline-block; }
.see-all { color: var(--muted); font-weight: 600; font-size: 14px; }
.see-all:hover { color: #fff; }

/* ---------- spotlight (home hero) ---------- */
.spotlight { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 16px; margin-top: 26px; }
.spot-main { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--surface); }
.spot-main img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.spot-main:hover img { transform: scale(1.03); }
.spot-main::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(12, 11, 20, .92)); }
.spot-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 28px; z-index: 4; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--grad);
  font: 700 11px/1 var(--font-head); letter-spacing: 1px; text-transform: uppercase; }
.spot-info h2 { font-size: 26px; margin: 12px 0 10px; max-width: 760px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spot-stats { display: flex; gap: 16px; color: #d6d2ea; font-size: 14px; align-items: center; flex-wrap: wrap; }
.spot-stats .icon-btn { height: 40px; }
.spot-side { display: grid; grid-template-rows: repeat(4, 1fr); gap: 12px; min-height: 0; }
.mini { display: grid; grid-template-columns: 46% 1fr; gap: 12px; align-items: center; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; min-height: 0; }
.mini:hover { border-color: var(--violet); }
.mini .thumb { border-radius: 10px; }
.mini .mt { font-weight: 600; font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini .mm { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* ---------- chips rail ---------- */
.rail { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; margin-top: 22px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 15px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line);
  font-size: 14px; font-weight: 500; white-space: nowrap; }
.chip:hover { border-color: var(--pink); }
.chip.active { background: var(--grad); border-color: transparent; color: #fff; }
.chip.small { padding: 5px 11px; font-size: 13px; }
.chip.outline { background: transparent; border-color: rgba(236, 72, 153, .55); }

/* ---------- video cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 26px 18px; }
.card { min-width: 0; }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .thumb { box-shadow: 0 0 0 2px var(--violet), 0 10px 30px -8px rgba(236, 72, 153, .45); }
.card:hover .thumb > img { transform: scale(1.04); }
.thumb .pill { position: absolute; z-index: 3; padding: 3px 8px; border-radius: 7px; background: rgba(12, 11, 20, .78);
  backdrop-filter: blur(4px); font-size: 12px; font-weight: 600; }
.pill.dur { right: 8px; bottom: 8px; }
.pill.likes { left: 8px; top: 8px; color: var(--amber); }
.pill.prev { right: 8px; top: 8px; color: #fff; background: rgba(139, 92, 246, .85); display: none; }
.card:hover .pill.prev { display: block; }
.card .title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 10px;
  font-weight: 600; font-size: 14.5px; line-height: 1.38; }
.card .title:hover { color: #e9d5ff; }
.card .meta { margin-top: 4px; color: var(--muted); font-size: 13px; display: flex; gap: 10px; }

/* hover preview frames */
.pv-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.pv-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .18); z-index: 2; }
.pv-bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .45s linear; }

/* ---------- category tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.tile { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; filter: saturate(1.1); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(200deg, rgba(124, 58, 237, .15), rgba(12, 11, 20, .9) 75%); }
.tile:hover img { transform: scale(1.07); }
.tile:hover { box-shadow: 0 0 0 2px var(--pink); }
.tile b { position: absolute; z-index: 1; left: 14px; bottom: 30px; font: 700 17px/1.2 var(--font-head); }
.tile span { position: absolute; z-index: 1; left: 14px; bottom: 12px; font-size: 12.5px; color: #d6d2ea; }

/* ---------- tag cloud ---------- */
.cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.cloud a { padding: 7px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.cloud a:hover { border-color: var(--pink); }
.cloud a span { color: var(--muted); font-size: .8em; margin-left: 6px; }

/* ---------- pager ---------- */
.pager { display: flex; justify-content: center; gap: 8px; margin: 40px 0 10px; flex-wrap: wrap; }
.pager a { min-width: 42px; height: 42px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; }
.pager a:hover { border-color: var(--violet); }
.pager a.active { background: var(--grad); border-color: transparent; }

/* ---------- video page ---------- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; margin-top: 26px; }
.player-wrap { padding: 2px; border-radius: 20px; background: var(--grad); box-shadow: 0 20px 60px -20px rgba(192, 38, 211, .5); }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.watch h1 { font-size: 24px; margin: 20px 0 10px; line-height: 1.25; }
.stats { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.stats b { color: var(--text); }
.stats .actions { margin-left: auto; display: flex; gap: 8px; }
.stats .icon-btn { height: 40px; }
.tagbox { margin-top: 20px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tagbox .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tagbox .row + .row { margin-top: 12px; }
.tagbox .lbl { color: var(--muted); font-size: 13px; width: 86px; flex: none; }
.upnext h3 { font-size: 16px; margin: 22px 0 12px; }
.upnext .mini { margin-bottom: 10px; }

/* ---------- ads ---------- */
.ad { display: flex; justify-content: center; align-items: center; margin: 26px auto; max-width: 100%; overflow: hidden; }
.ad-empty { border: 1px dashed var(--surface-3); border-radius: var(--radius); color: #5c5677; font-size: 11px;
  letter-spacing: 1.5px; text-transform: uppercase; background: repeating-linear-gradient(-45deg, transparent 0 12px, rgba(139, 92, 246, .04) 12px 24px); }
.ad-header_728.ad-empty, .ad-under_player.ad-empty, .ad-footer_728.ad-empty { width: 728px; height: 90px; }
.ad-player_side_1.ad-empty, .ad-player_side_2.ad-empty, .ad-grid_native.ad-empty { width: 300px; height: 250px; }
.ad-mobile_320.ad-empty { width: 320px; height: 100px; }
.watch-side .ad { margin: 0 0 16px; }
.ad-card { display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); position: relative; min-height: 250px; }
.ad-card .ad { margin: 0; }
.ad-card .ad-tag { position: absolute; top: 8px; right: 10px; font-size: 10px; color: var(--muted); letter-spacing: 1px; }
.mobile-only { display: none; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 26px 28px 34px; color: var(--muted); font-size: 13px; }
.footer .links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 10px; }
.footer a:hover { color: #fff; }
.footer p { margin: 6px 0 0; max-width: 820px; }

/* ---------- static pages / states ---------- */
.prose { max-width: 780px; margin: 34px 0; font-size: 15.5px; line-height: 1.7; }
.prose h1 { font-size: 30px; }
.prose a { color: #e9d5ff; text-decoration: underline; }
.empty, .loading { padding: 90px 0; text-align: center; color: var(--muted); }
.loading::before { content: ""; display: block; width: 34px; height: 34px; margin: 0 auto 14px; border-radius: 50%;
  border: 3px solid var(--surface-3); border-top-color: var(--pink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--surface-3); padding: 10px 18px;
  border-radius: 999px; font-size: 14px; z-index: 60; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }

/* ---------- age gate ---------- */
.agegate { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(8, 7, 14, .82); backdrop-filter: blur(18px); }
.agegate-box { width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  padding: 34px 30px; text-align: center; box-shadow: 0 30px 80px -20px rgba(124, 58, 237, .5); }
.agegate-box .brand { justify-content: center; padding: 0 0 18px; }
.agegate-box .brand b { font-size: 30px; }
.agegate-box .brand svg { width: 44px; height: 44px; }
.agegate-box h2 { margin: 0 0 10px; font-size: 22px; }
.agegate-box p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 22px; }
.agegate-box .icon-btn { width: 100%; justify-content: center; height: 50px; font-size: 15px; }
.agegate-box .leave { display: inline-block; margin-top: 14px; color: var(--muted); font-size: 14px; }

/* ---------- bottom tab bar (phones) ---------- */
.tabbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .watch { grid-template-columns: 1fr; }
  .watch-side { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; justify-items: center; }
  .watch-side .upnext { width: 100%; grid-column: 1 / -1; }
  .upnext-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
  .upnext .mini { margin: 0; }
}
@media (max-width: 960px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding-bottom: 66px; }
  .topbar { padding: 10px 16px; gap: 10px; }
  .topbar .brand { display: flex; }
  .topbar .brand b { font-size: 20px; }
  .topbar .brand svg { width: 28px; height: 28px; }
  .topbar .icon-btn.random span { display: none; }
  .topbar .icon-btn { padding: 0 12px; height: 40px; }
  .search { height: 40px; }
  .content { padding: 0 16px 30px; }
  .spotlight { grid-template-columns: 1fr; }
  .spot-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: 62px; background: rgba(21, 19, 31, .96);
    backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.active { color: #fff; }
  .tabbar a.active svg { color: var(--pink); }
  .footer { padding: 22px 16px 30px; }
}
@media (max-width: 720px) {
  .topbar .search { display: none; }
  .topbar.searching .search { display: flex; position: absolute; left: 12px; right: 12px; top: 10px; }
  .topbar.searching .brand, .topbar.searching .icon-btn { visibility: hidden; }
  .topbar .search-toggle { display: inline-flex; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
  .card .title { font-size: 13.5px; }
  .card .meta { font-size: 12px; }
  .spot-info { padding: 16px; }
  .spot-info h2 { font-size: 18px; }
  .spot-side { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 22px; }
  .watch h1 { font-size: 19px; }
  .stats .actions { margin-left: 0; }
  .tagbox .lbl { width: 100%; }
  .ad-header_728, .ad-under_player, .ad-footer_728 { display: none; }
  .mobile-only { display: block; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
@media (min-width: 721px) { .search-toggle { display: none !important; } }
@media (max-width: 400px) { .grid { grid-template-columns: 1fr; } }
