* {
    box-sizing: border-box;
}

:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(255, 255, 255, 0.10);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --gold: #facc15;
    --orange: #f97316;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 18% 12%, rgba(250, 204, 21, 0.16), transparent 30rem),
        radial-gradient(circle at 88% 18%, rgba(249, 115, 22, 0.15), transparent 34rem),
        radial-gradient(circle at 50% 100%, rgba(59, 130, 246, 0.16), transparent 34rem),
        var(--bg);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
        radial-gradient(circle, rgba(250, 204, 21, 0.10) 1px, transparent 1px);
    background-size: 48px 48px, 86px 86px;
    opacity: 0.18;
    z-index: -1;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.site-header.is-scrolled,
.site-header.is-open {
    background: rgba(2, 6, 23, 0.92);
    border-color: var(--line);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 74px;
    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.01em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: #111827;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(250, 204, 21, 0.35);
    transition: transform 0.5s ease;
}

.brand:hover .brand-mark {
    transform: rotate(180deg);
}

.brand-text {
    color: #ffffff;
    font-size: 21px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link,
.mobile-link {
    color: #e2e8f0;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--gold);
}

.nav-toggle {
    width: 44px;
    height: 44px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line);
    border-radius: 14px;
}

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

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid var(--line);
    border-radius: 18px;
    backdrop-filter: blur(18px);
}

.mobile-nav.is-open {
    display: grid;
    gap: 6px;
}

.mobile-link {
    padding: 12px 14px;
    border-radius: 12px;
}

.mobile-link:hover,
.mobile-link.active {
    background: rgba(255, 255, 255, 0.08);
}

main {
    overflow: hidden;
}

.hero-carousel {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 48%, rgba(2, 6, 23, 0.86) 100%),
        var(--hero-image),
        radial-gradient(circle at 70% 18%, rgba(250, 204, 21, 0.22), transparent 30rem);
    background-size: cover;
    background-position: center;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, transparent 0%, rgba(2, 6, 23, 0.24) 48%, #020617 100%),
        radial-gradient(circle at 30% 40%, rgba(250, 204, 21, 0.15), transparent 34rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 120px 0 80px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 430px);
    align-items: center;
    gap: 64px;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.02;
    text-shadow: 0 20px 55px rgba(0, 0, 0, 0.58);
}

.hero-copy p {
    max-width: 720px;
    margin: 24px 0 0;
    color: #d1d5db;
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.8;
}

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

.hero-tags,
.detail-meta,
.detail-tags,
.genre-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    margin-top: 28px;
}

.hero-tags span,
.detail-meta span,
.detail-tags span,
.genre-tags span,
.card-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn.primary {
    color: #111827;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    box-shadow: 0 16px 38px rgba(249, 115, 22, 0.28);
}

.btn.ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(14px);
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 22px 48px rgba(250, 204, 21, 0.20);
}

.hero-poster,
.detail-poster,
.poster-wrap {
    position: relative;
    overflow: hidden;
    background-image:
        var(--cover-image),
        linear-gradient(135deg, rgba(250, 204, 21, 0.30), rgba(15, 23, 42, 0.96));
    background-size: cover;
    background-position: center;
}

.hero-poster {
    aspect-ratio: 4 / 5;
    border-radius: 32px;
    box-shadow: var(--shadow);
    transform: translateY(0);
    animation: floatY 5s ease-in-out infinite;
}

.hero-poster::after,
.poster-wrap::after,
.detail-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.66), transparent 55%);
    pointer-events: none;
}

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

.hero-play,
.card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    color: #111827;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    border-radius: 999px;
    transform: translate(-50%, -50%);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.hero-play {
    width: 76px;
    height: 76px;
    font-size: 30px;
}

.card-play {
    width: 58px;
    height: 58px;
    opacity: 0;
    font-size: 22px;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 38px;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 999px;
    transform: translateY(-50%);
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-arrow.prev {
    left: 24px;
}

.hero-arrow.next {
    right: 24px;
}

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

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

.hero-dot.active {
    width: 34px;
    background: linear-gradient(135deg, var(--gold), var(--orange));
}

.stats-section,
.section,
.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    padding: 72px 0 20px;
}

.stat-card {
    padding: 28px 18px;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid var(--line);
    border-radius: 24px;
    backdrop-filter: blur(14px);
}

.stat-card strong {
    display: block;
    color: #fff;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1;
}

.stat-card span {
    display: block;
    margin-top: 10px;
    color: var(--muted);
}

.section {
    padding: 82px 0;
}

.section-panel {
    width: 100%;
    padding: 82px max(16px, calc((100vw - 1180px) / 2));
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.46), rgba(2, 6, 23, 0.48));
    border-block: 1px solid var(--line);
}

.section-heading {
    max-width: 760px;
    margin: 0 auto 44px;
    text-align: center;
}

.section-heading.left {
    margin-left: 0;
    text-align: left;
}

.section-heading h2,
.rank-title h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.08;
}

.section-heading p {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
}

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

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

.movie-card {
    min-width: 0;
}

.card-link {
    display: block;
    min-height: 100%;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card-link:hover {
    transform: translateY(-8px) scale(1.015);
    border-color: rgba(250, 204, 21, 0.45);
    box-shadow: 0 26px 62px rgba(250, 204, 21, 0.12);
}

.poster-wrap {
    aspect-ratio: 4 / 5;
}

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

.rank-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 4;
    padding: 7px 11px;
    color: #111827;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.card-body {
    padding: 22px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 13px;
}

.card-body h3 {
    margin: 0;
    color: #fff;
    font-size: 22px;
    line-height: 1.35;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body p {
    min-height: 46px;
    margin: 12px 0 18px;
    color: var(--muted);
    line-height: 1.65;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-tags span {
    min-height: auto;
    padding: 5px 10px;
    color: #fde68a;
    font-size: 12px;
}

.compact .card-body {
    padding: 18px;
}

.compact .card-body h3 {
    font-size: 18px;
}

.compact .card-body p {
    min-height: 42px;
    font-size: 14px;
}

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

.category-card,
.category-overview-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid var(--line);
    border-radius: 24px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover,
.category-overview-card:hover {
    transform: translateY(-6px);
    border-color: rgba(250, 204, 21, 0.44);
}

.category-index,
.category-main-link span {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #111827;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    border-radius: 14px;
}

.category-card h3,
.category-main-link h2 {
    margin: 18px 0 10px;
    color: #fff;
    font-size: 22px;
}

.category-card p,
.category-main-link p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

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

.category-main-link strong {
    display: inline-flex;
    margin-top: 18px;
    color: var(--gold);
}

.category-sample-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.category-sample-links a {
    padding: 6px 10px;
    color: var(--soft);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    font-size: 13px;
}

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

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 26px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.rank-list {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.rank-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    transition: background 0.2s ease;
}

.rank-row:hover {
    background: rgba(250, 204, 21, 0.12);
}

.rank-number {
    color: var(--gold);
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    color: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-meta {
    grid-column: 2 / 3;
    color: var(--muted);
    font-size: 13px;
}

.rank-heat {
    grid-column: 3;
    grid-row: 1 / 3;
    color: #fdba74;
    font-weight: 900;
}

.more-link {
    display: inline-flex;
    margin-top: 22px;
    color: var(--gold);
    font-weight: 800;
}

.page-main {
    padding-top: 84px;
}

.page-hero {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 88px 0 44px;
}

.small-hero {
    text-align: center;
}

.page-hero p {
    max-width: 780px;
    margin: 18px auto 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}

.category-hero p {
    margin-left: 0;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid var(--line);
    border-radius: 24px;
    backdrop-filter: blur(14px);
}

.search-box {
    display: grid;
    gap: 8px;
    color: var(--muted);
}

.search-box input,
.filter-row select,
.global-search-box input {
    width: 100%;
    min-height: 48px;
    color: #fff;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: none;
    padding: 0 15px;
}

.search-box input:focus,
.filter-row select:focus,
.global-search-box input:focus {
    border-color: rgba(250, 204, 21, 0.56);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.filter-count,
.global-search-status {
    min-height: 22px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
}

.ranking-section {
    padding-top: 30px;
}

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

.ranking-item a {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto 74px;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    border-radius: 18px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.ranking-item a:hover {
    transform: translateX(4px);
    border-color: rgba(250, 204, 21, 0.44);
}

.ranking-number,
.ranking-score {
    color: var(--gold);
    font-weight: 900;
}

.ranking-name {
    overflow: hidden;
    color: #fff;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-info {
    color: var(--muted);
}

.global-search-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px;
    gap: 12px;
    max-width: 720px;
    margin: 30px auto 0;
}

.global-search-box button {
    color: #111827;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    border: 0;
    border-radius: 16px;
    cursor: pointer;
}

.detail-hero {
    position: relative;
    min-height: 660px;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.70), rgba(2, 6, 23, 0.96)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(2, 6, 23, 0.1), #020617 100%);
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    min-height: 660px;
    margin: 0 auto;
    padding: 120px 0 70px;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 52px;
    align-items: center;
}

.detail-poster {
    aspect-ratio: 4 / 5;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.detail-one-line {
    max-width: 790px;
    margin: 22px 0 0;
    color: #d1d5db;
    font-size: 20px;
    line-height: 1.8;
}

.detail-meta,
.detail-tags {
    margin-top: 22px;
}

.player-section {
    padding-top: 54px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

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

.video-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.16), rgba(0, 0, 0, 0.24));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-shell.is-playing .video-overlay {
    opacity: 0;
    visibility: hidden;
}

.player-button {
    width: 88px;
    height: 88px;
    color: #111827;
    font-size: 34px;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s ease;
}

.player-button:hover {
    transform: scale(1.06);
}

.player-message {
    position: absolute;
    left: 18px;
    bottom: 18px;
    max-width: calc(100% - 36px);
    color: #fde68a;
    font-size: 14px;
}

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

.detail-article,
.detail-side {
    padding: 30px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    border-radius: 28px;
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 28px;
}

.detail-article p {
    margin: 0 0 30px;
    color: #cbd5e1;
    font-size: 17px;
    line-height: 2;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
    margin: 0;
}

.detail-side dt {
    color: var(--muted);
}

.detail-side dd {
    margin: 0;
    color: #fff;
}

.genre-tags {
    margin-top: 24px;
}

.site-footer {
    padding: 72px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(180px, 1fr));
    gap: 42px;
    padding: 34px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--line);
    border-radius: 30px;
}

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

.footer-brand p {
    max-width: 520px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.site-footer a {
    display: block;
    margin: 10px 0;
    color: var(--muted);
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: var(--gold);
}

.footer-bottom {
    padding-top: 22px;
    color: var(--muted);
    text-align: center;
}

@keyframes floatY {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-18px);
    }
}

@media (max-width: 1060px) {
    .hero-content,
    .detail-hero-inner,
    .split-layout,
    .detail-content-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .detail-poster {
        max-width: 360px;
        width: 100%;
        margin: 0 auto;
    }

    .rank-panel {
        position: static;
    }

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

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

    .nav-toggle {
        display: flex;
    }

    .hero-content {
        gap: 32px;
        padding-top: 110px;
        text-align: left;
    }

    .hero-arrow {
        display: none;
    }

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

    .movie-grid,
    .compact-grid,
    .library-grid,
    .category-grid,
    .category-overview-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .filter-row,
    .global-search-box,
    .ranking-item a {
        grid-template-columns: 1fr;
    }

    .ranking-info,
    .ranking-score {
        justify-self: start;
    }
}

@media (max-width: 560px) {
    .header-inner {
        width: min(100% - 24px, 1180px);
    }

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

    .hero-copy h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 38px;
    }

    .hero-content,
    .section,
    .page-hero,
    .stats-section,
    .site-footer,
    .detail-hero-inner {
        width: min(100% - 24px, 1180px);
    }

    .section,
    .section-panel {
        padding-top: 58px;
        padding-bottom: 58px;
    }

    .movie-grid,
    .compact-grid,
    .library-grid,
    .category-grid,
    .category-overview-grid,
    .stats-section,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-hero-inner {
        padding-top: 110px;
    }

    .detail-poster {
        max-width: 280px;
    }
}
