:root {
    --amber: #f59e0b;
    --amber-dark: #b45309;
    --rose: #f43f5e;
    --rose-dark: #be123c;
    --sky: #0ea5e9;
    --sky-dark: #0369a1;
    --ink: #111827;
    --muted: #6b7280;
    --soft: #fff7ed;
    --card: rgba(255, 255, 255, 0.92);
    --shadow: 0 22px 55px rgba(17, 24, 39, 0.14);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 32rem),
        radial-gradient(circle at 80% 10%, rgba(244, 63, 94, 0.14), transparent 32rem),
        linear-gradient(135deg, #fffbeb 0%, #fff1f2 48%, #f0f9ff 100%);
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.92), rgba(255, 241, 242, 0.92), rgba(240, 249, 255, 0.92));
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 36px rgba(17, 24, 39, 0.10);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    height: 66px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: transparent;
    background: linear-gradient(90deg, var(--amber-dark), var(--rose-dark), var(--sky-dark));
    -webkit-background-clip: text;
    background-clip: text;
}

.brand {
    font-size: 25px;
}

.footer-brand {
    font-size: 22px;
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber), var(--rose), var(--sky));
    box-shadow: 0 12px 24px rgba(244, 63, 94, 0.25);
    position: relative;
    flex: 0 0 auto;
}

.brand-icon::after {
    content: "";
    position: absolute;
    inset: 10px 9px 10px 12px;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    background: rgba(255, 255, 255, 0.96);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.desktop-nav a,
.mobile-nav a {
    padding: 9px 15px;
    border-radius: 999px;
    color: #374151;
    font-weight: 700;
    transition: all 0.22s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #fff;
    background: linear-gradient(90deg, var(--amber), var(--rose));
    box-shadow: 0 10px 22px rgba(244, 63, 94, 0.22);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #374151;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
}

.hero {
    position: relative;
    min-height: 640px;
    height: 86vh;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.1s ease;
}

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(120, 53, 15, 0.92), rgba(136, 19, 55, 0.86), rgba(12, 74, 110, 0.78)),
        linear-gradient(0deg, rgba(17, 24, 39, 0.78), transparent 58%);
}

.hero-content {
    position: absolute;
    z-index: 3;
    left: max(32px, calc((100vw - 1180px) / 2));
    right: max(32px, calc((100vw - 1180px) / 2));
    top: 50%;
    transform: translateY(-45%);
    width: min(760px, calc(100% - 48px));
    color: #fff;
}

.hero-kicker,
.inner-hero span,
.section-heading span,
.movie-meta-line span,
.category-card-large span,
.rank-panel-head span {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fde68a;
    border: 1px solid rgba(253, 230, 138, 0.38);
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero h1,
.hero h2 {
    margin: 20px 0 8px;
    font-size: clamp(46px, 8vw, 86px);
    line-height: 0.98;
    letter-spacing: -0.08em;
}

.hero h3 {
    margin: 12px 0 0;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.1;
}

.hero p {
    width: min(680px, 100%);
    margin: 22px 0 0;
    color: #fff7ed;
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.75;
}

.hero-tags,
.detail-meta,
.tag-row,
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span,
.filter-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    color: #78350f;
    background: rgba(255, 251, 235, 0.86);
    border: 1px solid rgba(253, 230, 138, 0.82);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.btn-primary,
.btn-secondary,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: all 0.22s ease;
}

.btn-primary {
    min-height: 48px;
    padding: 0 24px;
    color: #fff;
    background: linear-gradient(90deg, var(--amber), var(--rose));
    box-shadow: 0 16px 32px rgba(244, 63, 94, 0.28);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 20px 42px rgba(244, 63, 94, 0.34);
}

.btn-secondary {
    min-height: 48px;
    padding: 0 24px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.24);
}

.btn-primary.full {
    width: 100%;
}

.hero-control {
    position: absolute;
    z-index: 5;
    top: 50%;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 34px;
    cursor: pointer;
    user-select: none;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
    transition: all 0.22s ease;
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.30);
}

.hero-control-left {
    left: 24px;
}

.hero-control-right {
    right: 24px;
}

.hero-dots {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: all 0.22s ease;
}

.hero-dot.active {
    width: 34px;
    background: linear-gradient(90deg, var(--amber), var(--rose));
}

.quick-search {
    position: relative;
    z-index: 8;
    margin-top: -54px;
    padding: 0 16px;
}

.search-panel {
    width: min(1060px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr minmax(260px, 420px);
    gap: 24px;
    align-items: center;
    padding: 24px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-panel span {
    color: var(--amber-dark);
    font-weight: 900;
    letter-spacing: 0.12em;
    font-size: 13px;
}

.search-panel h2 {
    margin: 8px 0 0;
    font-size: clamp(24px, 3vw, 38px);
    letter-spacing: -0.05em;
}

.search-box {
    display: flex;
    align-items: center;
    min-height: 54px;
    border-radius: 999px;
    padding: 4px;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.26), rgba(244, 63, 94, 0.22), rgba(14, 165, 233, 0.20));
}

.search-box input {
    width: 100%;
    min-height: 46px;
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 0 18px;
    color: #111827;
    background: rgba(255, 255, 255, 0.92);
}

.search-box.slim {
    width: min(420px, 100%);
}

.search-box.wide {
    width: min(620px, 100%);
}

.category-section,
.split-section,
.category-overview,
.related-section {
    padding: 72px 0;
}

.section-heading {
    margin: 0 0 28px;
}

.section-heading.compact {
    margin-bottom: 16px;
}

.section-heading h2 {
    margin: 12px 0 0;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.06em;
}

.section-heading p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    border-radius: 24px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #fff;
    box-shadow: 0 18px 38px rgba(17, 24, 39, 0.16);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 48px rgba(17, 24, 39, 0.20);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.84), rgba(17, 24, 39, 0.20));
}

.category-tile span {
    font-size: 24px;
    font-weight: 900;
}

.category-tile p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.55;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.78);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7, #ffe4e6, #e0f2fe);
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.06);
}

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.70), transparent);
}

.rank-mark {
    position: absolute;
    z-index: 3;
    left: 12px;
    top: 12px;
    border-radius: 999px;
    padding: 7px 10px;
    color: #fff;
    font-size: 12px;
    background: linear-gradient(90deg, var(--amber), var(--rose));
    box-shadow: 0 10px 18px rgba(244, 63, 94, 0.28);
}

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

.movie-meta-line {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.movie-meta-line span {
    padding: 5px 9px;
    font-size: 12px;
    color: var(--amber-dark);
    background: #fffbeb;
}

.movie-card h2 {
    margin: 0;
    font-size: 19px;
    line-height: 1.35;
    letter-spacing: -0.03em;
}

.movie-card h2 a:hover {
    color: var(--rose-dark);
}

.movie-card p {
    min-height: 66px;
    margin: 10px 0 14px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
}

.tag-row {
    gap: 7px;
    margin-bottom: 15px;
}

.tag-row span {
    padding: 5px 9px;
    font-size: 12px;
    color: #881337;
    background: #fff1f2;
    border-color: #fecdd3;
}

.text-link {
    color: var(--rose-dark);
    font-size: 14px;
}

.text-link:hover {
    color: var(--amber-dark);
}

.rank-panel {
    position: sticky;
    top: 90px;
    padding: 22px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.78);
}

.rank-panel-head h2 {
    margin: 12px 0 18px;
    font-size: 30px;
    letter-spacing: -0.06em;
}

.rank-list {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.rank-row {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 247, 237, 0.78);
    transition: background 0.22s ease, transform 0.22s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    background: #fff1f2;
}

.rank-row span {
    grid-row: span 2;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber), var(--rose));
}

.rank-row strong {
    line-height: 1.3;
}

.rank-row em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.inner-hero,
.detail-hero {
    position: relative;
    min-height: 340px;
    margin-top: 66px;
    display: grid;
    align-items: center;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 15% 0%, rgba(245, 158, 11, 0.48), transparent 24rem),
        linear-gradient(120deg, #78350f, #881337, #0c4a6e);
}

.inner-hero > div {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0;
}

.inner-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.02;
    letter-spacing: -0.08em;
}

.inner-hero p {
    max-width: 760px;
    margin: 0;
    color: #fff7ed;
    font-size: 18px;
    line-height: 1.8;
}

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

.category-card-large {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 20px;
    align-items: center;
    padding: 18px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.10);
}

.category-card-poster {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 22px;
    background: linear-gradient(135deg, #fef3c7, #ffe4e6, #e0f2fe);
}

.category-card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card-large h2 {
    margin: 10px 0;
    font-size: 28px;
    letter-spacing: -0.05em;
}

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

.sample-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.sample-links a {
    padding: 7px 10px;
    border-radius: 999px;
    background: #fff7ed;
    color: var(--amber-dark);
    font-size: 13px;
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 34px 0 24px;
}

.chip-row {
    gap: 9px;
}

.filter-chip {
    background: rgba(255, 255, 255, 0.78);
    color: #374151;
    transition: all 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
    color: #fff;
    background: linear-gradient(90deg, var(--amber), var(--rose));
    border-color: transparent;
}

.ranking-grid {
    padding-bottom: 72px;
}

.detail-hero {
    min-height: 520px;
}

.detail-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.88), rgba(136, 19, 55, 0.74), rgba(12, 74, 110, 0.62)),
        linear-gradient(0deg, rgba(17, 24, 39, 0.92), transparent 55%);
}

.detail-hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 76px 0 60px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: #fde68a;
    font-weight: 700;
}

.breadcrumb a:hover {
    color: #fff;
}

.detail-hero h1 {
    max-width: 880px;
    margin: 28px 0 16px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 1.03;
    letter-spacing: -0.08em;
}

.detail-hero p {
    max-width: 820px;
    margin: 0;
    color: #fff7ed;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

.detail-meta {
    margin-top: 24px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
    padding: 48px 0 28px;
}

.detail-main {
    display: grid;
    gap: 24px;
}

.player-card,
.content-card,
.side-card {
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.90);
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.80);
}

.player-card {
    overflow: hidden;
    background: #0f172a;
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.site-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #020617;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.24));
}

.play-overlay.hidden {
    display: none;
}

.play-circle {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber), var(--rose));
    box-shadow: 0 24px 44px rgba(244, 63, 94, 0.35);
    font-size: 30px;
    text-indent: 4px;
}

.play-overlay strong {
    font-size: 20px;
}

.content-card {
    padding: 28px;
}

.content-card p {
    margin: 0;
    color: #374151;
    font-size: 17px;
    line-height: 2;
}

.detail-tags {
    margin-top: 22px;
    margin-bottom: 0;
}

.detail-side {
    position: sticky;
    top: 90px;
    display: grid;
    gap: 20px;
}

.side-card {
    padding: 22px;
}

.side-card h2 {
    margin: 0 0 18px;
    font-size: 24px;
    letter-spacing: -0.05em;
}

.side-card dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px 14px;
    margin: 0;
}

.side-card dt {
    color: var(--muted);
}

.side-card dd {
    margin: 0;
    font-weight: 700;
}

.poster-side {
    padding: 0;
    overflow: hidden;
}

.poster-side img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.detail-pager a {
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
    color: var(--amber-dark);
    font-weight: 800;
}

.detail-pager a:nth-child(2) {
    text-align: right;
    color: var(--rose-dark);
}

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

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

.movie-card-small h2 {
    font-size: 16px;
}

.movie-card-small p,
.movie-card-small .tag-row {
    display: none;
}

.site-footer {
    margin-top: 40px;
    padding: 52px 0 24px;
    color: #d1d5db;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 28rem),
        linear-gradient(135deg, #111827, #1f2937 52%, #0f172a);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 30px;
}

.footer-grid p {
    max-width: 420px;
    line-height: 1.8;
    color: #9ca3af;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 10px;
}

.footer-links a {
    color: #9ca3af;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #fbbf24;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    color: #9ca3af;
    font-size: 14px;
}

.no-match {
    grid-column: 1 / -1;
    padding: 32px;
    border-radius: 24px;
    text-align: center;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.82);
}

@media (max-width: 1100px) {
    .movie-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .split-section,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .rank-panel,
    .detail-side {
        position: static;
    }
}

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

    .menu-toggle {
        display: flex;
    }

    .mobile-nav.open {
        display: grid;
        gap: 8px;
    }

    .brand {
        font-size: 20px;
    }

    .hero {
        min-height: 620px;
        height: 82vh;
    }

    .hero-content {
        left: 20px;
        right: 20px;
        width: auto;
    }

    .hero-control {
        display: none;
    }

    .search-panel {
        grid-template-columns: 1fr;
    }

    .category-grid,
    .movie-grid,
    .category-overview,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

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

    .detail-pager a:nth-child(2) {
        text-align: left;
    }
}

@media (max-width: 560px) {
    .container,
    .nav-wrap,
    .mobile-nav,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 24px, 1180px);
    }

    .hero h1,
    .hero h2 {
        font-size: 42px;
    }

    .hero h3 {
        font-size: 28px;
    }

    .hero p {
        font-size: 16px;
    }

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

    .movie-card p {
        min-height: auto;
    }

    .content-card,
    .side-card {
        padding: 20px;
    }

    .side-card dl {
        grid-template-columns: 1fr;
    }
}
