:root {
  --bg: #07090e;
  --bg-soft: #0c1017;
  --surface: #111720;
  --surface-2: #171e29;
  --text: #f5f7f9;
  --muted: #a7afbc;
  --dim: #6d7786;
  --accent: #8cefe5;
  --accent-strong: #3bc9bc;
  --line: rgba(255, 255, 255, .1);
  --shadow: 0 24px 70px rgba(0, 0, 0, .5);
  --header-h: 74px;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; overflow-x: clip; color: var(--text); background: var(--bg); font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-thumb { background: #303946; border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }
.skip-link { position: fixed; z-index: 999; left: 16px; top: -60px; padding: 10px 14px; border-radius: 8px; background: #fff; color: #000; transition: top .2s; }
.skip-link:focus { top: 12px; }

.header { position: fixed; z-index: 90; inset: 0 0 auto; height: var(--header-h); padding: 0 clamp(22px, 4.2vw, 72px); display: flex; align-items: center; gap: clamp(24px, 3.2vw, 52px); border-bottom: 1px solid transparent; transition: background .3s, backdrop-filter .3s, border-color .3s; }
.header.is-scrolled, .header.is-solid { background: rgba(7, 9, 14, .82); backdrop-filter: blur(22px) saturate(135%); border-color: rgba(255, 255, 255, .07); }
.brand { color: #fff; display: inline-flex; align-items: center; flex: none; gap: 9px; text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.brand span { font-size: 22px; font-weight: 850; letter-spacing: -.04em; }
.brand i { width: 1px; height: 19px; background: linear-gradient(transparent, var(--accent), transparent); }
.brand b { color: var(--accent); font-size: 15px; letter-spacing: .22em; font-weight: 500; }
.nav { display: flex; height: 100%; align-items: center; gap: 4px; }
.nav-link { height: 100%; padding: 0 12px; border: 0; background: transparent; color: #aeb5c0; cursor: pointer; font-size: 14px; position: relative; white-space: nowrap; }
.nav-link::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 15px; height: 2px; transform: scaleX(0); background: var(--accent); border-radius: 3px; transition: transform .25s; }
.nav-link:hover, .nav-link.is-active { color: #fff; }
.nav-link.is-active::after { transform: scaleX(1); }
.header-actions { margin-left: auto; }
.search-field { width: min(24vw, 310px); height: 40px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; background: rgba(5, 8, 12, .45); transition: .25s; }
.search-field:focus-within { border-color: rgba(140, 239, 229, .7); box-shadow: 0 0 0 3px rgba(59, 201, 188, .1); background: rgba(8, 12, 18, .9); }
.search-field svg, .mobile-search svg, .search-sheet svg { width: 18px; fill: none; stroke: var(--accent); stroke-width: 1.7; margin-left: 12px; }
.search-field input { min-width: 0; width: 100%; height: 100%; border: 0; outline: 0; padding: 0 8px; color: #fff; background: transparent; font-size: 13px; }
.search-field input::placeholder { color: #7b8491; }
.search-field kbd { color: #697381; border: 1px solid #323b47; border-radius: 4px; font-size: 10px; padding: 2px 5px; margin-right: 9px; white-space: nowrap; }
.mobile-search { display: none; background: transparent; border: 0; width: 40px; height: 40px; padding: 0; }

.hero { height: min(800px, 88vh); min-height: 640px; position: relative; overflow: hidden; contain: layout paint; background: #0a0e14; }
.hero-track { width: 100%; height: 100%; display: flex; transition: transform .85s cubic-bezier(.22, .72, .16, 1); will-change: transform; }
.hero-slide { flex: 0 0 100%; min-width: 0; width: 100%; height: 100%; position: relative; display: flex; align-items: center; background: #0a0e14; }
.hero-slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 24%; opacity: .88; animation: heroReveal .8s ease both; }
.hero-slide::before { content: ""; position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, rgba(7, 9, 14, .98) 0%, rgba(7, 9, 14, .86) 27%, rgba(7, 9, 14, .35) 54%, rgba(7, 9, 14, .08) 78%), linear-gradient(0deg, #07090e 0%, transparent 36%); }
.hero-copy { width: min(650px, 50vw); margin: 50px 0 0 clamp(24px, 6vw, 104px); position: relative; z-index: 2; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .2em; text-transform: uppercase; }
.hero-copy h1 { margin: 0; max-width: 700px; font-size: clamp(48px, 6vw, 88px); line-height: .98; letter-spacing: -.065em; text-wrap: balance; text-shadow: 0 5px 30px rgba(0, 0, 0, .45); }
.hero-original { color: rgba(255, 255, 255, .72); font-size: 14px; letter-spacing: .04em; margin: 13px 0 16px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: #d1d6de; }
.hero-meta span:not(.hero-score)::before { content: "•"; margin-right: 10px; color: #66717f; }
.hero-score { color: #0b1817; background: var(--accent); border-radius: 5px; padding: 3px 7px; font-weight: 800; }
.hero-overview { color: #d2d7df; max-width: 580px; font-size: 15px; line-height: 1.75; margin: 20px 0 26px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 2px 7px #000; }
.hero-actions, .detail-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.primary-action, .secondary-action, .favorite-action { min-height: 44px; border-radius: 8px; padding: 0 18px; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 9px; cursor: pointer; font-weight: 720; text-decoration: none; transition: transform .2s, background .2s, border-color .2s; }
.primary-action { color: #071211; background: #f4f7f7; }
.primary-action:hover { background: var(--accent); transform: translateY(-2px); }
.secondary-action, .favorite-action { color: #fff; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(10px); }
.secondary-action:hover, .favorite-action:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .3); }
.favorite-action.is-saved { color: #081413; background: var(--accent); border-color: var(--accent); }
.hero-vignette { pointer-events: none; position: absolute; z-index: 3; inset: auto 0 0; height: 130px; background: linear-gradient(transparent, var(--bg)); }
.hero-pagination { position: absolute; z-index: 5; right: clamp(24px, 5vw, 80px); bottom: 64px; display: flex; align-items: center; gap: 22px; }
.hero-dots { display: flex; align-items: center; gap: 7px; }
.hero-dots button { width: 22px; height: 3px; border: 0; border-radius: 9px; padding: 0; background: rgba(255, 255, 255, .35); cursor: pointer; transition: width .25s, background .25s; }
.hero-dots button.is-active { width: 42px; background: var(--accent); }
.hero-arrows { display: flex; gap: 8px; }
.hero-arrows button, .rail-nav button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); color: #fff; background: rgba(9, 12, 18, .55); cursor: pointer; transition: .2s; }
.hero-arrows button:hover, .rail-nav button:hover { color: #071211; border-color: var(--accent); background: var(--accent); }

.home-content { position: relative; z-index: 6; margin-top: -28px; padding: 0 0 72px; }
.content-rail { margin: 0 0 42px; }
.rail-header { padding: 0 clamp(20px, 4.8vw, 82px); margin-bottom: 15px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.rail-heading { display: flex; align-items: baseline; gap: 12px; }
.rail-heading h2 { margin: 0; font-size: clamp(20px, 2vw, 26px); letter-spacing: -.035em; }
.rail-heading span { color: var(--dim); font-size: 12px; }
.rail-nav { display: flex; gap: 7px; }
.rail-nav button { width: 32px; height: 32px; background: #111720; }
.poster-track { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(156px, 13.4vw, 218px); gap: clamp(12px, 1.35vw, 20px); overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: inline mandatory; scrollbar-width: none; padding: 8px clamp(20px, 4.8vw, 82px) 22px; }
.poster-track::-webkit-scrollbar, .cast-track::-webkit-scrollbar, .recommend-track::-webkit-scrollbar, .actor-works::-webkit-scrollbar { display: none; }
.poster-card { scroll-snap-align: start; position: relative; overflow: hidden; border: 0; padding: 0; aspect-ratio: 2/3; border-radius: 10px; background: var(--surface); cursor: pointer; text-align: left; box-shadow: 0 10px 28px rgba(0, 0, 0, .25); transition: transform .28s cubic-bezier(.2, .72, .2, 1), box-shadow .28s; }
.poster-card:hover, .poster-card:focus-visible { z-index: 2; transform: translateY(-6px); box-shadow: 0 20px 42px rgba(0, 0, 0, .48); outline: 1px solid rgba(140, 239, 229, .65); outline-offset: 2px; }
.poster-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s, filter .3s; }
.poster-card:hover img { transform: scale(1.035); filter: brightness(.62); }
.poster-card::after { content: ""; position: absolute; inset: 38% 0 0; background: linear-gradient(transparent, rgba(4, 6, 9, .96)); opacity: .9; }
.card-info { position: absolute; z-index: 2; inset: auto 0 0; padding: 14px; transform: translateY(31px); transition: transform .28s; }
.poster-card:hover .card-info, .poster-card:focus-visible .card-info { transform: translateY(0); }
.card-info h3 { margin: 0 0 7px; color: #fff; font-size: 14px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { color: #b5beca; display: flex; align-items: center; justify-content: space-between; font-size: 10px; }
.card-rating { color: var(--accent); font-weight: 750; }
.card-genres { margin-top: 10px; color: #99a3b1; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-badge { position: absolute; z-index: 3; left: 10px; top: 10px; color: #071413; background: rgba(140, 239, 229, .94); font-size: 9px; font-weight: 850; padding: 4px 7px; border-radius: 5px; letter-spacing: .08em; }
.card-save { position: absolute; z-index: 4; right: 9px; top: 9px; width: 32px; height: 32px; border: 1px solid rgba(255, 255, 255, .42); border-radius: 50%; background: rgba(5, 8, 12, .55); color: #fff; cursor: pointer; opacity: 0; transform: scale(.8); transition: .2s; backdrop-filter: blur(8px); }
.poster-card:hover .card-save, .card-save.is-saved { opacity: 1; transform: scale(1); }
.card-save.is-saved { color: #081413; border-color: var(--accent); background: var(--accent); }

.browse-page { min-height: 78vh; padding: calc(var(--header-h) + 78px) clamp(20px, 5vw, 82px) 90px; background: radial-gradient(circle at 82% 2%, rgba(30, 105, 107, .18), transparent 33%); }
.browse-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 28px; }
.browse-head h1 { margin: 0; font-size: clamp(34px, 5vw, 64px); letter-spacing: -.055em; }
.browse-head p:not(.eyebrow) { color: var(--muted); font-size: 14px; margin: 11px 0 0; }
.browse-head > span { color: var(--dim); font-size: 12px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.filter-chips button { border: 1px solid var(--line); border-radius: 99px; background: #0e131b; color: var(--muted); padding: 8px 14px; cursor: pointer; font-size: 12px; }
.filter-chips button:hover, .filter-chips button.is-active { color: #071211; border-color: var(--accent); background: var(--accent); }
.poster-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 23px); }
.empty-state, .error-state { min-height: 330px; grid-column: 1 / -1; display: grid; place-content: center; text-align: center; color: var(--muted); }
.empty-state img { width: 62px; margin: auto; opacity: .5; }
.empty-state h2, .error-state h2 { color: #fff; font-size: 22px; margin: 18px 0 4px; }
.empty-state button, .error-state button { margin: 17px auto 0; }

.state-stage { min-height: 100vh; padding: 110px clamp(20px, 4.8vw, 82px); }
.state-stage > p { color: var(--dim); font-size: 12px; }
.skeleton-hero { height: 42vh; border-radius: 16px; background: linear-gradient(90deg, #0e131b, #17202c, #0e131b); background-size: 220% 100%; animation: shimmer 1.5s infinite; }
.skeleton-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; margin-top: 28px; }
.skeleton-row i { aspect-ratio: 2/3; border-radius: 10px; background: linear-gradient(90deg, #0e131b, #18212c, #0e131b); background-size: 220% 100%; animation: shimmer 1.5s infinite; }

.footer { border-top: 1px solid rgba(255, 255, 255, .08); padding: 50px clamp(22px, 5vw, 82px) 22px; background: #05070a; }
.footer-main { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.footer-brand img { width: 32px; height: 32px; }
.footer-main p { color: var(--muted); margin: 13px 0 0; font-size: 13px; }
.footer-nav { display: flex; gap: 4px; }
.footer-nav button { color: #9da7b4; border: 0; background: transparent; padding: 10px 13px; cursor: pointer; font-size: 12px; }
.footer-nav button:hover { color: var(--accent); }
.footer-legal { margin-top: 34px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .06); display: flex; justify-content: space-between; gap: 20px; color: #626d7b; font-size: 10px; }

dialog { color: var(--text); }
.detail-dialog { width: min(1180px, calc(100vw - 30px)); max-width: none; max-height: calc(100dvh - 26px); padding: 0; border: 1px solid rgba(255, 255, 255, .12); border-radius: 17px; background: #0b0f16; box-shadow: var(--shadow); overflow: hidden; }
.detail-dialog::backdrop, .actor-dialog::backdrop, .info-dialog::backdrop { background: rgba(2, 4, 7, .78); backdrop-filter: blur(13px); }
.detail-shell { position: relative; min-height: 700px; max-height: calc(100dvh - 28px); overflow-y: auto; overflow-x: hidden; }
.circle-button { position: absolute; z-index: 8; right: 18px; top: 18px; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; color: #fff; background: rgba(4, 7, 11, .6); backdrop-filter: blur(8px); font-size: 25px; line-height: 1; cursor: pointer; }
.circle-button:hover { background: var(--accent); color: #071211; border-color: var(--accent); }
.detail-backdrop { position: absolute; inset: 0 0 auto; height: 520px; background: #111 center / cover no-repeat; }
.detail-backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 15, 22, .95) 0%, rgba(11, 15, 22, .58) 58%, rgba(11, 15, 22, .2)), linear-gradient(0deg, #0b0f16 0%, transparent 65%); }
.detail-layout { min-height: 515px; position: relative; z-index: 2; display: grid; grid-template-columns: 225px minmax(0, 1fr); gap: 38px; align-items: end; padding: 74px 54px 34px; }
.detail-poster-wrap { position: relative; }
.detail-poster-wrap > img { display: block; width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 10px; box-shadow: 0 22px 50px rgba(0, 0, 0, .55); }
.poster-play { position: absolute; inset: auto 9px 9px; min-height: 41px; border: 0; border-radius: 7px; color: #071211; background: rgba(246, 250, 250, .94); font-weight: 750; cursor: pointer; }
.detail-copy { padding-bottom: 8px; text-shadow: 0 2px 9px #000; }
.detail-copy h2 { margin: 0; font-size: clamp(38px, 5vw, 64px); letter-spacing: -.055em; line-height: 1; }
.original-title { margin: 9px 0 16px; color: #b7c0cb; font-size: 13px; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: #d5dbe3; font-size: 13px; }
.detail-meta span:not(:first-child)::before { content: "•"; color: #707b89; margin-right: 9px; }
.detail-meta .score { padding: 3px 7px; border-radius: 5px; color: #071211; background: var(--accent); font-weight: 800; }
.detail-tagline { margin: 21px 0 10px; padding-left: 12px; border-left: 2px solid var(--accent); color: #e4e8ed; font-style: italic; }
.detail-tagline:empty { display: none; }
.detail-overview { max-width: 720px; margin: 0 0 23px; color: #c5ccd6; font-size: 14px; line-height: 1.75; text-shadow: 0 2px 7px #000; }
.detail-facts { display: flex; flex-wrap: wrap; gap: 27px; margin: 24px 0 0; }
.detail-facts div { min-width: 110px; }
.detail-facts dt { color: #7f8997; font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }
.detail-facts dd { margin: 5px 0 0; color: #d9dfe6; font-size: 12px; }
.detail-section, .trailer-section { position: relative; z-index: 2; padding: 22px 54px 30px; }
.section-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 15px; }
.section-title h3 { margin: 0; font-size: 19px; }
.section-title span { color: var(--dim); font-size: 10px; }
.cast-track, .recommend-track, .actor-works { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 3px 2px 10px; }
.cast-card { width: 116px; flex: 0 0 116px; scroll-snap-align: start; border: 1px solid rgba(255, 255, 255, .08); border-radius: 9px; overflow: hidden; color: #fff; background: #121822; text-align: left; padding: 0; cursor: pointer; }
.cast-card:hover { border-color: rgba(140, 239, 229, .55); }
.cast-card img { width: 100%; height: 145px; object-fit: cover; display: block; }
.cast-card div { padding: 9px; }
.cast-card b, .cast-card span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cast-card b { font-size: 11px; }
.cast-card span { margin-top: 4px; color: #838e9c; font-size: 9px; }
.recommend-card { flex: 0 0 140px; scroll-snap-align: start; }
.recommend-card .poster-card { width: 140px; }
.trailer-placeholder { height: 330px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; display: grid; place-items: center; background: radial-gradient(circle at 60% 35%, rgba(58, 159, 158, .19), transparent 40%), #090d13; }
.trailer-placeholder button { width: 105px; height: 105px; border-radius: 50%; border: 1px solid rgba(140, 239, 229, .38); background: rgba(9, 18, 23, .75); color: #fff; cursor: pointer; display: grid; place-content: center; gap: 7px; }
.trailer-placeholder button:hover { border-color: var(--accent); background: rgba(42, 122, 119, .35); }
.trailer-placeholder span { color: var(--accent); font-size: 25px; }
.trailer-placeholder b { font-size: 11px; }
.trailer-frame-wrap { position: relative; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 16/9; }
.trailer-frame-wrap iframe { width: 100%; height: 100%; border: 0; }
.trailer-frame-wrap button { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .72); color: #fff; cursor: pointer; font-size: 21px; }
.no-trailer { color: var(--dim); padding: 36px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; }

.actor-dialog { width: min(780px, calc(100vw - 26px)); border: 1px solid rgba(255, 255, 255, .12); border-radius: 15px; padding: 0; background: #0c1118; box-shadow: var(--shadow); }
.actor-dialog article { position: relative; display: grid; grid-template-columns: 230px 1fr; gap: 30px; padding: 38px; }
.actor-dialog article > img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 10px; }
.actor-dialog h2 { font-size: 34px; margin: 0 0 10px; }
.actor-dialog p:not(.eyebrow) { color: var(--muted); font-size: 13px; line-height: 1.7; }
.actor-dialog h3 { margin: 24px 0 12px; font-size: 14px; }
.actor-works .poster-card { flex: 0 0 112px; width: 112px; }

.info-dialog { width: min(620px, calc(100vw - 28px)); border: 1px solid var(--line); border-radius: 15px; padding: 46px; color: #dfe5ec; background: #10161f; box-shadow: var(--shadow); }
.info-dialog h2 { margin: 0 0 14px; font-size: 30px; letter-spacing: -.04em; }
.info-dialog p { color: var(--muted); line-height: 1.8; font-size: 14px; }
.info-dialog .circle-button { position: fixed; }
.info-note { padding: 13px 15px; border-left: 2px solid var(--accent); color: #d7dfe7 !important; background: rgba(140, 239, 229, .05); }

.search-sheet { position: fixed; z-index: 120; inset: 0; background: rgba(5, 7, 11, .95); backdrop-filter: blur(18px); padding: 80px 20px; }
.search-sheet > button { position: absolute; top: 16px; right: 17px; border: 0; background: transparent; color: white; font-size: 30px; }
.search-sheet label { height: 52px; max-width: 540px; margin: auto; display: flex; align-items: center; border-bottom: 1px solid var(--accent); }
.search-sheet svg { width: 22px; }
.search-sheet input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; color: #fff; background: transparent; padding: 0 12px; font-size: 17px; }
.toast { position: fixed; z-index: 150; left: 50%; bottom: 28px; transform: translate(-50%, 20px); padding: 10px 15px; border: 1px solid rgba(140, 239, 229, .24); border-radius: 8px; color: #dffcf9; background: rgba(11, 20, 25, .94); box-shadow: 0 12px 35px #000; font-size: 12px; opacity: 0; pointer-events: none; transition: .25s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.error-page { min-height: 100vh; padding: 28px clamp(22px, 5vw, 72px); background: radial-gradient(circle at 73% 20%, rgba(35, 138, 137, .23), transparent 30%), var(--bg); }
.error-page main { max-width: 680px; margin: 17vh auto 0; text-align: center; }
.error-page h1 { margin: 0; color: transparent; -webkit-text-stroke: 1px rgba(140, 239, 229, .45); font-size: clamp(130px, 20vw, 240px); line-height: .8; letter-spacing: -.1em; }
.error-page h2 { margin: 28px 0 8px; font-size: 28px; }
.error-page main > p:not(.eyebrow) { color: var(--muted); margin-bottom: 28px; }

@keyframes shimmer { to { background-position: -220% 0; } }
@keyframes heroReveal { from { opacity: .2; transform: scale(1.025); } to { opacity: .88; transform: scale(1); } }

@media (max-width: 1120px) {
  .header { gap: 20px; }
  .nav-link { padding: 0 8px; font-size: 13px; }
  .nav-link::after { left: 9px; right: 9px; }
  .search-field { width: 210px; }
  .search-field kbd { display: none; }
  .poster-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 820px) {
  :root { --header-h: 64px; }
  .header { padding: 0 18px; }
  .brand img { width: 33px; height: 33px; }
  .brand span { font-size: 20px; }
  .brand b { font-size: 13px; }
  .nav { position: absolute; left: 0; right: 0; top: var(--header-h); height: 43px; padding: 0 14px; overflow-x: auto; scrollbar-width: none; background: rgba(7, 9, 14, .88); border-bottom: 1px solid rgba(255, 255, 255, .06); backdrop-filter: blur(16px); }
  .nav::-webkit-scrollbar { display: none; }
  .nav-link { height: 43px; padding: 0 10px; }
  .nav-link::after { bottom: 4px; }
  .search-field { display: none; }
  .mobile-search { display: block; }
  .hero { min-height: 680px; height: 78vh; }
  .hero-copy { width: min(650px, 80vw); margin-left: 6vw; margin-top: 86px; }
  .hero-copy h1 { font-size: clamp(44px, 8vw, 66px); }
  .hero-slide::before { background: linear-gradient(90deg, rgba(7,9,14,.95), rgba(7,9,14,.5) 65%, rgba(7,9,14,.2)), linear-gradient(0deg,#07090e,transparent 50%); }
  .poster-track { grid-auto-columns: clamp(155px, 24vw, 194px); }
  .poster-grid { grid-template-columns: repeat(4, 1fr); }
  .card-info { transform: none; }
  .card-genres { display: none; }
  .card-save { opacity: 1; transform: scale(1); }
  .detail-layout { grid-template-columns: 185px 1fr; padding: 72px 35px 30px; gap: 28px; }
  .detail-section, .trailer-section { padding-left: 35px; padding-right: 35px; }
  .trailer-placeholder { height: 280px; }
}

@media (max-width: 520px) {
  .header { gap: 10px; }
  .brand { gap: 6px; }
  .brand span { font-size: 18px; }
  .brand i { height: 15px; }
  .brand b { font-size: 11px; letter-spacing: .15em; }
  .nav { padding-left: 8px; }
  .nav-link { font-size: 12px; }
  .hero { height: 710px; min-height: 0; }
  .hero-slide { align-items: end; }
  .hero-slide > img { object-position: 62% center; }
  .hero-slide::before { background: linear-gradient(0deg, #07090e 1%, rgba(7,9,14,.83) 39%, rgba(7,9,14,.13) 78%), linear-gradient(90deg,rgba(7,9,14,.42),transparent); }
  .hero-copy { width: auto; margin: 0 20px 90px; }
  .hero-copy h1 { max-width: 100%; font-size: clamp(38px, 12vw, 52px); overflow-wrap: anywhere; }
  .hero-original { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hero-meta { gap: 7px; font-size: 11px; }
  .hero-meta span:nth-last-child(1) { display: none; }
  .hero-overview { font-size: 13px; line-height: 1.6; -webkit-line-clamp: 3; margin: 15px 0 20px; }
  .primary-action, .secondary-action, .favorite-action { min-height: 43px; padding: 0 15px; font-size: 13px; }
  .hero-pagination { left: 20px; right: 20px; bottom: 36px; justify-content: space-between; }
  .hero-arrows { display: none; }
  .hero-dots { width: 100%; }
  .hero-dots button { flex: 1; width: auto; }
  .hero-dots button.is-active { width: auto; }
  .home-content { margin-top: -17px; }
  .content-rail { margin-bottom: 30px; }
  .rail-header { padding: 0 18px; margin-bottom: 10px; }
  .rail-heading h2 { font-size: 20px; }
  .rail-heading span, .rail-nav { display: none; }
  .poster-track { grid-auto-columns: 144px; gap: 11px; padding: 5px 18px 17px; }
  .poster-card { border-radius: 8px; }
  .card-info { padding: 11px; }
  .card-info h3 { font-size: 12px; }
  .card-badge { font-size: 8px; }
  .browse-page { padding: 142px 16px 70px; }
  .browse-head { display: block; margin-bottom: 21px; }
  .browse-head h1 { font-size: 38px; }
  .browse-head > span { display: block; margin-top: 10px; }
  .filter-chips { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: 5px; }
  .filter-chips button { white-space: nowrap; }
  .poster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .skeleton-row { grid-template-columns: repeat(2, 1fr); }
  .skeleton-row i:nth-child(n+3) { display: none; }
  .footer { padding: 40px 18px 20px; }
  .footer-main { align-items: start; flex-direction: column; }
  .footer-nav { margin-left: -10px; }
  .footer-legal { display: block; line-height: 1.7; }
  .footer-legal span { display: block; }
  .detail-dialog { width: 100vw; max-height: 100dvh; border: 0; border-radius: 0; }
  .detail-shell { max-height: 100dvh; }
  .detail-backdrop { height: 365px; }
  .detail-backdrop::after { background: linear-gradient(0deg,#0b0f16 0%,rgba(11,15,22,.65) 63%,rgba(11,15,22,.14)); }
  .detail-layout { display: block; min-height: 0; padding: 245px 20px 20px; }
  .detail-poster-wrap { display: none; }
  .detail-copy h2 { font-size: 37px; overflow-wrap: anywhere; }
  .detail-copy { text-shadow: 0 2px 8px #000; }
  .detail-overview { font-size: 13px; line-height: 1.7; }
  .detail-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
  .detail-section, .trailer-section { padding: 19px 20px 24px; }
  .section-title span { display: none; }
  .cast-card { flex-basis: 104px; width: 104px; }
  .cast-card img { height: 133px; }
  .recommend-card, .recommend-card .poster-card { flex-basis: 125px; width: 125px; }
  .trailer-placeholder { height: 210px; }
  .actor-dialog article { display: block; padding: 32px 20px; max-height: 92vh; overflow-y: auto; }
  .actor-dialog article > img { width: 140px; margin-bottom: 20px; }
  .info-dialog { padding: 38px 23px 28px; }
  .toast { max-width: calc(100vw - 30px); width: max-content; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
