* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(255, 255, 255, 0.10);
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --text: #ffffff;
    --red: #ef4444;
    --blue: #60a5fa;
    --purple: #a78bfa;
    --yellow: #facc15;
    --radius: 18px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(239, 68, 68, 0.17), transparent 32rem),
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.16), transparent 36rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 72%);
    z-index: -1;
}

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

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

img.is-missing {
    opacity: 0;
}

button,
input {
    font: inherit;
}

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

.gradient-text {
    background: linear-gradient(135deg, #f87171, #60a5fa 58%, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.text-shadow {
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.glass-effect {
    border: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.56));
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

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

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 68px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 34px;
    height: 34px;
}

.logo-mark path:first-child {
    fill: rgba(239, 68, 68, 0.95);
}

.logo-mark path:last-child {
    fill: #ffffff;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-link {
    color: #cbd5e1;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
}

.nav-search,
.mobile-search,
.hero-search,
.filter-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-search input,
.mobile-search input,
.hero-search input,
.filter-toolbar input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 11px 16px;
}

.nav-search input {
    width: 190px;
    padding: 9px 14px;
}

.nav-search button,
.mobile-search button,
.hero-search button,
.filter-toolbar a,
.btn,
.link-panel a {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #3b82f6);
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.22);
    padding: 10px 18px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.filter-toolbar a:hover,
.btn:hover,
.link-panel a:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(239, 68, 68, 0.28);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    padding: 9px;
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 2px;
    background: #ffffff;
}

.mobile-menu {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.96);
}

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

.mobile-menu-inner {
    display: grid;
    gap: 14px;
    padding: 18px 0 22px;
}

.mobile-link {
    color: #cbd5e1;
}

.mobile-link.is-active {
    color: #ffffff;
}

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

.hero-track,
.hero-slide,
.hero-image-link,
.hero-slide img,
.hero-overlay {
    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);
    filter: saturate(1.06) contrast(1.05);
}

.hero-image-link {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.75));
}

.hero-overlay {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.58) 44%, rgba(15, 23, 42, 0.16) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.55) 32%, transparent 72%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    height: 100%;
    max-width: 1180px;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 82px;
}

.hero-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    padding: 8px 14px;
    font-size: 0.9rem;
    backdrop-filter: blur(8px);
}

.hero-content h1,
.page-hero h1 {
    max-width: 820px;
    margin: 18px 0 16px;
    font-size: clamp(2.4rem, 7vw, 5.8rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
    text-shadow: 0 8px 36px rgba(0, 0, 0, 0.52);
}

.hero-content p,
.page-hero p {
    max-width: 760px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.08rem;
    line-height: 1.8;
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.hero-tags span,
.detail-tags a {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
    padding: 7px 12px;
    font-size: 0.9rem;
}

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

.btn-primary {
    background: linear-gradient(135deg, #ef4444, #2563eb);
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    cursor: pointer;
    font-size: 2rem;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-50%) scale(1.04);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    right: 0;
    bottom: 32px;
    left: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 10px;
}

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

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

.quick-panel {
    position: relative;
    z-index: 8;
    margin-top: -34px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.84);
    box-shadow: var(--shadow);
    padding: 20px;
    backdrop-filter: blur(16px);
}

.hero-search {
    margin-bottom: 18px;
}

.hero-search input {
    min-height: 52px;
    border-radius: 18px;
    font-size: 1rem;
}

.hero-search button {
    min-height: 52px;
    border-radius: 18px;
    padding-inline: 26px;
}

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

.category-tile {
    min-height: 112px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(239, 68, 68, 0.18), transparent),
        rgba(255, 255, 255, 0.06);
    padding: 18px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.category-tile:hover {
    background:
        linear-gradient(135deg, rgba(96, 165, 250, 0.20), transparent),
        rgba(255, 255, 255, 0.10);
    transform: translateY(-3px);
}

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

.category-tile strong {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.6;
}

.block-section {
    padding: 68px 0 0;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    letter-spacing: -0.04em;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more {
    color: #cbd5e1;
    transition: color 0.2s ease;
}

.section-more:hover {
    color: #ffffff;
}

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

.compact-grid {
    gap: 18px;
}

.movie-card-link {
    display: block;
}

.poster-frame {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--line);
    border-radius: 16px;
    background:
        radial-gradient(circle at top left, rgba(96, 165, 250, 0.18), transparent 46%),
        linear-gradient(135deg, #111827, #020617);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.26);
}

.poster-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.38s ease, filter 0.38s ease;
}

.movie-card:hover img,
.feature-card:hover img,
.category-card-large:hover img {
    transform: scale(1.08);
    filter: saturate(1.15);
}

.poster-hover,
.play-float {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    backdrop-filter: blur(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.duration-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    color: #ffffff;
    padding: 4px 9px;
    font-size: 0.78rem;
}

.movie-title {
    display: -webkit-box;
    min-height: 2.8em;
    margin-top: 12px;
    overflow: hidden;
    color: #ffffff;
    font-weight: 800;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.movie-card:hover .movie-title {
    color: var(--blue);
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.82rem;
}

.rating {
    color: var(--yellow);
    font-weight: 800;
}

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

.feature-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(135deg, #111827, #020617);
    box-shadow: var(--shadow);
}

.feature-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.feature-shade,
.category-card-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.18));
}

.feature-content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 22px;
}

.feature-content strong,
.feature-content em,
.feature-content small {
    display: block;
}

.feature-content strong {
    margin-bottom: 8px;
    font-size: 1.35rem;
}

.feature-content em {
    color: #e2e8f0;
    font-style: normal;
}

.feature-content small {
    margin-top: 7px;
    color: #cbd5e1;
    line-height: 1.55;
}

.page-hero {
    padding: 72px 0 34px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 12% 20%, rgba(239, 68, 68, 0.20), transparent 34rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.94));
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 0.92rem;
}

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

.breadcrumb strong {
    color: #ffffff;
    font-weight: 700;
}

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

.category-card-large a {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 280px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(135deg, #111827, #020617);
    box-shadow: var(--shadow);
}

.category-card-large img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.category-card-content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 22px;
}

.category-card-content strong,
.category-card-content em,
.category-card-content small,
.category-card-content small span {
    display: block;
}

.category-card-content strong {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.category-card-content em {
    color: #cbd5e1;
    font-style: normal;
    line-height: 1.55;
}

.category-card-content small {
    margin-top: 14px;
    color: var(--muted);
    line-height: 1.7;
}

.link-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.06);
    padding: 22px;
}

.filter-toolbar {
    align-items: stretch;
    justify-content: space-between;
    margin-bottom: 28px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
    padding: 14px;
    backdrop-filter: blur(14px);
}

.filter-toolbar input {
    min-height: 48px;
    border-radius: 16px;
}

.filter-toolbar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    min-width: max-content;
}

.expanded-toolbar,
.search-toolbar {
    flex-direction: column;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chips button {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: #cbd5e1;
    cursor: pointer;
    padding: 9px 14px;
}

.filter-chips button.is-active {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.85), rgba(37, 99, 235, 0.85));
    color: #ffffff;
}

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

.ranking-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 28px;
}

.rank-aside {
    position: sticky;
    top: 88px;
    align-self: start;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.80);
    padding: 22px;
    box-shadow: var(--shadow);
}

.rank-aside h2 {
    margin: 0 0 16px;
}

.rank-lines {
    display: grid;
    gap: 10px;
}

.rank-line {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    padding: 12px;
}

.rank-line:hover {
    background: rgba(255, 255, 255, 0.10);
}

.rank-line span {
    color: #f87171;
    font-weight: 900;
}

.rank-line strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-line em {
    color: var(--yellow);
    font-style: normal;
    font-weight: 800;
}

.detail-shell {
    padding: 36px 0 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(300px, 0.9fr);
    gap: 28px;
}

.player-card {
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow);
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.movie-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border: 0;
    cursor: pointer;
    overflow: hidden;
    background: #020617;
    padding: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.04) contrast(1.05);
}

.player-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle, rgba(239, 68, 68, 0.22), transparent 34%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.22));
}

.player-icon {
    position: relative;
    z-index: 2;
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 2.25rem;
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(12px);
}

.detail-info {
    border-radius: 24px;
    padding: 28px;
}

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(1.9rem, 4vw, 3rem);
    letter-spacing: -0.04em;
}

.detail-info h2 {
    margin: 28px 0 12px;
    font-size: 1.35rem;
}

.detail-info p {
    color: #dbe4ef;
    line-height: 1.9;
}

.lead-text {
    color: #ffffff !important;
    font-size: 1.06rem;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    color: #cbd5e1;
}

.detail-meta span {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    padding: 7px 12px;
}

.poster-box,
.related-box {
    border-radius: 24px;
    padding: 20px;
}

.poster-box {
    margin-bottom: 24px;
}

.poster-box img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 18px;
    background: linear-gradient(135deg, #111827, #020617);
}

.poster-box h2 {
    margin: 18px 0 10px;
}

.poster-box p {
    color: var(--muted);
    line-height: 1.65;
}

.poster-box a {
    display: inline-flex;
    margin-top: 14px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.18);
    color: #bfdbfe;
    padding: 8px 12px;
}

.related-box h2 {
    margin: 0 0 18px;
}

.side-grid {
    grid-template-columns: 1fr;
    gap: 18px;
}

.side-grid .movie-card:nth-child(n + 7) {
    display: none;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    padding: 44px 0;
}

.footer-logo {
    margin-bottom: 14px;
}

.footer-brand p,
.footer-links a,
.footer-bottom {
    color: var(--muted);
}

.footer-brand p {
    max-width: 560px;
    line-height: 1.75;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 1rem;
}

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

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 18px 16px 24px;
    text-align: center;
    font-size: 0.92rem;
}

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

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

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

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

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

    .rank-aside {
        position: relative;
        top: auto;
    }
}

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

    .mobile-menu-button {
        display: block;
    }

    .hero-carousel {
        height: 66vh;
        min-height: 500px;
    }

    .hero-content {
        padding-bottom: 74px;
    }

    .hero-arrow {
        display: none;
    }

    .quick-panel {
        margin-top: 0;
        border-radius: 0;
        width: 100%;
    }

    .hero-search {
        flex-direction: column;
        align-items: stretch;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

@media (max-width: 620px) {
    .container-custom {
        width: min(100% - 24px, 1180px);
    }

    .hero-carousel {
        min-height: 470px;
    }

    .hero-content h1,
    .page-hero h1 {
        font-size: 2.35rem;
        line-height: 1.05;
    }

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

    .hero-tags span,
    .detail-tags a {
        font-size: 0.82rem;
    }

    .category-strip,
    .category-large-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }

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

    .movie-title {
        font-size: 0.94rem;
    }

    .detail-info,
    .poster-box,
    .related-box {
        padding: 18px;
    }

    .filter-toolbar {
        padding: 12px;
    }

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

    .rank-line em {
        grid-column: 2;
    }
}
