:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --line: rgba(148, 163, 184, 0.18);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --accent: #34d399;
    --accent-strong: #10b981;
    --accent-soft: rgba(16, 185, 129, 0.18);
    --gold: #facc15;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.22), transparent 34rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
}

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

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

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

button,
input,
select {
    font: inherit;
}

main {
    position: relative;
    z-index: 1;
}

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

.header-inner {
    max-width: 1440px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #ffffff;
    white-space: nowrap;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #022c22;
    background: linear-gradient(135deg, #6ee7b7, #10b981);
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.32);
}

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

.desktop-nav a,
.mobile-nav a {
    color: #cbd5e1;
    padding: 10px 12px;
    border-radius: 999px;
    font-size: 14px;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: #ffffff;
    background: rgba(148, 163, 184, 0.12);
}

.header-search {
    position: relative;
    width: min(320px, 30vw);
}

.header-search input,
.page-filter input,
.page-filter select {
    width: 100%;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    outline: none;
    padding: 0 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.page-filter input:focus,
.page-filter select:focus {
    border-color: rgba(52, 211, 153, 0.78);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.search-results {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(460px, 88vw);
    max-height: 520px;
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
}

.search-item {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.search-item:hover {
    background: rgba(148, 163, 184, 0.1);
}

.search-item img {
    width: 54px;
    height: 76px;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

.search-item strong {
    display: block;
    color: #ffffff;
    margin-bottom: 4px;
}

.search-item span,
.search-item p,
.search-empty {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    margin: 0;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.78);
    color: white;
    padding: 10px;
}

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

.mobile-nav {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-carousel {
    padding: 26px 28px 0;
}

.hero-stage {
    position: relative;
    max-width: 1440px;
    min-height: min(720px, calc(100vh - 110px));
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 36px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
    gap: 36px;
    align-items: end;
    padding: clamp(32px, 6vw, 86px);
    opacity: 0;
    pointer-events: none;
    transform: scale(1.012);
    transition: opacity 0.7s ease, transform 0.7s ease;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.66) 48%, rgba(2, 6, 23, 0.26)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.12) 46%, rgba(2, 6, 23, 0.66)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-copy {
    max-width: 760px;
    position: relative;
    z-index: 2;
}

.eyebrow,
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(38px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.hero-copy p,
.page-hero p,
.quick-search-panel p,
.section-heading p,
.category-card p,
.movie-body p,
.rank-info p,
.detail-card p,
.site-footer p {
    color: var(--muted);
    line-height: 1.75;
}

.hero-copy p {
    max-width: 680px;
    margin: 22px 0 0;
    font-size: 18px;
}

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

.hero-tags span,
.movie-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(52, 211, 153, 0.22);
    border-radius: 999px;
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.12);
    font-size: 12px;
}

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

.primary-button,
.ghost-button,
.section-more,
.quick-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    color: #022c22;
    background: linear-gradient(135deg, #6ee7b7, #10b981);
    box-shadow: 0 16px 40px rgba(16, 185, 129, 0.28);
}

.primary-button:hover,
.quick-actions a:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 54px rgba(16, 185, 129, 0.36);
}

.ghost-button,
.section-more {
    border: 1px solid var(--line);
    color: #ffffff;
    background: rgba(15, 23, 42, 0.58);
}

.ghost-button:hover,
.section-more:hover {
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.12);
}

.hero-poster {
    position: relative;
    z-index: 2;
    align-self: center;
    justify-self: center;
    width: min(100%, 380px);
    border-radius: 30px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.52);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-controls {
    position: absolute;
    left: clamp(24px, 5vw, 72px);
    bottom: 26px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 4;
}

.hero-arrow,
.hero-dot {
    border: 1px solid var(--line);
    color: #ffffff;
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(12px);
    cursor: pointer;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 28px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    opacity: 0.62;
}

.hero-dot.is-active {
    width: 34px;
    border-color: transparent;
    opacity: 1;
    background: var(--accent);
}

.quick-search-panel,
.content-section,
.detail-shell,
.page-hero {
    max-width: 1440px;
    margin: 0 auto;
    padding-left: 28px;
    padding-right: 28px;
}

.quick-search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    margin-top: 28px;
    padding-top: 28px;
    padding-bottom: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.68);
}

.quick-search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-card h1,
.detail-card h2,
.aside-card h2,
.category-card h2 {
    color: #ffffff;
}

.quick-search-panel h2 {
    margin: 0 0 8px;
    font-size: clamp(24px, 4vw, 44px);
    letter-spacing: -0.04em;
}

.quick-actions a {
    color: #022c22;
    background: linear-gradient(135deg, #a7f3d0, #34d399);
}

.content-section {
    padding-top: 72px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 10px 0 0;
    max-width: 760px;
}

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

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

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

.movie-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(52, 211, 153, 0.45);
    box-shadow: 0 26px 74px rgba(0, 0, 0, 0.34);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.movie-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 38%, rgba(2, 6, 23, 0.72));
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

.movie-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.movie-score {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 999px;
    color: #422006;
    background: linear-gradient(135deg, #fde68a, #facc15);
    font-size: 12px;
    font-weight: 900;
}

.movie-play {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 3;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #022c22;
    background: var(--accent);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .movie-play {
    opacity: 1;
    transform: translateY(0);
}

.movie-body {
    padding: 16px;
}

.movie-name {
    display: block;
    color: #ffffff;
    font-size: 16px;
    font-weight: 850;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-name:hover {
    color: var(--accent);
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 9px 0;
    color: #94a3b8;
    font-size: 12px;
}

.movie-meta span + span::before {
    content: "·";
    margin-right: 8px;
    color: #475569;
}

.movie-body p {
    min-height: 3.5em;
    margin: 0;
    font-size: 13px;
}

.movie-card-compact .movie-body p {
    display: none;
}

.movie-card-compact .movie-tags {
    display: none;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-image:
        linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.22)),
        var(--tile-image);
    background-position: center;
    background-size: cover;
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.24);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover,
.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(52, 211, 153, 0.46);
}

.category-tile span {
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.category-tile p {
    color: #cbd5e1;
    line-height: 1.65;
    margin: 10px 0 0;
}

.soft-panel {
    margin-top: 72px;
    padding-top: 30px;
    padding-bottom: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.46);
}

.page-hero {
    padding-top: 70px;
    padding-bottom: 54px;
}

.compact-hero > div {
    min-height: 260px;
    padding: clamp(30px, 5vw, 56px);
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.24), transparent 30rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.92));
    box-shadow: var(--shadow);
}

.compact-hero h1 {
    font-size: clamp(36px, 5vw, 64px);
}

.compact-hero p {
    max-width: 780px;
    font-size: 17px;
}

.category-card {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.74);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card-cover {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(0deg, rgba(2, 6, 23, 0.98) 18%, rgba(2, 6, 23, 0.18)),
        var(--tile-image);
    background-position: center;
    background-size: cover;
}

.category-card-body {
    position: relative;
    min-height: 320px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.category-card h2 {
    margin: 0;
    font-size: 28px;
}

.category-picks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.category-picks a {
    color: #a7f3d0;
    border: 1px solid rgba(52, 211, 153, 0.24);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    background: rgba(16, 185, 129, 0.12);
}

.page-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 14px;
    margin-bottom: 26px;
}

.page-filter select {
    appearance: none;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 82px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(52, 211, 153, 0.42);
    background: rgba(15, 23, 42, 0.92);
}

.rank-number {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #022c22;
    background: linear-gradient(135deg, #6ee7b7, #10b981);
    font-weight: 950;
}

.rank-cover img {
    width: 82px;
    height: 116px;
    object-fit: cover;
    border-radius: 14px;
    background: #0f172a;
}

.rank-info a {
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

.rank-info a:hover {
    color: var(--accent);
}

.rank-info p {
    margin: 8px 0;
}

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #cbd5e1;
    font-size: 13px;
}

.rank-meta span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 9px;
    background: rgba(148, 163, 184, 0.08);
}

.detail-shell {
    padding-top: 34px;
    padding-bottom: 80px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 20px;
}

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

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

.detail-main,
.detail-aside {
    display: grid;
    gap: 20px;
}

.player-panel,
.detail-card,
.aside-card {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 18px 56px rgba(0, 0, 0, 0.22);
}

.player-panel {
    padding: 12px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000000;
}

.player-trigger {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.24));
    cursor: pointer;
}

.player-trigger span:last-child {
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    font-weight: 900;
}

.trigger-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #022c22;
    background: linear-gradient(135deg, #a7f3d0, #10b981);
    box-shadow: 0 22px 60px rgba(16, 185, 129, 0.36);
    font-size: 28px;
}

.player-shell.is-playing .player-trigger {
    display: none;
}

.detail-card,
.aside-card {
    padding: 24px;
}

.detail-title-row {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 20px;
}

.detail-card h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 50px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.detail-score {
    min-width: 64px;
    min-height: 64px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    color: #422006;
    background: linear-gradient(135deg, #fde68a, #facc15);
    font-size: 22px;
    font-weight: 950;
}

.one-line {
    color: #a7f3d0 !important;
    font-size: 18px;
    margin: 18px 0 0;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.detail-meta-grid div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.38);
}

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

.detail-meta-grid strong {
    color: #ffffff;
}

.prose-card h2,
.aside-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.prose-card p {
    color: #cbd5e1;
    font-size: 16px;
    margin: 0 0 14px;
}

.poster-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 22px;
    background: #0f172a;
    margin-bottom: 16px;
}

.full-button {
    width: 100%;
}

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

.aside-related .movie-card {
    border-radius: 18px;
}

.aside-related .movie-body {
    padding: 10px;
}

.aside-related .movie-name {
    font-size: 13px;
}

.aside-related .movie-meta {
    font-size: 11px;
}

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

.footer-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 36px 28px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
    gap: 28px;
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: start;
}

.footer-links a {
    color: #cbd5e1;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    background: rgba(148, 163, 184, 0.06);
}

.footer-links a:hover {
    color: #ffffff;
    border-color: rgba(52, 211, 153, 0.36);
}

[hidden] {
    display: none !important;
}

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

    .menu-button {
        display: block;
    }

    .header-search {
        margin-left: auto;
        width: min(360px, 48vw);
    }

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

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

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

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

@media (max-width: 860px) {
    .header-inner {
        padding: 0 16px;
        gap: 12px;
    }

    .site-logo span:last-child {
        display: none;
    }

    .header-search {
        width: min(100%, 54vw);
    }

    .hero-carousel,
    .quick-search-panel,
    .content-section,
    .detail-shell,
    .page-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-stage {
        min-height: 680px;
        border-radius: 26px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-items: end;
        padding: 28px;
    }

    .hero-poster {
        width: 190px;
        justify-self: start;
        order: -1;
    }

    .hero-copy h1 {
        font-size: 38px;
    }

    .quick-search-panel,
    .section-heading,
    .footer-inner,
    .detail-aside {
        grid-template-columns: 1fr;
    }

    .section-heading {
        display: grid;
    }

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

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

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

    .rank-number {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .rank-cover img {
        width: 68px;
        height: 96px;
    }

    .rank-info p {
        display: none;
    }

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

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

@media (max-width: 540px) {
    .header-search {
        width: min(100%, 62vw);
    }

    .header-search input {
        font-size: 13px;
        padding: 0 12px;
    }

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

    .movie-body {
        padding: 12px;
    }

    .movie-name {
        font-size: 14px;
    }

    .movie-body p,
    .movie-tags {
        display: none;
    }

    .category-tile {
        min-height: 150px;
        padding: 16px;
    }

    .category-tile span {
        font-size: 19px;
    }

    .category-tile p {
        display: none;
    }

    .compact-hero > div {
        min-height: 220px;
        padding: 26px;
    }

    .detail-card,
    .aside-card {
        padding: 18px;
        border-radius: 22px;
    }

    .detail-title-row {
        display: grid;
    }

    .detail-score {
        min-width: 56px;
        min-height: 56px;
    }

    .trigger-icon {
        width: 66px;
        height: 66px;
    }
}
