/* ZebraShort — visual system */
:root {
  --bg: #090b12;
  --surface: #11141d;
  --surface-2: #171b26;
  --line: rgba(255,255,255,.09);
  --text: #f6f7fb;
  --muted: #a4a9b8;
  --dim: #707789;
  --accent: #f6b84b;
  --accent-2: #ff8a52;
  --green: #93d7aa;
  --radius: 16px;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "DM Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; overflow: hidden; }
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 20;
  height: 76px; display: flex; align-items: center; gap: 42px;
  padding: 0 max(28px, calc((100vw - var(--max)) / 2));
  background: linear-gradient(180deg, rgba(9,11,18,.92), rgba(9,11,18,.18));
  transition: background .25s, backdrop-filter .25s;
}
.topbar.scrolled { background: rgba(9,11,18,.87); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-family: Manrope, sans-serif; font-size: 19px; font-weight: 800; letter-spacing: -.7px; white-space: nowrap; }
.brand-accent { color: var(--accent); }
.brand-mark { display: inline-flex; align-items: flex-end; gap: 3px; width: 22px; height: 23px; transform: skew(-8deg); }
.brand-mark span { width: 5px; border-radius: 2px 2px 1px 1px; background: var(--accent); }
.brand-mark span:nth-child(1) { height: 14px; opacity: .75; }
.brand-mark span:nth-child(2) { height: 21px; }
.brand-mark span:nth-child(3) { height: 17px; opacity: .88; }
.main-nav { display: flex; align-items: center; gap: 28px; margin-right: auto; }
.main-nav a { color: #a6a9b5; font-size: 14px; transition: color .2s; }
.main-nav a:hover, .main-nav a.active { color: var(--text); }
.main-nav a.active { font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 13px; }
.icon-btn, .avatar-btn { border: 0; color: var(--text); cursor: pointer; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; padding: 9px; border-radius: 50%; background: transparent; transition: background .2s, color .2s; }
.icon-btn:hover { background: rgba(255,255,255,.1); }
.icon-btn svg, .btn svg, .search-box svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.avatar-btn { width: 34px; height: 34px; border-radius: 50%; color: #2b1704; background: linear-gradient(145deg, #f8cc73, #e8933b); font-size: 13px; font-weight: 800; box-shadow: 0 0 0 3px rgba(246,184,75,.12); }

.hero { position: relative; min-height: 650px; height: min(78vh, 760px); isolation: isolate; display: flex; align-items: flex-end; }
.hero-backdrop, .hero-shade { position: absolute; inset: 0; z-index: -2; background-position: center 28%; background-size: cover; transition: background-image .5s, opacity .4s; }
.hero-backdrop { filter: saturate(.8); }
.hero-shade { z-index: -1; background: linear-gradient(90deg, rgba(9,11,18,.97) 0%, rgba(9,11,18,.77) 28%, rgba(9,11,18,.15) 68%, rgba(9,11,18,.28) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 35%, rgba(9,11,18,.26) 100%); }
.hero-content { width: min(var(--max), calc(100% - 56px)); margin: 0 auto; padding: 0 0 82px; }
.eyebrow, .section-kicker, .player-label { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(246,184,75,.15); }
.hero h1 { max-width: 575px; margin: 0 0 17px; font-family: Manrope, sans-serif; font-size: clamp(38px, 5vw, 68px); line-height: 1.04; letter-spacing: -2.9px; }
.hero-description { max-width: 480px; margin: 0 0 19px; color: #b9bdc8; font-size: 15px; line-height: 1.7; }
.hero-meta, .detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; color: #d5d7de; font-size: 13px; }
.hero-meta { margin-bottom: 29px; }
.meta-score { color: var(--accent); font-weight: 700; }
.meta-separator { color: #5e6472; }
.hero-actions { display: flex; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 8px; padding: 12px 18px; cursor: pointer; font-size: 13px; font-weight: 700; transition: transform .2s, background .2s, opacity .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: #281805; background: var(--accent); }
.btn-primary:hover { background: #ffd174; }
.btn-ghost { color: var(--text); background: rgba(255,255,255,.1); backdrop-filter: blur(10px); }
.btn-ghost:hover { background: rgba(255,255,255,.18); }
.btn svg { width: 17px; height: 17px; stroke-width: 2; }
.hero-progress { position: absolute; right: max(28px, calc((100vw - var(--max)) / 2)); bottom: 25px; width: 92px; height: 2px; background: rgba(255,255,255,.22); }
.hero-progress span { display: block; width: 36%; height: 100%; background: var(--accent); }

.content-section { width: min(var(--max), calc(100% - 56px)); margin: 0 auto; padding: 71px 0 0; }
.compact-section { padding-top: 72px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.section-kicker { margin: 0 0 7px; color: var(--dim); font-size: 10px; letter-spacing: 1.5px; }
h2 { margin: 0; font-family: Manrope, sans-serif; font-size: 26px; letter-spacing: -1.05px; }
.section-link { color: var(--accent); font-size: 12px; font-weight: 700; }
.section-link span { margin-left: 5px; font-size: 16px; transition: margin .2s; }
.section-link:hover span { margin-left: 9px; }
.button-link { border: 0; padding: 0; background: none; cursor: pointer; }
.poster-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.poster-card { min-width: 0; cursor: pointer; }
.poster-image-wrap { position: relative; overflow: hidden; aspect-ratio: .76; border-radius: var(--radius); background: var(--surface-2); }
.poster-image { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .45s, filter .3s; }
.poster-card:hover .poster-image { transform: scale(1.055); filter: brightness(.72); }
.poster-overlay { position: absolute; inset: auto 0 0; padding: 36px 12px 12px; background: linear-gradient(transparent, rgba(5,6,10,.86)); opacity: 0; transition: opacity .3s; }
.poster-card:hover .poster-overlay { opacity: 1; }
.play-mini { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; color: #2b1905; background: var(--accent); }
.play-mini svg { width: 13px; height: 13px; fill: currentColor; margin-left: 2px; }
.poster-info { padding: 12px 2px 0; }
.poster-title { overflow: hidden; margin: 0 0 7px; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.poster-subtitle { overflow: hidden; margin: 0; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.poster-details { display: flex; align-items: center; gap: 9px; margin-top: 8px; color: var(--dim); font-size: 10px; }
.poster-details .score { color: var(--accent); }
.loading-card { aspect-ratio: .76; border-radius: var(--radius); background: linear-gradient(110deg, var(--surface) 25%, #1b202d 38%, var(--surface) 55%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.category-section { padding-bottom: 72px; }
.category-list { display: flex; flex-wrap: wrap; gap: 10px; }
.category-chip { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 14px 17px; color: #d5d8e0; background: var(--surface); cursor: pointer; font-size: 12px; transition: border-color .2s, background .2s, color .2s; }
.category-chip:hover { border-color: rgba(246,184,75,.55); color: var(--accent); background: rgba(246,184,75,.07); }
.category-icon { color: var(--accent); font-size: 14px; }
.footer { display: flex; align-items: center; gap: 18px; width: min(var(--max), calc(100% - 56px)); margin: 0 auto; padding: 34px 0 42px; border-top: 1px solid var(--line); color: var(--dim); font-size: 11px; }
.footer-brand { display: flex; align-items: center; gap: 8px; color: #d6d8df; font-family: Manrope, sans-serif; font-weight: 800; }
.brand-mark.small { width: 17px; height: 18px; gap: 2px; }
.brand-mark.small span { width: 4px; }
.brand-mark.small span:nth-child(1) { height: 11px; }.brand-mark.small span:nth-child(2) { height: 17px; }.brand-mark.small span:nth-child(3) { height: 14px; }
.footer p { margin: 0 auto 0 0; }
.footer-note { white-space: nowrap; }

.search-panel, .detail-drawer, .player-modal { position: fixed; inset: 0; z-index: 50; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .25s, visibility .25s; }
.search-panel.open, .detail-drawer.open, .player-modal.open { visibility: visible; opacity: 1; pointer-events: auto; }
.search-panel { background: rgba(9,11,18,.97); }
.search-inner { width: min(840px, calc(100% - 44px)); margin: 0 auto; padding-top: 92px; }
.close-search { margin-left: auto; margin-bottom: 16px; background: rgba(255,255,255,.08); }
.search-box { display: flex; align-items: center; gap: 13px; border-bottom: 1px solid rgba(255,255,255,.25); padding: 16px 5px; }
.search-box svg { color: var(--accent); width: 23px; height: 23px; }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 23px; }
.search-box input::placeholder { color: #636b7c; }
.search-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-top: 27px; }
.search-empty { grid-column: 1/-1; padding: 35px 0; color: var(--muted); text-align: center; font-size: 13px; }

.drawer-backdrop, .player-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(6px); }
.detail-panel { position: absolute; top: 0; right: 0; width: min(540px, 100%); height: 100%; overflow: auto; background: var(--surface); box-shadow: -20px 0 70px rgba(0,0,0,.3); transform: translateX(30px); transition: transform .3s; }
.detail-drawer.open .detail-panel { transform: translateX(0); }
.close-detail { position: absolute; z-index: 2; top: 18px; right: 18px; background: rgba(0,0,0,.45); backdrop-filter: blur(10px); }
.detail-cover { height: 280px; background-position: center; background-size: cover; }
.detail-body { padding: 27px 31px 42px; }
.detail-body h2 { font-size: 30px; margin-bottom: 13px; }
.detail-body > p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0 28px; }
.detail-tag { border-radius: 5px; padding: 5px 8px; color: #c6cad4; background: rgba(255,255,255,.07); font-size: 10px; }
.episode-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.episode-header h3 { margin: 0; font-size: 15px; }.episode-header span { color: var(--dim); font-size: 11px; }
.episode-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.episode-btn { position: relative; border: 1px solid var(--line); border-radius: 7px; padding: 10px 4px; color: #e2e4ea; background: rgba(255,255,255,.03); cursor: pointer; font-size: 12px; transition: all .2s; }
.episode-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(246,184,75,.08); }
.episode-btn.locked { color: var(--dim); }.episode-btn.locked::after { content: "•"; position: absolute; top: 2px; right: 5px; color: var(--accent); }

.player-modal { z-index: 60; display: grid; place-items: center; padding: 25px; }
.player-panel { position: relative; z-index: 1; width: min(960px, 100%); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #0d1018; box-shadow: 0 25px 90px rgba(0,0,0,.6); transform: translateY(15px); transition: transform .3s; }
.player-modal.open .player-panel { transform: translateY(0); }
.player-topbar { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; }
.player-top-actions { position: relative; z-index: 20; display: flex; align-items: center; gap: 4px; }
.fullscreen-player { position: relative; z-index: 21; display: grid; pointer-events: auto; touch-action: manipulation; }
.player-backdrop { z-index: 0; }
.player-label { margin: 0 0 5px; color: var(--dim); font-size: 9px; }.player-topbar h2 { font-size: 16px; }
.video-wrap { position: relative; background: #030405; aspect-ratio: 16/9; }
.video-wrap video { width: 100%; height: 100%; display: block; }
.video-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; color: var(--muted); background: rgba(3,4,5,.8); font-size: 12px; }
.video-loading.hidden { display: none; }
.spinner { width: 25px; height: 25px; border: 2px solid rgba(255,255,255,.2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.player-controls-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; color: var(--muted); font-size: 12px; }
.player-episode-btn { border: 0; color: var(--accent); background: none; cursor: pointer; font-size: 11px; }.player-episode-btn:disabled { color: var(--dim); cursor: not-allowed; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 25px; max-width: calc(100% - 40px); padding: 12px 16px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: #202531; box-shadow: 0 8px 30px rgba(0,0,0,.3); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.error-state { grid-column: 1/-1; padding: 28px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; font-size: 13px; }

@media (max-width: 900px) {
  .poster-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .poster-card:nth-child(5) { display: none; }
  .search-results { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 650px) {
  .topbar { height: 64px; gap: 18px; padding: 0 20px; }
  .main-nav { gap: 15px; }
  .main-nav a { font-size: 12px; }
  .avatar-btn { width: 31px; height: 31px; }
  .hero { min-height: 600px; height: 82vh; }
  .hero-content { width: calc(100% - 40px); padding-bottom: 65px; }
  .hero-backdrop { background-position: 63% center; }
  .hero-shade { background: linear-gradient(90deg, rgba(9,11,18,.95), rgba(9,11,18,.38)), linear-gradient(0deg, var(--bg), transparent 50%); }
  .hero h1 { font-size: 42px; letter-spacing: -2px; }
  .hero-description { font-size: 13px; }
  .hero-progress { right: 20px; bottom: 21px; }
  .content-section { width: calc(100% - 40px); padding-top: 54px; }
  .compact-section { padding-top: 57px; }
  .section-heading { margin-bottom: 18px; }
  h2 { font-size: 22px; }
  .poster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 13px; }
  .poster-card:nth-child(5) { display: block; }
  .category-section { padding-bottom: 54px; }
  .category-list { gap: 8px; }
  .category-chip { padding: 11px 12px; font-size: 11px; }
  .footer { width: calc(100% - 40px); display: block; padding-bottom: 31px; }
  .footer p { margin: 12px 0; }
  .footer-note { display: block; }
  .search-inner { width: calc(100% - 40px); padding-top: 76px; }
  .search-results { grid-template-columns: repeat(2, 1fr); gap: 13px; }
  .search-box input { font-size: 18px; }
  .detail-cover { height: 220px; }
  .detail-body { padding: 24px 22px 35px; }
  .episode-list { grid-template-columns: repeat(4, 1fr); }
  .player-modal { padding: 0; align-items: stretch; background: #000; }
  .player-panel { width: 100%; height: 100%; max-width: none; border: 0; border-radius: 0; display: flex; flex-direction: column; background: #000; }
  .player-topbar { flex: 0 0 auto; min-height: 64px; padding: 11px 14px; background: rgba(13,16,24,.96); }
  .player-topbar h2 { max-width: 235px; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
  .video-wrap { flex: 1 1 auto; display: flex; align-items: center; aspect-ratio: auto; min-height: 0; }
  .video-wrap video { max-height: 100%; object-fit: contain; }
  .player-controls-row { flex: 0 0 auto; min-height: 54px; padding: 12px 14px; background: rgba(13,16,24,.96); }
  .player-episode-btn { font-size: 10px; }
  .player-modal .video-loading { font-size: 11px; }
}

@media (max-width: 650px) and (orientation: landscape) {
  .player-topbar { min-height: 48px; padding: 5px 12px; }
  .player-topbar .player-label { display: none; }
  .player-topbar h2 { font-size: 12px; }
  .player-controls-row { min-height: 42px; padding: 7px 12px; }
}

@media (min-width: 651px) {
  .player-modal.fullscreen-mode { padding: 0; }
  .player-modal.fullscreen-mode .player-panel { width: 100%; height: 100%; max-width: none; border: 0; border-radius: 0; display: flex; flex-direction: column; }
  .player-modal.fullscreen-mode .video-wrap { flex: 1; aspect-ratio: auto; }
  .player-modal.fullscreen-mode .video-wrap video { object-fit: contain; }
}

@supports (height: 100dvh) {
  @media (max-width: 650px) {
    .player-panel { height: 100dvh; }
  }
}
