:root {
    --page-bg: #fffbeb;
    --page-bg-soft: #fff7ed;
    --surface: rgba(255, 255, 255, 0.86);
    --surface-strong: #ffffff;
    --text-main: #301c0a;
    --text-soft: #7c4a15;
    --text-muted: #a16207;
    --brand: #d97706;
    --brand-dark: #b45309;
    --brand-deep: #7c2d12;
    --brand-light: #f59e0b;
    --line: rgba(217, 119, 6, 0.22);
    --shadow: 0 24px 70px rgba(146, 64, 14, 0.18);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.2), transparent 30rem),
        linear-gradient(180deg, var(--page-bg), var(--page-bg-soft));
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 237, 213, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 28px rgba(146, 64, 14, 0.12);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1200px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(180, 83, 9, 0.28);
}

.logo-copy {
    display: grid;
    gap: 2px;
}

.logo-copy strong {
    font-size: 1.18rem;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--brand-deep), var(--brand));
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
}

.logo-copy small {
    color: var(--text-muted);
    font-size: 0.74rem;
}

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

.desktop-nav > a,
.nav-dropdown > button,
.mobile-nav a {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    color: #78350f;
    background: transparent;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.desktop-nav > a:hover,
.desktop-nav > a.is-active,
.nav-dropdown:hover > button,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    background: rgba(245, 158, 11, 0.16);
    color: var(--brand-deep);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 180px;
    display: grid;
    padding: 10px;
    gap: 4px;
    background: rgba(255, 251, 235, 0.96);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    padding: 9px 10px;
    border-radius: 10px;
    color: #78350f;
}

.nav-dropdown-menu a:hover {
    background: rgba(245, 158, 11, 0.14);
}

.mobile-menu-button {
    display: none;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.7);
    color: var(--brand-deep);
    border-radius: 12px;
    padding: 9px 13px;
    font-weight: 800;
}

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

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #1c0f06;
}

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

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 5s ease;
}

.hero-slide.is-active img {
    transform: scale(1);
}

.hero-shade,
.detail-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.32) 52%, rgba(0, 0, 0, 0.66)),
        linear-gradient(0deg, rgba(0, 0, 0, 0.74), transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: #ffffff;
    padding-top: 28px;
}

.hero-eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #92400e;
    background: rgba(254, 243, 199, 0.86);
    border: 1px solid rgba(245, 158, 11, 0.24);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.hero-eyebrow {
    color: #fff7ed;
    background: rgba(217, 119, 6, 0.78);
    border-color: rgba(255, 255, 255, 0.18);
}

.hero-content h1 {
    width: min(760px, 100%);
    margin: 18px 0 16px;
    font-size: clamp(2.5rem, 7vw, 5.2rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p {
    width: min(680px, 100%);
    margin: 0 0 24px;
    color: #ffedd5;
    font-size: clamp(1.05rem, 2vw, 1.24rem);
    line-height: 1.8;
}

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

.hero-tags span,
.detail-tags span,
.movie-card-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #7c2d12;
    background: rgba(255, 247, 237, 0.86);
    font-size: 0.78rem;
    font-weight: 700;
}

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

.primary-button,
.ghost-button,
.section-link,
.filter-submit,
.rank-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button,
.filter-submit,
.rank-action {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: 0 14px 28px rgba(217, 119, 6, 0.28);
}

.primary-button:hover,
.filter-submit:hover,
.rank-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(217, 119, 6, 0.34);
}

.ghost-button,
.section-link {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
}

.section-link {
    color: var(--brand-deep);
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(217, 119, 6, 0.2);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.32);
    font-size: 2.1rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
    opacity: 0.72;
    transition: opacity 0.25s ease, background 0.25s ease;
}

.hero-arrow:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.52);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: #f59e0b;
}

main {
    min-height: 70vh;
}

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

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

.home-search-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.home-search-card > span {
    color: var(--brand-dark);
    font-weight: 800;
}

.home-search-card h2 {
    margin: 8px 0 6px;
    font-size: clamp(1.8rem, 4vw, 3rem);
    letter-spacing: -0.04em;
}

.home-search-card p {
    margin: 0 0 22px;
    color: var(--text-soft);
}

.content-section {
    padding: 64px 0 0;
}

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

.section-heading h2 {
    margin: 12px 0 6px;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.7;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(140px, 0.8fr)) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 26px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--text-soft);
    font-size: 0.84rem;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(217, 119, 6, 0.24);
    border-radius: 14px;
    padding: 0 14px;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.88);
    outline: none;
    transition: border 0.25s ease, box-shadow 0.25s ease;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(217, 119, 6, 0.62);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.filter-status {
    grid-column: 1 / -1;
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: 0 14px 32px rgba(146, 64, 14, 0.11);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(217, 119, 6, 0.46);
    box-shadow: 0 22px 52px rgba(146, 64, 14, 0.18);
}

.movie-card.is-hidden,
.rank-item.is-hidden {
    display: none;
}

.movie-card-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #78350f, #f59e0b);
}

.movie-card-poster img,
.rank-cover img,
.detail-poster img,
.category-overview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.movie-card-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(120, 53, 15, 0.78);
    font-size: 0.76rem;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

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

.movie-card-meta,
.rank-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-content h3 a:hover {
    color: var(--brand-dark);
}

.movie-card p {
    min-height: 3.3em;
    margin: 0 0 12px;
    color: var(--text-soft);
    line-height: 1.65;
    font-size: 0.92rem;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card-tags span {
    background: #fff7ed;
    color: var(--text-soft);
}

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

.category-tile,
.category-overview-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(254, 243, 199, 0.82));
    box-shadow: 0 14px 34px rgba(146, 64, 14, 0.11);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile {
    min-height: 130px;
    padding: 22px;
    display: grid;
    align-content: space-between;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 48px rgba(146, 64, 14, 0.16);
}

.category-tile strong {
    font-size: 1.32rem;
}

.category-tile span {
    color: var(--text-soft);
    line-height: 1.6;
}

.rank-list {
    display: grid;
    gap: 14px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 72px 56px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 28px rgba(146, 64, 14, 0.1);
}

.rank-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #78350f, #f59e0b);
}

.rank-number {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--brand-dark);
}

.rank-content h3 {
    margin: 6px 0;
    font-size: 1.08rem;
}

.rank-content p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
}

.page-hero {
    position: relative;
    width: min(1200px, calc(100% - 32px));
    margin: 34px auto 0;
    overflow: hidden;
    padding: 56px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.34), transparent 18rem),
        linear-gradient(135deg, #78350f, #d97706 55%, #f59e0b);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.page-hero .section-kicker {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.22);
}

.page-hero h1 {
    margin: 14px 0 10px;
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 720px;
    margin: 0;
    color: #ffedd5;
    line-height: 1.8;
}

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

.category-overview-card {
    min-height: 280px;
    display: grid;
    align-content: end;
    padding: 18px;
    color: #ffffff;
    isolation: isolate;
}

.category-overview-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.08));
}

.category-overview-card img {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.category-overview-card span {
    width: fit-content;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.86);
    font-weight: 800;
}

.category-overview-card strong {
    line-height: 1.6;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: #1c0f06;
}

.detail-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px);
    transform: scale(1.06);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 58px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 28px;
    color: #ffedd5;
    font-size: 0.95rem;
}

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

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

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 26px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
    background: linear-gradient(135deg, #78350f, #f59e0b);
}

.detail-info h1 {
    margin: 16px 0;
    font-size: clamp(2.4rem, 6vw, 5.2rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.detail-one-line {
    max-width: 760px;
    color: #ffedd5;
    font-size: 1.14rem;
    line-height: 1.8;
}

.detail-meta {
    margin: 20px 0;
    color: #fed7aa;
}

.detail-info .primary-button {
    margin-top: 28px;
}

.detail-player-section {
    padding-top: 54px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(217, 119, 6, 0.24);
    border-radius: 28px;
    background: #090502;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #090502;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(120, 53, 15, 0.28), rgba(0, 0, 0, 0.52));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-start span {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: 0 18px 44px rgba(217, 119, 6, 0.42);
    font-size: 1.6rem;
}

.player-start strong {
    font-size: 1.2rem;
}

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

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

.detail-copy-grid article {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 14px 34px rgba(146, 64, 14, 0.1);
}

.detail-copy-grid h2 {
    margin: 14px 0 12px;
    font-size: 1.7rem;
}

.detail-copy-grid p {
    margin: 0;
    color: var(--text-soft);
    line-height: 2;
}

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

.site-footer {
    margin-top: 72px;
    padding: 42px 0 24px;
    background: linear-gradient(180deg, rgba(255, 247, 237, 0), rgba(254, 243, 199, 0.82));
    border-top: 1px solid var(--line);
}

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 1.8fr;
    gap: 34px;
}

.footer-logo {
    color: var(--brand-deep);
    font-size: 1.3rem;
}

.footer-inner p {
    color: var(--text-soft);
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: end;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
}

.footer-links a:hover {
    color: var(--brand-deep);
    background: rgba(245, 158, 11, 0.13);
}

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 28px auto 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

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

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

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

    .filter-submit {
        width: 100%;
    }
}

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

    .mobile-menu-button {
        display: inline-flex;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-arrow {
        display: none;
    }

    .section-heading {
        display: grid;
    }

    .rank-list.compact {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 66px 46px minmax(0, 1fr);
    }

    .rank-action {
        grid-column: 2 / -1;
        width: fit-content;
    }

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

    .detail-poster {
        width: min(260px, 70vw);
    }

    .detail-copy-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-links {
        justify-content: start;
    }
}

@media (max-width: 640px) {
    .header-inner {
        width: min(100% - 20px, 1200px);
    }

    .logo-copy small {
        display: none;
    }

    .hero-carousel {
        height: 520px;
    }

    .hero-content {
        width: min(100% - 28px, 1200px);
        justify-content: end;
        padding-bottom: 86px;
    }

    .hero-content h1 {
        font-size: clamp(2.2rem, 14vw, 3.6rem);
    }

    .home-search-section,
    .content-section,
    .page-hero,
    .detail-hero-inner,
    .site-footer .footer-inner,
    .footer-bottom {
        width: min(100% - 24px, 1200px);
    }

    .home-search-card,
    .page-hero {
        padding: 22px;
        border-radius: 22px;
    }

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

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

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

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

    .rank-number {
        position: absolute;
        left: 16px;
        top: 14px;
        color: #ffffff;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    }

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

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

    .detail-info h1 {
        font-size: clamp(2.2rem, 13vw, 3.5rem);
    }

    .player-shell {
        border-radius: 18px;
    }
}

@media (max-width: 420px) {
    .movie-grid,
    .library-grid,
    .related-grid,
    .category-strip,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }
}
