: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.18);
    --text: #e5e7eb;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --brand: #10b981;
    --brand-strong: #059669;
    --brand-soft: rgba(16, 185, 129, 0.14);
    --blue-soft: rgba(59, 130, 246, 0.13);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --radius: 22px;
    --radius-sm: 14px;
    --max: 1280px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 34rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 30rem),
        var(--bg);
    color: var(--text);
    line-height: 1.65;
}

body.nav-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.nav-shell {
    width: min(100% - 32px, var(--max));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981, #22d3ee);
    color: #00140f;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.28);
}

.logo-text {
    font-size: 1.08rem;
    white-space: nowrap;
}

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

.desktop-nav a,
.mobile-nav a {
    color: var(--soft);
    padding: 10px 14px;
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: #6ee7b7;
    background: rgba(15, 23, 42, 0.86);
    transform: translateY(-1px);
}

.header-search {
    margin-left: auto;
    width: min(360px, 30vw);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
}

.header-search input,
.home-search-form input,
.filter-search input,
.filter-selects select {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.header-search input {
    padding: 8px 10px;
}

.header-search button,
.home-search-form button,
.filter-actions button {
    border: 0;
    cursor: pointer;
    color: white;
    background: var(--brand);
    border-radius: 999px;
    padding: 8px 15px;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.home-search-form button:hover,
.filter-actions button:hover {
    background: var(--brand-strong);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: var(--text);
}

.mobile-nav {
    display: none;
    width: min(100% - 32px, var(--max));
    margin: 0 auto 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel-strong);
}

.hero-carousel {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-track,
.hero-slide,
.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg {
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.74) 46%, rgba(2, 6, 23, 0.48)),
        linear-gradient(0deg, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0.18) 42%, rgba(2, 6, 23, 0.88)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    filter: saturate(1.08);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(100% - 32px, var(--max));
    min-height: 600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 56px;
    padding: 76px 0 64px;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6ee7b7;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--brand);
    box-shadow: 0 0 22px var(--brand);
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 14px 0 16px;
    font-size: clamp(2.6rem, 6vw, 5.3rem);
    line-height: 1.02;
    letter-spacing: -0.08em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    color: var(--soft);
    font-size: 1.08rem;
    max-width: 680px;
}

.hero-tags,
.detail-tags,
.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span,
.movie-tags span {
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.12);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.8rem;
}

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

.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: white;
    background: linear-gradient(135deg, var(--brand), #14b8a6);
    box-shadow: 0 18px 40px rgba(16, 185, 129, 0.25);
}

.ghost-btn,
.text-link {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.58);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.ghost-btn:hover,
.text-link:hover {
    border-color: rgba(16, 185, 129, 0.42);
    background: rgba(16, 185, 129, 0.12);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.18), rgba(15, 23, 42, 0.8));
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

img.is-missing {
    opacity: 0;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: white;
    background: rgba(15, 23, 42, 0.62);
    cursor: pointer;
    font-size: 2rem;
    transform: translateY(-50%);
    backdrop-filter: blur(12px);
}

.hero-prev {
    left: max(18px, calc((100vw - var(--max)) / 2 - 70px));
}

.hero-next {
    right: max(18px, calc((100vw - var(--max)) / 2 - 70px));
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 30px;
    background: var(--brand);
}

.home-search-section,
.page-shell,
.detail-shell {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
}

.home-search-section {
    margin-top: -46px;
    position: relative;
    z-index: 8;
}

.home-search-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 470px);
    align-items: center;
    gap: 28px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.home-search-card h2 {
    margin: 8px 0 4px;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
}

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

.home-search-form {
    display: flex;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.58);
}

.home-search-form input {
    padding: 12px 14px;
}

.home-shell,
.page-shell {
    padding: 56px 0;
}

.section-block {
    margin-bottom: 70px;
}

.section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.section-title span {
    color: #6ee7b7;
    font-size: 0.86rem;
    font-weight: 800;
}

.section-title h2,
.section-title h3 {
    margin: 4px 0 0;
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    letter-spacing: -0.04em;
}

.section-title a {
    color: #a7f3d0;
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(16, 185, 129, 0.42);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.32);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(16, 185, 129, 0.24), rgba(14, 165, 233, 0.14)),
        #0f172a;
}

.movie-poster img {
    transition: transform 0.3s ease, opacity 0.2s ease;
}

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

.movie-badge,
.movie-type {
    position: absolute;
    top: 10px;
    display: inline-flex;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.movie-badge {
    left: 10px;
    color: #d1fae5;
    background: rgba(6, 95, 70, 0.78);
}

.movie-type {
    right: 10px;
    color: #e0f2fe;
    background: rgba(30, 64, 175, 0.72);
}

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

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 2.9em;
    color: white;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover {
    color: #6ee7b7;
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    color: #cbd5e1;
    font-size: 0.78rem;
}

.movie-meta span {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.movie-tags {
    margin-top: 10px;
}

.movie-tags span {
    font-size: 0.72rem;
    padding: 3px 8px;
}

.split-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    align-items: start;
}

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

.category-chip-grid a {
    min-height: 112px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.86), rgba(16, 185, 129, 0.08));
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-chip-grid a:hover {
    transform: translateY(-3px);
    border-color: rgba(16, 185, 129, 0.42);
}

.category-chip-grid span {
    display: block;
    color: white;
    font-size: 1.05rem;
    font-weight: 900;
    margin-bottom: 8px;
}

.category-chip-grid small {
    color: var(--muted);
}

.rank-card,
.info-card,
.ranking-section,
.filter-panel,
.category-card,
.player-card,
.story-section {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.rank-card {
    position: sticky;
    top: 94px;
    padding: 20px;
}

.rank-card-title,
.info-card h2,
.story-section h2 {
    margin: 0 0 16px;
    color: white;
    font-size: 1.25rem;
}

.rank-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.rank-row:last-child {
    border-bottom: 0;
}

.rank-number {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #022c22;
    background: #6ee7b7;
    font-weight: 900;
    font-size: 0.8rem;
}

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

.rank-meta {
    color: var(--muted);
    font-size: 0.82rem;
    white-space: nowrap;
}

.category-preview {
    margin-bottom: 58px;
}

.small-title {
    align-items: center;
}

.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 32px;
    padding: 52px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        radial-gradient(circle at 88% 20%, rgba(16, 185, 129, 0.26), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72));
}

.page-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto auto;
    gap: 18px;
    align-items: end;
    margin-bottom: 28px;
    padding: 18px;
}

.filter-search label,
.filter-selects span {
    display: block;
    margin-bottom: 8px;
    color: var(--soft);
    font-size: 0.85rem;
    font-weight: 800;
}

.filter-search input,
.filter-selects select {
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    background: rgba(2, 6, 23, 0.55);
}

.filter-selects {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-selects label {
    min-width: 138px;
}

.filter-actions button {
    height: 46px;
    padding: 0 20px;
}

.empty-state {
    display: none;
    margin-top: 24px;
    padding: 28px;
    border: 1px dashed rgba(148, 163, 184, 0.26);
    border-radius: 18px;
    color: var(--muted);
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

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

.category-card {
    overflow: hidden;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
}

.category-card-cover {
    min-height: 270px;
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.22), rgba(2, 6, 23, 0.7));
}

.category-card-body {
    padding: 22px;
}

.category-card-body span {
    color: #6ee7b7;
    font-weight: 800;
}

.category-card-body h2 {
    margin: 4px 0 8px;
}

.category-card-body p {
    color: var(--muted);
}

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

.category-sample-links a {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--soft);
    background: rgba(2, 6, 23, 0.4);
}

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

.ranking-section {
    padding: 20px;
}

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

.ranking-list .rank-meta {
    grid-column: 2;
}

.detail-page {
    padding-bottom: 60px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    border-bottom: 1px solid var(--line);
}

.detail-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.8) 46%, rgba(2, 6, 23, 0.58)),
        linear-gradient(0deg, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0.16)),
        var(--detail-image);
    background-size: cover;
    background-position: center;
    filter: saturate(1.1);
    transform: scale(1.04);
}

.detail-shell {
    position: relative;
    z-index: 2;
}

.detail-hero .detail-shell {
    min-height: 560px;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    align-items: center;
    gap: 44px;
    padding: 64px 0;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.2), rgba(14, 165, 233, 0.12));
    box-shadow: var(--shadow);
}

.detail-info h1 {
    font-size: clamp(2.4rem, 5.8vw, 5rem);
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    margin-top: 46px;
}

.player-section {
    margin-bottom: 26px;
}

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
}

.movie-video {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.68));
    cursor: pointer;
}

.player-start span {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: rgba(16, 185, 129, 0.92);
    font-size: 2rem;
    box-shadow: 0 20px 55px rgba(16, 185, 129, 0.28);
    transition: transform 0.2s ease;
}

.player-start:hover span {
    transform: scale(1.06);
}

.player-card.is-playing .player-start {
    display: none;
}

.story-section {
    padding: 26px;
    margin-bottom: 22px;
}

.story-section p {
    margin: 0;
    color: var(--soft);
    font-size: 1.02rem;
}

.detail-side {
    display: grid;
    gap: 20px;
    align-content: start;
}

.info-card {
    padding: 22px;
}

.detail-meta-table {
    display: grid;
    gap: 12px;
}

.detail-meta-table div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.detail-meta-table div:last-child {
    border-bottom: 0;
}

.detail-meta-table span {
    color: var(--muted);
}

.detail-meta-table strong {
    color: white;
    font-weight: 800;
}

.related-mini .rank-row {
    grid-template-columns: 38px minmax(0, 1fr);
}

.related-mini .rank-meta {
    grid-column: 2;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.82);
}

.footer-shell {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    padding: 36px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
}

.footer-shell p {
    max-width: 560px;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

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

@media (max-width: 1180px) {
    .movie-grid,
    .library-grid,
    .compact-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hero-content {
        grid-template-columns: minmax(0, 1fr) 290px;
    }

    .ranking-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

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

    .hero-content,
    .home-search-card,
    .split-block,
    .detail-content-grid,
    .detail-hero .detail-shell,
    .filter-panel,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .hero-content {
        gap: 28px;
        padding-top: 58px;
    }

    .hero-poster {
        width: min(260px, 70vw);
        margin: 0 auto;
    }

    .rank-card {
        position: static;
    }

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

    .detail-poster {
        width: min(270px, 76vw);
    }
}

@media (max-width: 720px) {
    .nav-shell,
    .home-search-section,
    .page-shell,
    .detail-shell,
    .footer-shell {
        width: min(100% - 24px, var(--max));
    }

    .hero-carousel,
    .hero-content {
        min-height: 640px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-info h1 {
        letter-spacing: -0.05em;
    }

    .hero-control {
        display: none;
    }

    .home-search-form,
    .filter-selects,
    .footer-shell {
        flex-direction: column;
        align-items: stretch;
    }

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

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

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

    .category-card-cover {
        min-height: 220px;
    }

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

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

    .detail-hero .detail-shell {
        min-height: auto;
        padding: 42px 0;
    }

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

    .rank-meta {
        grid-column: 2;
    }

    .player-start span {
        width: 68px;
        height: 68px;
        font-size: 1.55rem;
    }
}

@media (max-width: 420px) {
    .movie-grid,
    .library-grid,
    .compact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

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

    .movie-desc,
    .movie-tags {
        display: none;
    }
}
