:root {
  color-scheme: dark;
  --bg: #07090f;
  --panel: #10131d;
  --panel-2: #171b27;
  --line: rgba(255,255,255,.1);
  --muted: #949aaa;
  --text: #f7f8fb;
  --accent: #adff00;
  --accent-2: #c5ff55;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.hidden { display: none !important; }

.topbar { position: sticky; top: 0; z-index: 20; min-height: 74px; padding: 12px clamp(18px,4vw,62px); display: flex; align-items: center; gap: 26px; background: rgba(7,9,15,.88); border-bottom: 1px solid var(--line); backdrop-filter: blur(20px); }
.brand { color: white; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 900; letter-spacing: -.04em; white-space: nowrap; }
.brand-mark { display: inline-flex; align-items: center; gap: 2px; width: 25px; height: 28px; transform: skewX(-8deg); }
.brand-mark i { display: block; width: 7px; border-radius: 4px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); }
.brand-mark i:nth-child(1) { height: 17px; } .brand-mark i:nth-child(2) { height: 25px; } .brand-mark i:nth-child(3) { height: 13px; }
.search-form { flex: 1; max-width: 460px; margin-left: auto; display: flex; align-items: center; gap: 10px; padding: 0 5px 0 14px; height: 44px; background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 12px; }
.search-form:focus-within { border-color: rgba(173,255,0,.7); box-shadow: 0 0 0 3px rgba(173,255,0,.11); }
.search-form svg { width: 19px; fill: none; stroke: #8e94a4; stroke-width: 1.8; }
.search-form input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: white; }
.search-form button { border: 0; color: white; background: var(--accent); border-radius: 8px; padding: 8px 13px; font-weight: 750; }
nav { display: flex; align-items: center; gap: 3px; }
.nav-button { border: 0; background: transparent; color: #a8adbb; padding: 9px 11px; border-radius: 8px; font-weight: 650; font-size: 14px; white-space: nowrap; }
.nav-button:hover, .nav-button.active { color: white; background: rgba(255,255,255,.07); }

main { width: min(1480px, calc(100% - 44px)); margin: 0 auto; padding: 28px 0 80px; }
.hero { min-height: clamp(390px, 58vw, 600px); max-height: 650px; border-radius: 24px; background-size: cover; background-position: center 24%; position: relative; overflow: hidden; display: flex; align-items: end; box-shadow: inset 0 -1px rgba(255,255,255,.08), 0 28px 80px rgba(0,0,0,.35); }
.skeleton-hero { background: linear-gradient(110deg,#0f131d 25%,#171c29 40%,#0f131d 55%); background-size: 300% 100%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
.hero-copy { width: min(650px, 100%); padding: clamp(28px,5vw,72px); }
.eyebrow { color: #c5ff55; letter-spacing: .17em; font-size: 11px; font-weight: 900; }
.hero h2 { margin: 13px 0; font-size: clamp(40px,6vw,76px); line-height: .98; letter-spacing: -.055em; text-shadow: 0 4px 30px #000; }
.hero p { color: #d2d5de; font-size: 17px; line-height: 1.6; }
.primary-button, .download-button { border: 0; border-radius: 11px; padding: 12px 18px; color: white; background: linear-gradient(120deg,var(--accent),var(--accent-2)); font-weight: 850; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 12px 28px rgba(173,255,0,.24); }
.primary-button:hover, .download-button:hover { transform: translateY(-1px); filter: brightness(1.08); }

.catalog-head { margin: 56px 0 24px; display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.catalog-head h1 { margin: 8px 0 0; font-size: clamp(28px,4vw,44px); letter-spacing: -.045em; }
.catalog-head p { color: var(--muted); margin: 0; }
.status { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: #d9dce5; }
.status.error, .dialog-error { color: #ffc0ca; border-color: rgba(173,255,0,.4); background: rgba(173,255,0,.1); }
.catalog { display: grid; gap: 44px; min-width: 0; }
.catalog-section { min-width: 0; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.section-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.025em; }
.section-heading span { color: var(--muted); font-size: 13px; }
.title-row { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(138px,14vw,190px); grid-template-rows: 1fr; gap: 15px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; padding: 0 0 13px; }
.title-card { width: 100%; min-width: 0; padding: 0; text-align: left; color: white; border: 0; background: transparent; }
.poster { aspect-ratio: 2 / 3; border-radius: 13px; overflow: hidden; position: relative; background: linear-gradient(145deg,#1a1f2e,#0f121b); box-shadow: 0 10px 25px rgba(0,0,0,.25); }
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease, filter .35s ease; }
.title-card:hover .poster img { transform: scale(1.045); filter: brightness(.72); }
.poster-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: #565d72; font-size: 48px; font-weight: 900; }
.badge { position: absolute; top: 9px; left: 9px; max-width: calc(100% - 18px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 5px 8px; border-radius: 6px; color: white; background: rgba(8,10,16,.82); backdrop-filter: blur(8px); font-size: 10px; font-weight: 800; }
.card-play { position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; width: 48px; height: 48px; padding-left: 3px; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--accent); opacity: 0; scale: .8; transition: .25s; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.title-card:hover .card-play { opacity: 1; scale: 1; }
.title-card strong { display: block; margin-top: 10px; font-size: 14px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.search-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 25px 16px; }

dialog { color: white; border: 1px solid var(--line); padding: 0; background: #0d1018; box-shadow: 0 30px 100px rgba(0,0,0,.72); }
dialog::backdrop { background: rgba(2,3,6,.84); backdrop-filter: blur(10px); }
.detail-dialog { width: min(1050px, calc(100% - 30px)); max-height: calc(100vh - 30px); border-radius: 20px; overflow: auto; }
.close-button { position: sticky; z-index: 5; float: right; top: 15px; margin: 15px 15px 0 0; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; color: white; background: rgba(7,9,15,.78); font-size: 24px; line-height: 1; }
.close-button:hover { background: var(--accent); }
.detail-layout { display: grid; grid-template-columns: 280px 1fr; gap: 38px; padding: 52px; }
.detail-poster { width: 100%; aspect-ratio: 2/3; border-radius: 16px; object-fit: cover; background: var(--panel-2); }
.detail-copy h2 { margin: 9px 0 13px; font-size: clamp(34px,5vw,56px); line-height: 1; letter-spacing: -.05em; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-meta span { padding: 6px 9px; border-radius: 7px; background: rgba(255,255,255,.07); color: #d6d9e1; font-size: 12px; }
.description { color: #adb2c0; line-height: 1.7; font-size: 15px; }
.cast { color: #858b9c; line-height: 1.5; font-size: 13px; }
.seasons { margin-top: 25px; display: grid; gap: 22px; }
.season h3 { font-size: 15px; margin: 0 0 10px; }
.episodes { display: grid; grid-template-columns: repeat(auto-fill,minmax(145px,1fr)); gap: 8px; max-height: 250px; overflow: auto; }
.episodes button { border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.05); color: #e9ebf0; padding: 10px; text-align: left; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.episodes button:hover { border-color: var(--accent); background: rgba(173,255,0,.13); }
.dialog-loading, .dialog-error { margin: 80px; padding: 30px; border-radius: 12px; text-align: center; }

.player-dialog { width: min(1240px, calc(100% - 26px)); border-radius: 18px; overflow: visible; }
.player-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 24px 70px 20px 24px; }
.player-heading h2 { margin: 5px 0 0; font-size: 22px; }
.player-actions { display: flex; align-items: center; gap: 12px; }
.player-actions label { color: var(--muted); font-size: 12px; }
.player-actions select { margin-left: 7px; color: white; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.download-button { padding: 9px 14px; font-size: 13px; }
.download-button.disabled { opacity: .45; pointer-events: none; }
#video-player { display: block; width: 100%; max-height: 72vh; aspect-ratio: 16/9; background: black; }
.player-message { margin: 0; padding: 12px 18px; color: var(--muted); font-size: 12px; }

footer { border-top: 1px solid var(--line); padding: 30px clamp(20px,4vw,60px); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); }
.brand.compact { font-size: 16px; }
footer p { margin: 0; font-size: 12px; }

@media (max-width: 950px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .search-form { order: 3; max-width: none; flex-basis: 100%; }
  nav { margin-left: auto; overflow-x: auto; }
  .detail-layout { grid-template-columns: 210px 1fr; padding: 42px 28px; }
}
@media (max-width: 650px) {
  main { width: min(100% - 24px,1480px); padding-top: 12px; }
  nav { width: 100%; order: 2; margin: 0; }
  .nav-button { flex: 1; padding-inline: 6px; font-size: 12px; }
  .search-form { order: 3; }
  .hero { min-height: 430px; border-radius: 16px; background-position: 65% center; }
  .hero-copy { padding: 28px 22px; }
  .hero h2 { font-size: 42px; }
  .catalog-head { margin-top: 36px; align-items: flex-start; flex-direction: column; }
  .title-row { grid-auto-columns: 138px; }
  .detail-layout { grid-template-columns: 1fr; padding: 58px 20px 28px; }
  .detail-poster { width: min(190px, 58vw); }
  .dialog-loading, .dialog-error { margin: 70px 20px; }
  .player-heading { align-items: flex-start; flex-direction: column; padding: 22px 55px 16px 16px; }
  .player-actions { width: 100%; justify-content: space-between; }
  footer { align-items: flex-start; flex-direction: column; }
}

/* Binglo brand */
.binglo-logo { display:block; width:142px; height:auto; border-radius:8px; }
.search-form button, .primary-button, .download-button, .card-play { color:#101700; }
.close-button:hover { color:#101700; }
