:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --blue-2: #3b82f6;
    --deep: #0f172a;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 30px rgba(37, 99, 235, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 20% 0%, rgba(59, 130, 246, 0.10), transparent 28rem),
        linear-gradient(180deg, #f8fafc 0%, #eef5ff 48%, #f8fafc 100%);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(248, 250, 252, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    height: 68px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #2563eb, #0f172a);
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
}

.brand-text em {
    margin-top: 3px;
    font-size: 12px;
    color: var(--muted);
    font-style: normal;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    color: #475569;
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.09);
    transform: translateY(-1px);
}

.header-search,
.mobile-search,
.hero-search,
.page-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.hero-search input,
.page-filter input {
    border: 1px solid #dbeafe;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    outline: none;
    border-radius: 999px;
    padding: 11px 16px;
    min-width: 220px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.page-filter input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18);
}

.header-search button,
.mobile-search button,
.hero-search button,
.page-filter button {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.22);
}

.mobile-menu-button {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.09);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.mobile-menu-button span {
    width: 18px;
    height: 2px;
    background: #1d4ed8;
    border-radius: 9px;
}

.mobile-panel {
    display: none;
    padding: 14px 20px 22px;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.96);
}

.mobile-panel.open {
    display: block;
}

.mobile-nav-link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: #475569;
    margin-top: 4px;
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
    color: #1d4ed8;
    background: #eff6ff;
}

.hero-section {
    position: relative;
    height: 640px;
    min-height: 560px;
    overflow: hidden;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    background-size: cover;
    background-position: center;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-blur {
    position: absolute;
    inset: -28px;
    background-size: cover;
    background-position: center;
    filter: blur(16px);
    transform: scale(1.08);
    opacity: 0.46;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 58, 138, 0.78) 48%, rgba(15, 23, 42, 0.72) 100%),
        radial-gradient(circle at 78% 28%, rgba(59, 130, 246, 0.28), transparent 24rem);
}

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

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

.hero-kicker,
.detail-kicker,
.page-hero span,
.section-heading span,
.category-overview-head span {
    display: inline-flex;
    color: #93c5fd;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.96;
    color: #fff;
    letter-spacing: -0.05em;
}

.hero-copy p {
    margin: 0 0 24px;
    max-width: 680px;
    color: #dbeafe;
    font-size: 19px;
    line-height: 1.8;
}

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

.hero-tags span,
.card-tags span,
.tag-cloud span,
.detail-badges span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: #1e40af;
    background: rgba(219, 234, 254, 0.95);
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    box-shadow: 0 16px 35px rgba(37, 99, 235, 0.32);
}

.ghost-button {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 20px 42px rgba(37, 99, 235, 0.34);
}

.hero-cover {
    position: relative;
    display: block;
    border-radius: 30px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

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

.hero-cover span,
.poster-play,
.rank-play,
.play-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hero-cover span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 76px;
    height: 76px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    color: #fff;
    background: rgba(37, 99, 235, 0.88);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.38);
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 78px;
    transform: translateX(-50%);
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 28px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 48px;
    background: #60a5fa;
}

.hero-search {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 24px;
    width: min(720px, calc(100% - 48px));
    transform: translateX(-50%);
    padding: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-search input {
    flex: 1;
    min-width: 0;
}

.section-block {
    max-width: 1280px;
    margin: 0 auto;
    padding: 68px 24px;
}

.section-heading,
.category-overview-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.section-heading h2,
.category-overview-head h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-heading a,
.category-overview-head a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #dbeafe;
    font-weight: 700;
    white-space: nowrap;
}

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

.category-tile,
.category-overview-card,
.prose-card,
.detail-text-card,
.detail-meta-grid div {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(219, 234, 254, 0.86);
    box-shadow: var(--soft-shadow);
}

.category-tile {
    display: block;
    padding: 22px;
    border-radius: var(--radius);
    min-height: 142px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-tile span {
    display: block;
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 800;
    color: #1e3a8a;
}

.category-tile p,
.category-overview-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--soft-shadow);
    border: 1px solid rgba(226, 232, 240, 0.88);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-poster,
.rank-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #e2e8f0;
}

.movie-poster {
    aspect-ratio: 3 / 4;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(15, 23, 42, 0.72));
}

.quality-badge,
.poster-year,
.rank-number {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.quality-badge {
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
}

.poster-year {
    right: 12px;
    bottom: 12px;
    padding: 5px 9px;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
}

.poster-play {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    width: 50px;
    height: 50px;
    transform: translate(-50%, -50%) scale(0.9);
    border-radius: 50%;
    color: #fff;
    background: rgba(37, 99, 235, 0.86);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-small-meta {
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}

.movie-card h3 {
    margin: 0 0 9px;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-card h3 a:hover {
    color: #2563eb;
}

.movie-card p {
    margin: 0 0 12px;
    min-height: 44px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.card-tags span {
    min-height: 24px;
    font-size: 11px;
    color: #475569;
    background: #f1f5f9;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    padding: 14px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.88);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-poster {
    border-radius: 16px;
    aspect-ratio: 3 / 4;
}

.rank-number {
    left: 10px;
    top: 10px;
    width: 34px;
    height: 34px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.rank-play {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    background: rgba(37, 99, 235, 0.88);
}

.rank-info h3 {
    margin: 4px 0 8px;
    font-size: 20px;
}

.rank-info p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.65;
}

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rank-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 12px;
    font-weight: 700;
}

.ranking-list {
    display: grid;
    gap: 18px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #1e3a8a, #0f172a);
}

.page-hero {
    max-width: 1280px;
    margin: 26px auto 0;
    padding: 58px 42px;
    border-radius: 32px;
    min-height: 230px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    box-shadow: var(--shadow);
}

.small-hero {
    background:
        radial-gradient(circle at 82% 20%, rgba(96, 165, 250, 0.42), transparent 26rem),
        linear-gradient(135deg, #2563eb, #0f172a);
}

.category-hero {
    background:
        radial-gradient(circle at 84% 16%, rgba(14, 165, 233, 0.38), transparent 24rem),
        linear-gradient(135deg, #1d4ed8, #0f172a);
}

.ranking-hero {
    background:
        radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.24), transparent 24rem),
        linear-gradient(135deg, #1e3a8a, #111827);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(36px, 5vw, 58px);
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 680px;
    margin: 0;
    color: #dbeafe;
    line-height: 1.8;
    font-size: 18px;
}

.page-filter {
    flex: 0 0 auto;
    max-width: 420px;
}

.local-filter button {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.category-overview-card {
    border-radius: 28px;
    padding: 26px;
    margin-bottom: 24px;
}

.overview-stack {
    padding-top: 34px;
}

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

.detail-bg {
    position: absolute;
    inset: -28px;
    background-size: cover;
    background-position: center;
    filter: blur(18px);
    transform: scale(1.08);
    opacity: 0.5;
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 58, 138, 0.74) 52%, rgba(15, 23, 42, 0.8) 100%),
        radial-gradient(circle at 70% 20%, rgba(59, 130, 246, 0.30), transparent 24rem);
}

.detail-inner {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px 74px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #bfdbfe;
    margin-bottom: 34px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 52px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.44);
}

.detail-poster img {
    height: 100%;
    object-fit: cover;
}

.detail-copy h1 {
    margin: 0 0 20px;
    font-size: clamp(44px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 760px;
    margin: 0 0 24px;
    color: #dbeafe;
    font-size: 20px;
    line-height: 1.75;
}

.detail-badges span {
    min-height: 32px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.detail-section {
    padding-bottom: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
    aspect-ratio: 16 / 9;
}

.player-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #020617;
    z-index: 1;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0.74));
    cursor: pointer;
}

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

.play-large {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.42);
    font-size: 30px;
}

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

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
    padding-top: 34px;
}

.detail-text-card {
    border-radius: 26px;
    padding: 28px;
}

.detail-text-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.detail-text-card p,
.prose-card p {
    margin: 0;
    color: #475569;
    line-height: 1.9;
    font-size: 16px;
}

.detail-meta-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.detail-meta-grid div {
    border-radius: 20px;
    padding: 18px;
}

.detail-meta-grid span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
}

.detail-meta-grid strong,
.detail-meta-grid a {
    font-size: 18px;
    color: #1e3a8a;
}

.tag-cloud {
    grid-column: 1 / -1;
}

.empty-state {
    display: none;
    margin: 28px 0 0;
    padding: 20px;
    border-radius: 18px;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.empty-state.show {
    display: block;
}

.prose-card {
    border-radius: 28px;
}

.prose-card p {
    margin-bottom: 18px;
}

.site-footer {
    margin-top: 50px;
    color: #cbd5e1;
    background: linear-gradient(90deg, #0f172a, #1e3a8a, #0f172a);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 24px;
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    gap: 34px;
}

.footer-column h3 {
    color: #fff;
    margin: 0 0 16px;
}

.footer-column p {
    color: #cbd5e1;
    line-height: 1.8;
}

.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-column li {
    margin: 10px 0;
}

.footer-column a:hover {
    color: #93c5fd;
}

.footer-logo .brand-text strong {
    color: #fff;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

.footer-logo .brand-text em {
    color: #cbd5e1;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #94a3b8;
}

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

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

    .header-inner {
        gap: 14px;
    }

    .header-search {
        margin-left: auto;
    }

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

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

@media (max-width: 900px) {
    .header-search {
        display: none;
    }

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

    .hero-cover {
        display: none;
    }

    .hero-search,
    .page-filter {
        flex-direction: column;
        align-items: stretch;
        border-radius: 24px;
    }

    .hero-search input,
    .hero-search button,
    .page-filter input,
    .page-filter button {
        width: 100%;
    }

    .page-hero {
        margin: 16px 16px 0;
        padding: 40px 22px;
        flex-direction: column;
        align-items: stretch;
    }

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

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

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

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

    .detail-poster {
        width: min(280px, 80vw);
    }

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

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

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

@media (max-width: 640px) {
    .header-inner {
        height: 62px;
        padding: 0 14px;
    }

    .brand-text strong {
        font-size: 17px;
    }

    .hero-section {
        height: 620px;
    }

    .hero-content {
        padding: 36px 18px 142px;
    }

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

    .section-block {
        padding: 46px 16px;
    }

    .section-heading,
    .category-overview-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .category-grid,
    .detail-meta-grid {
        grid-template-columns: 1fr;
    }

    .rank-card {
        grid-template-columns: 92px 1fr;
    }

    .rank-info h3 {
        font-size: 17px;
    }

    .rank-info p {
        font-size: 13px;
    }

    .detail-inner {
        padding: 28px 16px 56px;
    }

    .detail-copy h1 {
        font-size: 40px;
    }

    .detail-one-line {
        font-size: 16px;
    }

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

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

    .footer-bottom {
        flex-direction: column;
    }
}
