:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-deep: #020617;
    --panel: rgba(30, 41, 59, 0.64);
    --panel-strong: rgba(15, 23, 42, 0.9);
    --line: rgba(59, 130, 246, 0.22);
    --line-soft: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --blue: #2563eb;
    --cyan: #22d3ee;
    --cyan-soft: rgba(34, 211, 238, 0.18);
    --shadow: 0 25px 70px rgba(2, 6, 23, 0.45);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 5%, rgba(37, 99, 235, 0.25), transparent 30rem),
        radial-gradient(circle at 85% 15%, rgba(34, 211, 238, 0.18), transparent 28rem),
        linear-gradient(180deg, #0f172a 0%, #111827 45%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.is-menu-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.92), rgba(15, 23, 42, 0.96));
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.42);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: white;
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.2);
    transition: transform 0.28s ease;
}

.brand:hover .brand-mark,
.footer-brand:hover .brand-mark {
    transform: scale(1.08) rotate(-3deg);
}

.brand-name {
    font-size: 1.55rem;
    background: linear-gradient(90deg, #60a5fa, #67e8f9, #93c5fd);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.nav-search {
    flex: 1;
    max-width: 520px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    padding: 6px;
    background: rgba(15, 23, 42, 0.52);
}

.nav-search input,
.mobile-search input,
.filter-bar input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.nav-search input::placeholder,
.mobile-search input::placeholder,
.filter-bar input::placeholder {
    color: var(--soft);
}

.nav-search button,
.mobile-search button {
    border: 0;
    border-radius: 999px;
    padding: 8px 16px;
    color: white;
    background: linear-gradient(90deg, var(--blue), #06b6d4);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #dbeafe;
    white-space: nowrap;
}

.nav-links a,
.category-strip a,
.mobile-panel a {
    transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.nav-links a:hover,
.category-strip a:hover,
.mobile-panel a:hover {
    color: var(--cyan);
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 8px 12px;
    color: white;
    background: rgba(15, 23, 42, 0.72);
}

.category-strip {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.category-strip-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0 12px;
    scrollbar-width: thin;
}

.category-strip a {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 6px 14px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.36);
}

.category-strip a:hover {
    background: rgba(37, 99, 235, 0.18);
}

.mobile-panel {
    display: none;
}

.hero-carousel {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    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.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.65) 45%, rgba(0, 0, 0, 0.15) 100%),
        linear-gradient(180deg, transparent 58%, rgba(15, 23, 42, 0.98) 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1180px) / 2));
    top: 50%;
    width: min(650px, calc(100% - 48px));
    transform: translateY(-50%);
}

.hero-kicker,
.page-hero span,
.type-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    color: white;
    background: rgba(37, 99, 235, 0.9);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

.hero-kicker {
    padding: 7px 15px;
    font-size: 0.92rem;
    font-weight: 800;
    margin-bottom: 18px;
}

.hero-content h1,
.hero-content h2 {
    margin: 0 0 18px;
    font-size: clamp(2.55rem, 6vw, 5rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
    text-shadow: 0 16px 34px rgba(0, 0, 0, 0.55);
}

.hero-content p {
    max-width: 58ch;
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: 1.08rem;
}

.hero-tags,
.detail-meta,
.ranking-meta,
.meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-tags span,
.detail-meta span,
.ranking-meta span,
.meta-row span {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    padding: 4px 10px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.42);
}

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

.primary-button,
.ghost-button,
.section-more,
.category-panel-head a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-button {
    padding: 12px 28px;
    color: white;
    background: linear-gradient(90deg, var(--blue), #06b6d4);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.28);
}

.ghost-button {
    border: 1px solid rgba(226, 232, 240, 0.22);
    padding: 11px 24px;
    color: white;
    background: rgba(15, 23, 42, 0.52);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.category-panel-head a:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(34, 211, 238, 0.18);
}

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

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

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

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

.content-shell {
    padding: 58px 0 0;
}

.content-shell:last-child {
    padding-bottom: 72px;
}

.category-overview.compact {
    padding-top: 42px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.section-icon {
    color: var(--cyan);
    font-size: 1.45rem;
}

.section-title h2 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    letter-spacing: -0.025em;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.55), transparent);
}

.section-more,
.category-panel-head a {
    padding: 7px 14px;
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.18);
}

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

.movie-card {
    position: relative;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.14);
    overflow: hidden;
    background: rgba(30, 41, 59, 0.44);
    box-shadow: 0 14px 38px rgba(2, 6, 23, 0.23);
    transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(30, 41, 59, 0.62);
    box-shadow: 0 26px 60px rgba(2, 6, 23, 0.35);
    transform: translateY(-4px);
}

.card-default {
    border-radius: 20px;
}

.card-poster {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #020617;
}

.card-poster img,
.horizontal-poster img,
.ranking-poster img,
.poster-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

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

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.72));
    opacity: 0.72;
    transition: opacity 0.28s ease;
}

.movie-card:hover .card-overlay {
    opacity: 0.92;
}

.play-circle,
.play-mini,
.overlay-play {
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--blue), #06b6d4);
}

.play-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

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

.play-mini {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 42px;
    height: 42px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.year-tag,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 4px 10px;
    color: white;
    font-size: 0.76rem;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.72);
}

.year-tag {
    right: 10px;
    bottom: 10px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.card-body {
    padding: 16px;
}

.type-pill {
    padding: 3px 10px;
    font-size: 0.76rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.movie-card h3,
.movie-card h2 {
    margin: 0;
    color: white;
    line-height: 1.3;
}

.card-body h3 {
    min-height: 2.6em;
    font-size: 1.05rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body p,
.horizontal-content p,
.large-card-content p,
.ranking-content p {
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body p {
    min-height: 3.2em;
    margin: 9px 0 12px;
    font-size: 0.92rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-row span {
    border-radius: 999px;
    padding: 3px 8px;
    color: #67e8f9;
    font-size: 0.76rem;
    background: var(--cyan-soft);
}

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

.meta-row.small span {
    font-size: 0.75rem;
}

.card-large {
    display: block;
    border-radius: 24px;
    min-height: 100%;
}

.large-poster {
    height: 430px;
    aspect-ratio: auto;
}

.large-card-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.86));
}

.large-card-content h3 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.card-horizontal {
    display: flex;
    align-items: stretch;
    gap: 16px;
    border-radius: 18px;
    padding: 0;
}

.horizontal-poster {
    position: relative;
    width: 180px;
    min-height: 112px;
    flex: 0 0 180px;
    overflow: hidden;
    background: #020617;
}

.horizontal-content {
    min-width: 0;
    padding: 14px 16px 14px 0;
}

.horizontal-content h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    font-size: 1rem;
}

.horizontal-content p {
    margin: 0;
    font-size: 0.88rem;
}

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

.category-card,
.category-panel,
.detail-content-card,
.side-card,
.poster-panel,
.page-hero {
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.category-card {
    min-height: 160px;
    padding: 20px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(34, 211, 238, 0.07)),
        rgba(30, 41, 59, 0.46);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.category-card:hover {
    border-color: rgba(34, 211, 238, 0.42);
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(34, 211, 238, 0.12)),
        rgba(30, 41, 59, 0.62);
    transform: translateY(-4px);
}

.category-card span {
    display: block;
    margin-bottom: 10px;
    font-size: 1.12rem;
    font-weight: 900;
}

.category-card p,
.category-card small,
.category-panel p,
.page-hero p,
.site-footer p {
    color: var(--muted);
}

.category-card p {
    margin: 0 0 12px;
}

.category-card small {
    display: block;
}

.featured-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.featured-list {
    display: grid;
    gap: 16px;
}

.masonry-grid {
    columns: 4 240px;
    column-gap: 22px;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 22px;
}

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

.page-shell,
.detail-shell {
    padding: 42px 0 72px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 42px;
    margin-bottom: 30px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(34, 211, 238, 0.08)),
        rgba(15, 23, 42, 0.78);
}

.page-hero::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.13);
    filter: blur(12px);
}

.page-hero span {
    padding: 5px 12px;
    margin-bottom: 14px;
    font-weight: 800;
}

.page-hero h1 {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.1;
}

.page-hero p {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0;
}

.filter-bar {
    position: relative;
    z-index: 1;
    width: min(620px, 100%);
    margin-top: 22px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    padding: 13px 18px;
    background: rgba(15, 23, 42, 0.54);
}

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

.category-panel {
    padding: 24px;
}

.category-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
}

.category-panel-head span {
    font-size: 1.35rem;
    font-weight: 900;
}

.category-panel-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 20px;
    border-radius: 20px;
    padding: 14px;
}

.ranking-poster {
    position: relative;
    height: 112px;
    overflow: hidden;
    border-radius: 16px;
    background: #020617;
}

.ranking-poster span {
    position: absolute;
    left: 10px;
    top: 10px;
    border-radius: 999px;
    padding: 4px 9px;
    color: white;
    font-weight: 900;
    background: linear-gradient(90deg, #f97316, #ef4444);
}

.ranking-content h2 {
    margin-bottom: 6px;
    font-size: 1.25rem;
}

.ranking-content p {
    margin: 10px 0 12px;
}

.detail-shell {
    min-height: 70vh;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--soft);
}

.breadcrumb a {
    color: #67e8f9;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 0.92fr);
    gap: 28px;
}

.detail-main {
    min-width: 0;
}

.player-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: #000;
    box-shadow: var(--shadow);
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: white;
    font-weight: 900;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.26), rgba(0, 0, 0, 0.66));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.overlay-play {
    width: 76px;
    height: 76px;
    font-size: 1.8rem;
    box-shadow: 0 20px 42px rgba(37, 99, 235, 0.35);
}

.detail-content-card {
    margin-top: 22px;
    padding: 28px;
}

.detail-content-card h1 {
    margin: 0 0 14px;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.15;
}

.detail-meta {
    margin-bottom: 18px;
}

.one-line {
    border-left: 4px solid var(--cyan);
    margin: 20px 0 26px;
    padding-left: 16px;
    color: #67e8f9;
    font-size: 1.08rem;
    font-weight: 700;
}

.detail-content-card section {
    border-top: 1px solid var(--line-soft);
    padding-top: 22px;
    margin-top: 22px;
}

.detail-content-card h2,
.side-card h2,
.site-footer h2 {
    margin: 0 0 12px;
    font-size: 1.3rem;
}

.detail-content-card p {
    margin: 0;
    color: #dbeafe;
}

.detail-tags {
    gap: 8px;
}

.detail-tags span {
    font-size: 0.88rem;
    padding: 5px 11px;
}

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

.poster-panel {
    overflow: hidden;
}

.poster-panel img {
    width: 100%;
    aspect-ratio: 16 / 10;
}

.poster-panel div {
    padding: 18px;
}

.poster-panel strong,
.poster-panel span {
    display: block;
}

.poster-panel span {
    color: var(--soft);
}

.side-card {
    padding: 20px;
}

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

.side-list .card-horizontal {
    gap: 12px;
}

.side-list .horizontal-poster {
    width: 126px;
    flex-basis: 126px;
    min-height: 82px;
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), #020617);
    color: var(--muted);
}

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

.footer-brand {
    margin-bottom: 16px;
    color: white;
    font-size: 1.2rem;
}

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding: 18px 0 24px;
    color: var(--soft);
}

.footer-bottom button {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    color: white;
    background: rgba(37, 99, 235, 0.24);
}

.is-hidden-by-filter {
    display: none !important;
}

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

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

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

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

@media (max-width: 820px) {
    .nav-shell {
        height: 64px;
    }

    .nav-search,
    .nav-links,
    .category-strip {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .mobile-panel {
        position: fixed;
        inset: 64px 0 auto 0;
        display: block;
        max-height: 0;
        overflow: hidden;
        border-bottom: 1px solid rgba(148, 163, 184, 0.14);
        background: rgba(15, 23, 42, 0.98);
        transition: max-height 0.28s ease;
    }

    body.is-menu-open .mobile-panel {
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }

    .mobile-search {
        display: flex;
        gap: 8px;
        margin: 16px;
        border: 1px solid rgba(148, 163, 184, 0.22);
        border-radius: 16px;
        padding: 8px;
        background: rgba(30, 41, 59, 0.58);
    }

    .mobile-panel nav {
        display: grid;
        gap: 6px;
        padding: 0 16px 20px;
    }

    .mobile-panel a {
        border-radius: 12px;
        padding: 10px 12px;
        color: #dbeafe;
        background: rgba(30, 41, 59, 0.38);
    }

    .hero-carousel {
        height: 520px;
    }

    .hero-content {
        top: auto;
        bottom: 72px;
        transform: none;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: clamp(2.2rem, 10vw, 3.4rem);
    }

    .featured-layout,
    .category-panels {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    .content-shell,
    .page-shell,
    .detail-shell,
    .nav-shell,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 22px, 1180px);
    }

    .brand-name {
        font-size: 1.3rem;
    }

    .hero-carousel {
        height: 500px;
    }

    .hero-content p {
        font-size: 0.98rem;
    }

    .hero-actions {
        gap: 10px;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }

    .section-title {
        align-items: flex-start;
    }

    .section-line {
        display: none;
    }

    .section-more {
        margin-left: auto;
    }

    .movie-grid,
    .page-grid,
    .category-grid,
    .rank-preview {
        grid-template-columns: 1fr;
    }

    .card-horizontal,
    .ranking-item {
        grid-template-columns: 1fr;
        display: block;
    }

    .horizontal-poster,
    .ranking-poster {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .horizontal-content {
        padding: 14px;
    }

    .page-hero,
    .detail-content-card,
    .side-card,
    .category-panel {
        padding: 20px;
    }

    .footer-grid,
    .footer-bottom {
        grid-template-columns: 1fr;
        display: grid;
    }
}
