:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --purple: #a855f7;
    --green: #34d399;
    --orange: #fb923c;
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
    --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.38);
    --shadow-md: 0 16px 48px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 18% -8%, rgba(34, 211, 238, 0.26), transparent 36rem),
        radial-gradient(circle at 88% 2%, rgba(168, 85, 247, 0.23), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #08111f 46%, #020617 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 80%);
    z-index: -1;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.container {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.76);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 16px 42px rgba(34, 211, 238, 0.26);
}

.brand-text {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #60a5fa, #22d3ee, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--muted-strong);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(148, 163, 184, 0.14);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.7);
    color: #ffffff;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #ffffff;
}

.hero {
    position: relative;
    min-height: calc(100vh - 72px);
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 62% 20%, rgba(34, 211, 238, 0.2), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.92));
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.54), rgba(2, 6, 23, 0.9));
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    min-height: calc(100vh - 72px);
    align-items: center;
    padding: 54px 0;
}

.hero-slider {
    position: relative;
    min-height: 620px;
    border: 1px solid var(--line);
    border-radius: 34px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.58);
    box-shadow: var(--shadow-lg);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 34px;
    align-items: center;
    padding: 48px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58)),
        var(--hero-image) center / cover no-repeat;
    filter: blur(2px) saturate(1.08);
    transform: scale(1.04);
    opacity: 0.55;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.hero-copy,
.hero-visual {
    position: relative;
    z-index: 1;
}

.hero-copy h1 {
    max-width: 760px;
    margin: 14px 0 16px;
    font-size: clamp(2.4rem, 5vw, 5rem);
    line-height: 1.04;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 720px;
    margin: 0;
    color: var(--muted-strong);
    font-size: 1.1rem;
    line-height: 1.9;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(34, 211, 238, 0.26);
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(14, 116, 144, 0.16);
    font-size: 0.78rem;
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 14px 42px rgba(34, 211, 238, 0.26);
}

.btn.ghost {
    color: var(--muted-strong);
    border-color: var(--line);
    background: rgba(15, 23, 42, 0.66);
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-visual img {
    width: min(320px, 100%);
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 26px 86px rgba(0, 0, 0, 0.48);
    transform: rotate(2deg);
}

.hero-dots {
    position: absolute;
    left: 48px;
    bottom: 34px;
    z-index: 2;
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

.hero-dots button.active {
    background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.hero-rail {
    display: grid;
    gap: 16px;
}

.rail-heading,
.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.rail-heading span,
.section-heading h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 950;
    letter-spacing: -0.04em;
}

.rail-heading a,
.section-heading a {
    color: var(--cyan);
    font-size: 0.92rem;
    font-weight: 800;
}

.section-block {
    padding: 52px 0;
}

.quick-search-section {
    padding: 44px 0 18px;
}

.quick-search-card,
.highlight-panel,
.content-card,
.filter-panel,
.category-overview-card,
.category-card,
.player-shell,
.ranking-list {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(18px);
}

.quick-search-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    border-radius: var(--radius-lg);
}

.quick-search-card h2 {
    margin: 8px 0;
    font-size: clamp(1.5rem, 3vw, 2.6rem);
    letter-spacing: -0.05em;
}

.quick-search-card p {
    margin: 0;
    color: var(--muted);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.stat-grid div {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.62);
}

.stat-grid strong {
    display: block;
    font-size: clamp(1.6rem, 4vw, 2.7rem);
    line-height: 1;
}

.stat-grid span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.featured-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.movie-card {
    position: relative;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.44);
    box-shadow: 0 24px 66px rgba(0, 0, 0, 0.32);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.045);
    filter: saturate(1.12);
}

.poster-badge,
.poster-type {
    position: absolute;
    top: 12px;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.poster-badge {
    left: 12px;
}

.poster-type {
    right: 12px;
}

.movie-card-body {
    padding: 16px;
}

.movie-title {
    display: -webkit-box;
    min-height: 3em;
    overflow: hidden;
    color: #ffffff;
    font-weight: 900;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover {
    color: var(--cyan);
}

.movie-desc {
    display: -webkit-box;
    min-height: 3.8em;
    margin: 10px 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.7;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted-strong);
    font-size: 0.82rem;
}

.movie-meta span + span::before {
    content: "·";
    margin-right: 8px;
    color: var(--muted);
}

.tag-row {
    margin-top: 12px;
}

.tag-row.large span {
    min-height: 32px;
    font-size: 0.88rem;
}

.movie-card.compact {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    min-height: 136px;
}

.movie-card.compact .poster-link img {
    height: 100%;
    aspect-ratio: auto;
}

.movie-card.compact .movie-card-body {
    padding: 13px;
}

.movie-card.compact .movie-title {
    min-height: auto;
    -webkit-line-clamp: 1;
}

.movie-card.compact .movie-desc {
    min-height: auto;
    margin: 8px 0;
    -webkit-line-clamp: 2;
}

.movie-card.compact .poster-badge,
.movie-card.compact .poster-type,
.movie-card.compact .tag-row {
    display: none;
}

.movie-row-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 290px);
    gap: 18px;
    margin-top: 24px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
}

.movie-row-scroll .movie-card {
    scroll-snap-align: start;
}

.highlight-panel {
    padding: 28px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 22rem),
        rgba(15, 23, 42, 0.76);
}

.category-grid,
.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.category-card {
    min-height: 190px;
    padding: 20px;
    border-radius: var(--radius-md);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.42);
}

.category-name {
    display: block;
    color: #ffffff;
    font-size: 1.16rem;
    font-weight: 950;
}

.category-card p,
.category-overview-card p {
    color: var(--muted);
    line-height: 1.7;
}

.category-preview {
    display: grid;
    gap: 6px;
    margin-top: 14px;
    color: var(--muted-strong);
    font-size: 0.84rem;
}

.category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-overview-card {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    border-radius: var(--radius-md);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    align-items: center;
}

.category-covers img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.category-overview-card strong {
    color: var(--cyan);
}

.page-main {
    padding-bottom: 36px;
}

.page-hero {
    position: relative;
    margin-top: 32px;
    padding: 64px;
    border: 1px solid var(--line);
    border-radius: 34px;
    overflow: hidden;
    background:
        radial-gradient(circle at 78% 0%, rgba(34, 211, 238, 0.18), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.78));
    box-shadow: var(--shadow-lg);
}

.page-hero h1 {
    max-width: 850px;
    margin: 10px 0 14px;
    font-size: clamp(2.3rem, 5vw, 4.8rem);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted-strong);
    font-size: 1.1rem;
    line-height: 1.9;
}

.compact-hero {
    min-height: auto;
}

.filter-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius-md);
    margin-top: 24px;
}

.search-box {
    display: grid;
    gap: 8px;
}

.search-box span,
.filter-line span {
    color: var(--muted-strong);
    font-size: 0.86rem;
    font-weight: 900;
}

.search-box input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #ffffff;
    outline: none;
    background: rgba(2, 6, 23, 0.56);
}

.search-box input:focus {
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.filter-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.filter-line button {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted-strong);
    cursor: pointer;
    background: rgba(15, 23, 42, 0.72);
}

.filter-line button.active,
.filter-line button:hover {
    color: #ffffff;
    border-color: rgba(34, 211, 238, 0.42);
    background: rgba(14, 116, 144, 0.28);
}

.result-count {
    color: var(--muted);
    font-size: 0.9rem;
}

.result-count strong {
    color: var(--cyan);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 56px 0;
    border-bottom: 1px solid var(--line);
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.96)),
        var(--detail-cover) center / cover no-repeat;
    filter: blur(4px) saturate(1.1);
    transform: scale(1.04);
}

.detail-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 0.9rem;
}

.breadcrumb a:hover {
    color: var(--cyan);
}

.detail-info h1 {
    margin: 10px 0 16px;
    font-size: clamp(2.2rem, 5vw, 4.6rem);
    line-height: 1.06;
    letter-spacing: -0.06em;
}

.detail-info p {
    max-width: 860px;
    color: var(--muted-strong);
    font-size: 1.08rem;
    line-height: 1.9;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.detail-meta-grid div {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.66);
}

.detail-meta-grid span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
}

.detail-meta-grid strong {
    display: block;
    margin-top: 4px;
    color: #ffffff;
}

.player-section {
    scroll-margin-top: 88px;
}

.player-status {
    color: var(--green);
    font-weight: 800;
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    margin-top: 24px;
    border-radius: 28px;
    overflow: hidden;
    background: #000000;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background:
        radial-gradient(circle at center, rgba(34, 211, 238, 0.22), transparent 18rem),
        rgba(2, 6, 23, 0.58);
    backdrop-filter: blur(4px);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-shell.playing .play-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 48px rgba(34, 211, 238, 0.32);
}

.play-overlay strong {
    font-size: 1.3rem;
}

.play-overlay em {
    max-width: 80%;
    color: var(--muted-strong);
    font-style: normal;
    text-align: center;
}

.player-message {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: none;
    padding: 12px 14px;
    border-radius: 14px;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.76);
}

.player-message.show {
    display: block;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding: 52px 0 0;
}

.content-card {
    padding: 28px;
    border-radius: var(--radius-lg);
}

.content-card h2 {
    margin: 10px 0 12px;
    font-size: 1.8rem;
}

.content-card p {
    color: var(--muted-strong);
    line-height: 2;
}

.compact-actions {
    margin: 0;
}

.ranking-list {
    display: grid;
    gap: 1px;
    margin-top: 24px;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.rank-row {
    display: grid;
    grid-template-columns: 70px 48px minmax(0, 1fr) minmax(200px, 0.6fr) 90px;
    gap: 14px;
    align-items: center;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.78);
}

.rank-row:hover {
    background: rgba(30, 41, 59, 0.88);
}

.rank-row img {
    width: 48px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 8px;
}

.rank-num {
    color: var(--cyan);
    font-weight: 950;
}

.rank-title {
    overflow: hidden;
    color: #ffffff;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-meta {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-score {
    color: var(--orange);
    font-weight: 900;
    text-align: right;
}

.site-footer {
    margin-top: 40px;
    padding: 46px 0 0;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.8fr 1.2fr;
    gap: 36px;
}

.footer-brand {
    margin-bottom: 14px;
}

.site-footer p {
    max-width: 520px;
    color: var(--muted);
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 14px;
}

.footer-links {
    display: grid;
    gap: 10px;
    color: var(--muted-strong);
}

.footer-links.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer-links a:hover {
    color: var(--cyan);
}

.footer-bottom {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 36px;
    padding: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.88rem;
}

[hidden],
.movie-card.is-hidden,
.rank-row.is-hidden {
    display: none !important;
}

@media (max-width: 1080px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-rail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rail-heading {
        grid-column: 1 / -1;
    }

    .movie-grid,
    .featured-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .detail-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.96);
        box-shadow: var(--shadow-md);
    }

    .site-nav.open {
        display: flex;
    }

    .hero,
    .hero-inner {
        min-height: auto;
    }

    .hero-slider {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 28px;
    }

    .hero-visual {
        order: -1;
    }

    .hero-visual img {
        width: 220px;
    }

    .hero-dots {
        left: 28px;
        bottom: 24px;
    }

    .hero-rail {
        grid-template-columns: 1fr;
    }

    .quick-search-card,
    .section-heading,
    .rail-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .stat-grid,
    .movie-grid,
    .featured-grid,
    .related-grid,
    .category-grid,
    .category-overview-grid,
    .detail-content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .page-hero {
        padding: 34px 24px;
    }

    .detail-hero-inner {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 260px;
    }

    .rank-row {
        grid-template-columns: 48px 42px minmax(0, 1fr);
    }

    .rank-meta,
    .rank-score {
        display: none;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1200px);
    }

    .brand-text {
        max-width: 68vw;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hero-slider {
        min-height: 680px;
        border-radius: 24px;
    }

    .hero-copy h1 {
        font-size: 2.3rem;
    }

    .movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .movie-card-body {
        padding: 12px;
    }

    .movie-title {
        font-size: 0.94rem;
    }

    .movie-desc,
    .movie-meta,
    .tag-row {
        display: none;
    }

    .highlight-panel {
        padding: 18px;
    }

    .movie-row-scroll {
        grid-auto-columns: minmax(210px, 240px);
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
}
