/* FlickReels — coherent dark streaming layout */
:root {
  --bg: #07111d;
  --surface: #0d1b2b;
  --surface-2: #12263a;
  --line: rgba(255, 255, 255, .09);
  --text: #eef4fb;
  --muted: #91a0b4;
  --dim: #6f8297;
  --accent: #ff6b3d;
  --accent-soft: #ff955e;
  --max: 1240px;
  --radius: 12px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .38);
}

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

.app-shell { min-height: 100vh; overflow: hidden; }
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 42px;
  height: 76px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  background: linear-gradient(180deg, rgba(7, 17, 29, .96), rgba(7, 17, 29, .16));
  transition: background .25s, backdrop-filter .25s;
}
.topbar.scrolled {
  background: rgba(7, 17, 29, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-family: Manrope, sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.7px;
}
.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; background: var(--accent); }
.brand-mark span:nth-child(1) { height: 14px; opacity: .72; }
.brand-mark span:nth-child(2) { height: 21px; background: var(--accent-soft); }
.brand-mark span:nth-child(3) { height: 17px; opacity: .86; }
.main-nav { display: flex; align-items: center; gap: 28px; margin-right: auto; }
.main-nav a {
  position: relative;
  color: #8191a5;
  font-size: 13px;
  font-weight: 600;
  transition: color .2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--text); }
.main-nav a.active::after {
  position: absolute;
  right: 0;
  bottom: -29px;
  left: 0;
  height: 2px;
  border-radius: 99px;
  background: var(--accent);
  content: "";
}
.header-actions { display: flex; align-items: center; gap: 16px; }
.search-form {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 216px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.search-form svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.7; }
.search-form input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 12px; }
.search-form input::placeholder { color: #718298; }
.avatar-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--accent-soft), #e94d2c);
  font-size: 13px;
  font-weight: 800;
}

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 610px;
  height: min(78vh, 740px);
  isolation: isolate;
}
.hero-backdrop, .hero-shade { position: absolute; inset: 0; }
.hero-backdrop {
  z-index: -2;
  background: #10253a center 28% / cover no-repeat;
  filter: saturate(.82);
  transition: background-image .5s;
}
.hero-shade {
  z-index: -1;
  background: linear-gradient(90deg, rgba(7, 17, 29, .98) 0%, rgba(7, 17, 29, .78) 30%, rgba(7, 17, 29, .2) 70%, rgba(7, 17, 29, .42) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 38%);
}
.hero-content { width: min(var(--max), calc(100% - 56px)); margin: 0 auto; padding-bottom: 80px; }
.eyebrow, .section-kicker, .player-label {
  margin: 0 0 14px;
  color: var(--accent-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: 8px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(255, 107, 61, .14); }
.hero h1 {
  max-width: 620px;
  margin: 0;
  font-family: Manrope, sans-serif;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.04;
  letter-spacing: -2.7px;
}
.hero-description { max-width: 490px; margin: 20px 0 18px; color: #b4c0ce; font-size: 14px; line-height: 1.75; }
.hero-meta, .detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: #d3dbe4; font-size: 12px; }
.hero-meta { margin-bottom: 27px; }
.hero-meta span + span::before, .detail-meta span + span::before { margin-right: 12px; color: #587087; content: "•"; }
.hero-meta .rating, .detail-meta .rating { color: #ffc26a; }
.hero-actions { display: flex; gap: 11px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 7px;
  padding: 12px 18px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  transition: transform .2s, filter .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.btn-primary { background: var(--accent); box-shadow: 0 8px 24px rgba(255, 107, 61, .2); }
.btn-ghost { background: rgba(255, 255, 255, .1); backdrop-filter: blur(10px); }
.hero-progress { position: absolute; right: max(24px, calc((100vw - var(--max)) / 2)); bottom: 24px; width: 92px; height: 2px; background: rgba(255, 255, 255, .2); }
.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-top: 68px; }
.compact-section { padding-top: 70px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.section-kicker { margin-bottom: 7px; color: var(--dim); font-size: 10px; letter-spacing: 1.5px; }
h2 { margin: 0; font-family: Manrope, sans-serif; font-size: 25px; letter-spacing: -1px; }
.section-link { padding: 0; border: 0; color: var(--accent-soft); background: transparent; font-size: 11px; font-weight: 700; }
.section-link span { margin-left: 5px; font-size: 16px; }
.poster-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 19px; }
.movie-card, .poster-card { min-width: 0; }
.poster-button { position: relative; display: block; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; }
.poster {
  display: block;
  width: 100%;
  aspect-ratio: .72;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
  transition: transform .35s, filter .35s, box-shadow .35s;
}
.poster-button::after { position: absolute; inset: 0; border-radius: 8px; background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, .68)); content: ""; opacity: 0; transition: opacity .25s; }
.poster-button:hover .poster { transform: translateY(-5px); filter: brightness(.72); box-shadow: 0 16px 30px rgba(0, 0, 0, .3); }
.poster-button:hover::after { opacity: 1; }
.play-overlay { position: absolute; top: 50%; left: 50%; z-index: 1; display: grid; place-items: center; width: 35px; height: 35px; border-radius: 50%; color: #fff; background: var(--accent); opacity: 0; transform: translate(-50%, -38%); transition: opacity .25s, transform .25s; }
.poster-button:hover .play-overlay { opacity: 1; transform: translate(-50%, -50%); }
.play-overlay svg { width: 13px; height: 13px; fill: currentColor; margin-left: 2px; }
.card-title { display: block; overflow: hidden; margin-top: 12px; color: #eff4f9; font-size: 13px; font-weight: 700; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.card-subtitle { display: block; overflow: hidden; margin-top: 5px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.trending-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.trending-card { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 9px; border: 1px solid rgba(255, 255, 255, .05); border-radius: 9px; background: linear-gradient(105deg, rgba(19, 39, 59, .8), rgba(14, 28, 44, .72)); transition: transform .2s, background .2s; }
.trending-card:hover { background: var(--surface-2); transform: translateY(-2px); }
.trending-card .poster-button { flex: 0 0 54px; width: 54px; }
.trending-card .poster { aspect-ratio: .74; border-radius: 4px; }
.trending-card .card-title { margin-top: 0; }
.trending-info { min-width: 0; }
.rank { color: var(--dim); font-family: Manrope, sans-serif; font-size: 18px; font-weight: 800; }
.hot { display: block; margin-top: 6px; color: var(--accent-soft); font-size: 10px; }
.search-results { padding-bottom: 20px; }
.empty-state { padding: 80px 20px 120px; color: var(--muted); text-align: center; }
.empty-state h2 { color: var(--text); }
.empty-state p { font-size: 13px; }
.site-footer { display: flex; align-items: center; gap: 18px; width: min(var(--max), calc(100% - 56px)); margin: 80px auto 0; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--dim); font-size: 11px; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; color: #d8e2ed; 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; }
.site-footer p { margin: 0 auto 0 0; }.footer-note { white-space: nowrap; }
.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; }

.modal { position: fixed; inset: 0; z-index: 50; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .74); backdrop-filter: blur(6px); }
.detail-panel { position: absolute; top: 50%; left: 50%; width: min(940px, 92vw); max-height: 92vh; overflow: auto; transform: translate(-50%, -50%); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.close-button { position: absolute; top: 17px; right: 18px; z-index: 3; width: 35px; height: 35px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 50%; color: #fff; background: rgba(4, 12, 21, .72); font-size: 23px; line-height: 1; }
.detail-hero { position: relative; height: 245px; overflow: hidden; background: var(--surface-2); }
.detail-hero > img { position: absolute; right: 0; width: 67%; height: 100%; object-fit: cover; opacity: .55; }
.detail-hero-gradient { position: absolute; inset: 0; background: linear-gradient(90deg, var(--surface) 13%, rgba(13, 27, 43, .88) 40%, rgba(13, 27, 43, .16) 100%), linear-gradient(0deg, var(--surface), transparent 45%); }
.detail-heading { position: absolute; bottom: 34px; left: 45px; z-index: 1; max-width: 560px; }.detail-heading h2 { font-size: clamp(25px, 4vw, 38px); line-height: 1.12; }
.detail-heading .eyebrow { margin-bottom: 10px; }.detail-body { padding: 0 45px 40px; }
.player-wrap { position: relative; min-height: 300px; overflow: hidden; border-radius: 7px; background: #02070c; }
#video-player { display: block; width: 100%; max-height: 480px; background: #02070c; }
.player-placeholder { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 10px; color: var(--muted); background: radial-gradient(circle, #1b344b, #02070c 70%); font-size: 12px; }
.player-placeholder p { margin: 0; }.spinner { width: 23px; height: 23px; 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-caption { display: flex; align-items: center; justify-content: space-between; padding: 17px 0 19px; border-bottom: 1px solid var(--line); }.player-caption .player-label { margin-bottom: 4px; }.player-caption h3 { margin: 0; font-size: 14px; }.quality-pill { padding: 3px 6px; border: 1px solid #3a526b; border-radius: 3px; color: #91a6ba; font-size: 9px; }
#detail-description { margin: 25px 0 0; color: var(--muted); font-size: 13px; line-height: 1.75; }.tag-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }.tag { padding: 5px 8px; border-radius: 4px; color: #c6cad4; background: rgba(255, 255, 255, .07); font-size: 10px; }
.episode-header { display: flex; align-items: center; justify-content: space-between; margin: 27px 0 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, minmax(0, 1fr)); gap: 8px; max-height: 190px; overflow: auto; }
.episode-button { position: relative; border: 1px solid var(--line); border-radius: 6px; padding: 10px 4px; color: #dbe4ed; background: rgba(255, 255, 255, .035); font-size: 11px; transition: .2s; }.episode-button:hover, .episode-button.active { border-color: var(--accent); color: #fff; background: rgba(255, 107, 61, .12); }.episode-button.locked { color: var(--dim); cursor: not-allowed; opacity: .62; }
.toast { position: fixed; bottom: 24px; left: 50%; z-index: 70; max-width: calc(100% - 40px); padding: 12px 17px; border-radius: 8px; color: #152638; background: #f3f7fb; box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: .25s; }.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) { .poster-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }.trending-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .topbar { height: 64px; gap: 18px; padding: 0 18px; }.main-nav { gap: 15px; }.main-nav a { font-size: 11px; }.main-nav a.active::after { bottom: -23px; }.search-form { width: auto; border: 0; }.search-form input { display: none; }.header-actions { gap: 10px; }
  .hero { min-height: 570px; height: 78vh; }.hero-content { width: calc(100% - 40px); padding-bottom: 62px; }.hero-backdrop { background-position: 63% center; }.hero-shade { background: linear-gradient(90deg, rgba(7, 17, 29, .96), rgba(7, 17, 29, .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: 20px; }
  .content-section { width: calc(100% - 40px); padding-top: 52px; }.compact-section { padding-top: 56px; }.section-heading { margin-bottom: 18px; }h2 { font-size: 22px; }.poster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 13px; }.trending-grid { grid-template-columns: 1fr; }.site-footer { display: block; width: calc(100% - 40px); }.site-footer p { margin: 12px 0; }.footer-note { display: block; }
  .detail-panel { width: 96vw; max-height: 96vh; }.detail-hero { height: 220px; }.detail-heading { right: 20px; bottom: 27px; left: 24px; }.detail-body { padding: 0 20px 27px; }.player-wrap { min-height: 190px; }.episode-list { grid-template-columns: repeat(4, 1fr); max-height: 220px; }
}
@media (max-width: 420px) { .brand { font-size: 18px; }.main-nav { gap: 11px; }.main-nav a:nth-child(3) { display: none; }.hero h1 { font-size: 35px; }.section-heading { align-items: flex-start; flex-direction: column; gap: 10px; }.section-heading .section-link { align-self: flex-end; margin-top: -28px; } }
