:root {
    --mist-50: #f8f9fa;
    --mist-100: #f1f3f5;
    --mist-200: #e9ecef;
    --mist-300: #dee2e6;
    --mist-500: #adb5bd;
    --mist-600: #868e96;
    --mist-700: #495057;
    --mist-800: #343a40;
    --mist-900: #212529;
    --mineral-50: #f0f9ff;
    --mineral-200: #bae6fd;
    --mineral-300: #7dd3fc;
    --mineral-500: #0ea5e9;
    --mineral-600: #0284c7;
    --mineral-700: #0369a1;
    --moss-50: #f0fdf4;
    --moss-500: #22c55e;
    --earth-50: #faf8f5;
    --shadow-sm: 0 4px 12px rgba(33, 37, 41, 0.08);
    --shadow-md: 0 12px 30px rgba(33, 37, 41, 0.12);
    --shadow-lg: 0 24px 50px rgba(33, 37, 41, 0.18);
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--mist-50);
    color: var(--mist-900);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, var(--mist-800), var(--mist-700));
    color: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.top-nav {
    width: min(100% - 32px, 1280px);
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-mark,
.footer-logo span {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.2);
    color: var(--mineral-300);
}

.brand-text {
    font-size: 20px;
    font-family: Georgia, "Noto Serif SC", serif;
}

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

.nav-link,
.nav-dropdown > button {
    color: var(--mist-100);
    border: 0;
    border-radius: 10px;
    padding: 8px 12px;
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-dropdown:hover > button {
    background: var(--mineral-600);
    color: #fff;
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 210px;
    padding: 10px;
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: 0.2s ease;
}

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

.dropdown-panel a {
    display: block;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--mist-800);
    font-size: 14px;
}

.dropdown-panel a:hover {
    background: var(--mineral-50);
    color: var(--mineral-700);
}

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

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

.mobile-panel {
    display: none;
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
    padding: 8px 0 16px;
}

.mobile-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--mist-100);
}

.mobile-panel a:hover {
    background: rgba(255, 255, 255, 0.08);
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: var(--mist-900);
}

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

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.04));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(100% - 32px, 1280px);
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    color: #fff;
    max-width: 720px;
}

.hero-tag,
.detail-kicker,
.region-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(2, 132, 199, 0.86);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.hero-tag {
    padding: 6px 14px;
    margin-bottom: 18px;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.05;
    font-family: Georgia, "Noto Serif SC", serif;
}

.hero p {
    max-width: 650px;
    margin: 0 0 28px;
    color: var(--mist-100);
    font-size: clamp(16px, 2vw, 20px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    background: var(--mineral-600);
    color: #fff;
    box-shadow: 0 10px 22px rgba(2, 132, 199, 0.28);
}

.btn.primary:hover {
    background: var(--mineral-700);
}

.btn.ghost {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    backdrop-filter: blur(8px);
}

.btn.text {
    color: #fff;
    background: transparent;
}

.hero-control {
    position: absolute;
    z-index: 5;
    top: 50%;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.52);
    color: #fff;
    font-size: 32px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-control.prev {
    left: 18px;
}

.hero-control.next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 5;
    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);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.search-strip {
    background: #fff;
    padding: 28px 0;
}

.search-card {
    display: grid;
    grid-template-columns: 1fr minmax(300px, 520px);
    gap: 24px;
    align-items: center;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--mineral-50), var(--moss-50));
    padding: 26px;
    box-shadow: var(--shadow-sm);
}

.search-card h2 {
    margin: 0 0 6px;
    font-family: Georgia, "Noto Serif SC", serif;
    font-size: 28px;
}

.search-card p {
    margin: 0;
    color: var(--mist-700);
}

.home-search {
    display: flex;
    gap: 10px;
}

.home-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--mist-200);
    border-radius: 12px;
    background: #fff;
    padding: 0 14px;
    color: var(--mist-800);
    outline: none;
}

.home-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--mineral-500);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.home-search button {
    flex: 0 0 auto;
    border: 0;
    border-radius: 12px;
    background: var(--mineral-600);
    color: #fff;
    padding: 0 20px;
    font-weight: 800;
}

.section {
    padding: 56px 0;
}

.section.white {
    background: #fff;
}

.section.mist {
    background: var(--mist-50);
}

.section.mineral-soft {
    background: linear-gradient(135deg, var(--mineral-50), var(--moss-50));
}

.section-head {
    margin-bottom: 28px;
}

.section-head.row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.section-head h2,
.category-block h2,
.related-panel h2,
.detail-article h2 {
    margin: 0 0 8px;
    font-family: Georgia, "Noto Serif SC", serif;
    font-size: clamp(24px, 3vw, 36px);
    color: var(--mist-900);
}

.section-head p,
.category-block p {
    margin: 0;
    color: var(--mist-600);
}

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

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
    position: relative;
    height: 215px;
    overflow: hidden;
    background: var(--mist-200);
}

.movie-card.compact .poster-wrap {
    height: 160px;
}

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

.movie-card:hover .poster-wrap img,
.featured-main:hover img,
.small-card:hover img {
    transform: scale(1.08);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 48%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

.play-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.92);
    color: #fff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
    transition: 0.25s ease;
}

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

.region-badge,
.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    padding: 4px 9px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

.region-badge {
    left: 12px;
}

.year-badge {
    right: 12px;
    color: #fff;
    background: rgba(0, 0, 0, 0.68);
}

.rank-badge {
    left: 12px;
    bottom: 12px;
    top: auto;
    color: #fff;
    background: rgba(0, 0, 0, 0.72);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    min-height: 48px;
    margin: 0 0 8px;
    color: var(--mist-900);
    font-size: 17px;
    line-height: 1.42;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card:hover h3 {
    color: var(--mineral-600);
}

.card-body p {
    min-height: 44px;
    margin: 0 0 10px;
    color: var(--mist-600);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    color: var(--mist-500);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.featured-main {
    position: relative;
    min-height: 420px;
    overflow: hidden;
    border-radius: 18px;
    background: #000;
    box-shadow: var(--shadow-md);
}

.featured-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 58%);
}

.featured-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px;
    color: #fff;
}

.featured-info span,
.detail-kicker {
    padding: 5px 12px;
    margin-bottom: 12px;
}

.featured-info h3 {
    margin: 10px 0;
    font-family: Georgia, "Noto Serif SC", serif;
    font-size: 32px;
}

.featured-info p {
    max-width: 780px;
    margin: 0 0 10px;
    color: var(--mist-100);
}

.feature-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.92);
    color: #fff;
    opacity: 0;
    transition: 0.25s ease;
}

.featured-main:hover .feature-play {
    opacity: 1;
}

.featured-side {
    display: grid;
    gap: 18px;
}

.small-card {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 14px;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.small-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.small-card img {
    width: 128px;
    height: 104px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.small-card div {
    padding: 12px 12px 12px 0;
    min-width: 0;
}

.small-card span {
    color: var(--mineral-600);
    font-size: 12px;
    font-weight: 800;
}

.small-card h3 {
    margin: 4px 0;
    font-size: 15px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.small-card p {
    margin: 0;
    color: var(--mist-500);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-slider {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 4px 0 18px;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.movie-slider::-webkit-scrollbar {
    display: none;
}

.slider-item {
    width: 300px;
    flex: 0 0 300px;
}

.slider-actions {
    display: flex;
    gap: 8px;
}

.slider-actions button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: var(--mist-200);
    color: var(--mist-700);
    font-size: 28px;
}

.slider-actions button:hover {
    background: var(--mist-300);
}

.more-link {
    display: inline-flex;
    align-items: center;
    border-radius: 10px;
    color: var(--mineral-700);
    font-weight: 800;
}

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

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

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

.category-tile h3 {
    margin: 0 0 10px;
    font-family: Georgia, "Noto Serif SC", serif;
    font-size: 22px;
}

.category-tile p {
    margin: 0 0 18px;
    color: var(--mist-600);
    font-size: 14px;
}

.category-tile div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tile span,
.tag-row span {
    display: inline-flex;
    border-radius: 999px;
    background: var(--mist-100);
    color: var(--mist-700);
    padding: 5px 10px;
    font-size: 12px;
}

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

.page-main {
    min-height: 70vh;
}

.page-hero {
    position: relative;
    color: #fff;
    background: linear-gradient(135deg, var(--mist-900), var(--mist-700));
}

.compact-hero {
    padding: 74px 0;
}

.page-hero span {
    display: inline-flex;
    margin-bottom: 12px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.24);
    color: var(--mineral-300);
    padding: 6px 14px;
    font-weight: 800;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-family: Georgia, "Noto Serif SC", serif;
    font-size: clamp(32px, 5vw, 54px);
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: var(--mist-100);
    font-size: 18px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 18px;
    background: var(--mist-50);
    box-shadow: var(--shadow-sm);
}

.library-grid {
    align-items: stretch;
}

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

.category-overview {
    display: grid;
    gap: 26px;
}

.category-block {
    border-radius: 22px;
    background: #fff;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.category-block-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 64px 120px 1fr 56px;
    align-items: center;
    gap: 18px;
    border-radius: 16px;
    background: #fff;
    padding: 12px;
    box-shadow: var(--shadow-sm);
}

.rank-row:hover {
    transform: translateY(-2px);
}

.rank-num {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border-radius: 14px;
    background: var(--mineral-50);
    color: var(--mineral-700);
    font-weight: 900;
    font-size: 18px;
}

.rank-row img {
    width: 120px;
    height: 76px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--mist-200);
}

.rank-info h2 {
    margin: 0 0 6px;
    font-size: 18px;
}

.rank-info p {
    margin: 0 0 6px;
    color: var(--mist-600);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-info span {
    color: var(--mist-500);
    font-size: 13px;
}

.rank-play {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--mineral-600);
    color: #fff;
}

.player-section {
    background: #000;
    padding: 24px 0 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--mist-300);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--mineral-300);
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 18px 18px 0 0;
    background: #000;
    aspect-ratio: 16 / 9;
    box-shadow: var(--shadow-lg);
}

.player-frame video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
    color: #fff;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.big-play {
    width: 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.92);
    font-size: 34px;
    box-shadow: 0 18px 40px rgba(14, 165, 233, 0.3);
}

.detail-content-section {
    padding-top: 34px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
    gap: 28px;
    align-items: start;
}

.detail-article,
.related-panel {
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    padding: 26px;
}

.detail-title-row {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 22px;
    align-items: center;
    margin-bottom: 20px;
}

.detail-title-row img {
    width: 170px;
    height: 230px;
    object-fit: cover;
    border-radius: 16px;
    background: var(--mist-200);
}

.detail-title-row h1 {
    margin: 8px 0 12px;
    font-family: Georgia, "Noto Serif SC", serif;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
}

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

.detail-meta span {
    color: var(--mist-600);
}

.tag-row {
    margin-bottom: 22px;
}

.one-line-box {
    border-radius: 16px;
    background: var(--mineral-50);
    padding: 20px;
    margin-bottom: 24px;
}

.one-line-box h2,
.text-block h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.one-line-box p,
.text-block p {
    margin: 0;
    color: var(--mist-700);
    line-height: 1.9;
}

.text-block {
    margin-top: 24px;
}

.related-grid {
    display: grid;
    gap: 16px;
}

.related-grid .movie-card {
    display: grid;
    grid-template-columns: 118px 1fr;
}

.related-grid .poster-wrap {
    height: 100%;
    min-height: 130px;
}

.related-grid .card-body h3 {
    min-height: auto;
}

.related-grid .card-body p {
    min-height: auto;
}

.site-footer {
    background: linear-gradient(180deg, var(--mist-800), var(--mist-900));
    color: var(--mist-100);
}

.footer-inner {
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
    padding: 46px 0 28px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-family: Georgia, "Noto Serif SC", serif;
    font-size: 20px;
    font-weight: 800;
}

.footer-inner p {
    margin: 0;
    color: var(--mist-300);
}

.footer-inner h3 {
    margin: 0 0 14px;
    font-size: 16px;
}

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

.footer-links a {
    color: var(--mist-300);
    font-size: 14px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(222, 226, 230, 0.12);
    padding: 18px 16px;
    text-align: center;
    color: var(--mist-500);
    font-size: 13px;
}

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

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

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

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

    .nav-toggle {
        display: inline-flex;
    }

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

    .hero {
        height: 520px;
    }

    .hero-content {
        justify-content: flex-end;
        padding-bottom: 78px;
    }

    .hero-control {
        display: none;
    }

    .search-card,
    .filter-bar,
    .footer-inner,
    .detail-title-row {
        grid-template-columns: 1fr;
    }

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

    .featured-main {
        min-height: 330px;
    }

    .rank-row {
        grid-template-columns: 42px 86px 1fr;
    }

    .rank-row img {
        width: 86px;
        height: 68px;
    }

    .rank-play {
        display: none;
    }

    .detail-title-row img {
        width: 100%;
        height: auto;
        max-height: 360px;
    }
}

@media (max-width: 540px) {
    .container,
    .top-nav,
    .mobile-panel,
    .footer-inner {
        width: min(100% - 24px, 1280px);
    }

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

    .hero {
        height: 500px;
    }

    .hero p {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hero-actions {
        gap: 10px;
    }

    .btn {
        padding: 0 14px;
    }

    .section {
        padding: 42px 0;
    }

    .section-head.row,
    .category-block-head {
        display: block;
    }

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

    .poster-wrap {
        height: 220px;
    }

    .home-search {
        flex-direction: column;
    }

    .home-search button {
        min-height: 44px;
    }

    .slider-actions {
        display: none;
    }

    .slider-item {
        width: 260px;
        flex-basis: 260px;
    }

    .small-card {
        grid-template-columns: 110px 1fr;
    }

    .small-card img {
        width: 110px;
    }

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