:root {
  --bg: #000;
  --panel: #151515;
  --panel-2: #252525;
  --text: rgba(255, 255, 255, .94);
  --muted: rgba(255, 255, 255, .56);
  --line: rgba(255, 255, 255, .1);
  --red: #ef3035;
  --gold: #f5d39d;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: #000; scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: #000; font-family: var(--sans); font-size: 14px; line-height: 1.45; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
body.modal-open { overflow: hidden; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  height: 58px;
  padding: 0 30px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: #fff;
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(12px);
}
.brand, .footer-brand { display: inline-flex; align-items: center; gap: 10px; flex: none; font-size: 22px; font-weight: 900; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: var(--red); }
.brand-mark i { display: block; width: 5px; height: 17px; margin: 0 1.3px; border-radius: 3px; background: #fff; transform: skew(-12deg); }
.brand-mark i:nth-child(2) { height: 24px; }
.brand-mark i:nth-child(3) { height: 13px; }
.main-nav { display: flex; gap: 36px; margin-left: 42px; height: 100%; font-size: 16px; font-weight: 850; }
.main-nav a { display: flex; align-items: center; color: rgba(255,255,255,.92); }
.main-nav a:hover, .main-nav .is-active { color: var(--red); }
.header-tools { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.header-icon, .language, .avatar-button, .topup-button { border: 0; color: #fff; background: transparent; }
.header-icon { width: 34px; height: 34px; font-size: 22px; }
.language { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 850; }
.language-wrap { position: relative; }
.language-menu {
  position: absolute;
  top: 45px;
  right: -56px;
  display: none;
  width: 240px;
  padding: 18px 0;
  border-radius: 14px;
  background: #2a2a2a;
  box-shadow: 0 18px 44px rgba(0,0,0,.48);
}
.language-menu.is-open { display: block; }
.language-menu::before { position: absolute; top: -8px; left: 50%; width: 16px; height: 16px; content: ""; background: #2a2a2a; transform: rotate(45deg); }
.language-option { display: block; width: 100%; padding: 10px 24px; border: 0; color: rgba(255,255,255,.64); background: transparent; text-align: left; font-weight: 700; }
.language-option.is-active, .language-option:hover { color: #fff; }
.avatar-button, .avatar-large { border-radius: 50%; background: radial-gradient(circle at 50% 35%, #767676 0 24%, #444 25% 48%, #2c2c2c 49%); }
.avatar-button { width: 36px; height: 36px; }
.topup-button { min-height: 38px; padding: 0 22px; border-radius: 22px; background: var(--red); font-weight: 900; }
.topup-button.wide { width: 100%; }
.menu-toggle { display: none; }
.search-panel { position: absolute; top: 68px; right: 28px; display: none; align-items: center; gap: 10px; width: min(430px, calc(100vw - 36px)); padding: 12px 14px; border-radius: 22px; background: #252525; }
.search-panel.is-open { display: flex; }
.search-panel input { flex: 1; border: 0; outline: 0; color: #fff; background: transparent; }
.search-panel button { border: 0; color: #fff; background: transparent; font-size: 22px; }

main { min-height: calc(100vh - 58px); }
.view { display: none; }
.view.is-active { display: block; }

.hero { position: relative; min-height: 680px; overflow: hidden; background: #000; }
.hero::before { content: ""; display: block; padding-top: 39%; }
.hero-slide { position: absolute; inset: 0; display: block; width: 100%; border: 0; padding: 0; color: #fff; background: #000; text-align: left; }
.hero-backdrop { position: absolute; inset: 0; display: block; background: url("assets/heiress-cover.png") center 14% / cover no-repeat; opacity: .92; transition: background-image .25s ease; }
.hero-vignette { position: absolute; inset: 0; display: block; background: linear-gradient(90deg, rgba(0,0,0,.84), rgba(0,0,0,.32) 47%, rgba(0,0,0,.08)), linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,0) 54%, #000); }
.hero-content { position: absolute; left: 6vw; bottom: 92px; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; width: min(630px, 45vw); }
.hero-title { font-size: clamp(36px, 4vw, 58px); font-weight: 950; line-height: 1.08; }
.hero-tags { display: flex; gap: 9px; flex-wrap: wrap; }
.hero-tags span { padding: 6px 14px; border-radius: 18px; background: rgba(255,255,255,.18); font-weight: 800; }
.hero-tags span:first-child { background: var(--red); }
.hero-copy { max-width: 590px; color: rgba(255,255,255,.74); font-size: 17px; }
.play-pill { display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 280px; height: 64px; border-radius: 36px; color: #000; background: #fff; font-size: 22px; font-weight: 950; }
.hero-thumbs { position: absolute; right: 7vw; bottom: 72px; display: flex; align-items: center; gap: 10px; }
.hero-thumb { width: 78px; height: 104px; padding: 0; border: 2px solid transparent; border-radius: 9px; overflow: hidden; background: #202020; }
.hero-thumb.is-active { border-color: #fff; }
.hero-thumb img { width: 100%; height: 100%; object-fit: cover; }

.category-band, .movie-section { padding-inline: clamp(24px, 4vw, 70px); }
.category-band { padding-top: 24px; padding-bottom: 8px; }
.category-scroller, .poster-rail { overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.24) transparent; }
.category-scroller { display: flex; gap: 12px; padding-bottom: 10px; }
.category-chip { flex: none; padding: 10px 18px; border: 1px solid transparent; border-radius: 22px; color: rgba(255,255,255,.7); background: #1b1b1b; font-weight: 850; }
.category-chip.is-active { border-color: var(--red); color: var(--red); background: rgba(239,48,53,.12); }
.movie-section { padding-top: 26px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 28px; font-weight: 950; }
.section-heading button { border: 0; color: rgba(255,255,255,.62); background: transparent; font-weight: 800; }
.poster-rail { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(176px, 14vw, 260px); gap: 20px; padding-bottom: 18px; }
.poster-card { padding: 0; border: 0; color: #fff; background: transparent; text-align: left; }
.poster-image { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: #242424; }
.poster-image img { width: 100%; height: 100%; object-fit: cover; }
.poster-tag { position: absolute; top: 10px; left: 10px; z-index: 2; padding: 4px 9px; border-radius: 12px; background: var(--red); font-size: 12px; font-weight: 950; }
.poster-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 44px; background: rgba(0,0,0,.16); opacity: 0; transition: .18s ease; }
.poster-card:hover .poster-play { opacity: 1; }
.poster-card h3 { margin: 12px 0 6px; font-size: 17px; line-height: 1.25; }
.poster-card p { margin: 0; color: var(--muted); font-size: 13px; }

.watch-view { min-height: 100vh; padding: 58px 24px 40px; }
.back-button { position: fixed; top: 86px; left: 26px; z-index: 10; width: 52px; height: 52px; border: 0; border-radius: 50%; color: #fff; background: #1e1e1e; font-size: 28px; }
.watch-player { display: flex; justify-content: center; padding-right: 420px; }
.watch-player iframe { width: min(560px, calc(100vw - 520px)); aspect-ratio: 9 / 16; border: 0; background: #111; }
.watch-info { position: fixed; top: 90px; right: 24px; bottom: 24px; width: 360px; overflow-y: auto; padding: 8px 0 0; }
.breadcrumb { display: flex; gap: 8px; color: var(--muted); font-size: 12px; }
.watch-info h1 { margin: 22px 0 10px; font-size: 22px; line-height: 1.18; }
.alias, .watch-info p { color: var(--muted); }
.watch-tags { display: flex; flex-wrap: wrap; gap: 9px; margin: 18px 0; }
.watch-tags span { padding: 8px 13px; border-radius: 18px; background: #1d1d1d; color: rgba(255,255,255,.74); font-size: 12px; font-weight: 850; }
.watch-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.watch-stats button { border: 0; color: var(--muted); background: transparent; display: grid; gap: 5px; justify-items: center; }
.watch-stats span { font-size: 24px; color: rgba(255,255,255,.78); }
.episode-tabs { display: flex; gap: 18px; align-items: center; margin: 20px 0 12px; }
.episode-tabs button { border: 0; color: var(--muted); background: transparent; font-weight: 900; }
.episode-tabs .is-active { color: #fff; }
.episode-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.episode-card { position: relative; min-height: 42px; border: 0; border-radius: 8px; color: rgba(255,255,255,.78); background: #242424; font-weight: 900; }
.episode-card.is-open { color: #fff; background: linear-gradient(135deg, rgba(239,48,53,.58), #282828); }
.episode-card.is-current { outline: 2px solid rgba(255,255,255,.8); }
.episode-card small { display: none; }
.episode-card.is-locked::after { position: absolute; top: 3px; right: 5px; content: "\1F512"; font-size: 10px; opacity: .62; }

.store-view { display: none; min-height: 100vh; padding: 92px 330px 80px 0; }
.store-view.is-active { display: block; }
.store-shell { width: min(860px, calc(100vw - 380px)); margin: 0 auto; padding: 22px; border-radius: 14px; background: var(--panel); }
.wallet-row { display: flex; gap: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.wallet-row button { margin-left: auto; border: 0; color: var(--muted); background: transparent; }
.store-shell h2 { margin: 22px 0 4px; font-size: 18px; }
.vip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; }
.vip-card { min-height: 112px; padding: 18px; border: 0; border-radius: 5px; color: #3b2415; background: linear-gradient(135deg, #ffe5b9, #f5c887); text-align: left; }
.vip-card strong { display: block; margin-top: 6px; font-size: 28px; }
.coin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.coin-card { min-height: 110px; padding: 15px; border: 0; border-radius: 5px; color: #fff; background: #2b2b2b; text-align: left; }
.coin-card strong { display: block; font-size: 22px; }
.payment-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.payment-row button { min-height: 42px; border: 1px solid rgba(255,255,255,.32); border-radius: 4px; color: #fff; background: #2a2a2a; font-weight: 900; }
.store-note { color: var(--muted); font-size: 12px; }
.account-card { position: fixed; top: 86px; right: 26px; width: 280px; padding: 20px; border-radius: 14px; background: #2a2a2a; }
.account-top { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; }
.avatar-large { width: 42px; height: 42px; }
.account-top small { display: block; color: var(--muted); }
.account-top button { border: 0; color: var(--muted); background: transparent; }
.balance { display: grid; grid-template-columns: repeat(2, 1fr); margin: 20px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; color: var(--muted); }
.balance strong { display: block; color: #fff; }

.brand-view { padding: 110px clamp(24px, 5vw, 90px); }
.app-callout { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; padding: 58px; border-radius: 18px; background: var(--panel); }
.app-callout h2 { margin: 0 0 14px; font-size: 48px; line-height: 1; }
.app-callout p { color: var(--muted); font-size: 17px; }
.app-callout a { display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px; border-radius: 24px; background: var(--red); font-weight: 900; }
.site-footer { padding: 40px clamp(24px, 5vw, 90px); color: var(--muted); background: #050505; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; margin: 20px 0; font-size: 12px; font-weight: 900; }

.auth-modal[hidden] { display: none; }
.auth-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.78); }
.auth-dialog { position: relative; width: min(430px, 100%); padding: 28px; border-radius: 16px; background: #1b1b1b; }
.close-button { position: absolute; top: 10px; right: 12px; border: 0; color: #fff; background: transparent; font-size: 26px; }
.auth-dialog h2 { margin: 0 0 10px; }
.auth-dialog p { color: var(--muted); }
.auth-dialog form { display: grid; gap: 10px; margin: 18px 0; }
.auth-dialog input { height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; color: #fff; background: #111; }
.auth-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.auth-options button { min-height: 40px; border: 0; border-radius: 8px; color: #fff; background: #2b2b2b; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; width: min(340px, calc(100vw - 40px)); padding: 14px 16px; border-left: 4px solid var(--red); color: #fff; background: #202020; opacity: 0; pointer-events: none; transform: translateY(12px); transition: .2s; }
.toast.is-showing { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .site-header { height: 62px; padding: 0 14px; }
  .brand { font-size: 18px; }
  .brand-mark { width: 32px; height: 32px; }
  .main-nav, .topup-button:not(.wide), .avatar-button { display: none; }
  .menu-toggle { display: inline-block; }
  .site-header.menu-open .main-nav { position: absolute; top: 62px; left: 0; right: 0; display: grid; height: auto; margin: 0; padding: 12px 18px; background: #050505; }
  .site-header.menu-open .main-nav a { min-height: 38px; }
  .hero { min-height: auto; }
  .hero::before { padding-top: 122.667%; }
  .hero-content { left: 18px; right: 18px; bottom: 92px; align-items: center; width: auto; text-align: center; }
  .hero-title { font-size: 30px; }
  .hero-copy { display: none; }
  .hero-thumbs { left: 16px; right: 16px; bottom: 22px; overflow-x: auto; }
  .hero-thumb { width: 58px; height: 78px; }
  .play-pill { width: 168px; height: 44px; font-size: 16px; }
  .poster-rail { grid-auto-columns: 138px; gap: 12px; }
  .watch-view { padding: 72px 12px 30px; }
  .back-button { position: static; margin: 0 0 12px; }
  .watch-player { padding: 0; }
  .watch-player iframe { width: min(430px, 100%); }
  .watch-info { position: static; width: auto; padding: 22px 8px; }
  .episode-grid { grid-template-columns: repeat(5, 1fr); }
  .store-view { padding: 78px 12px 40px; }
  .store-shell { width: 100%; }
  .account-card { position: static; width: auto; margin: 16px 12px; }
  .vip-grid, .coin-grid, .payment-row, .app-callout { grid-template-columns: 1fr; }
}
