* {
    box-sizing: border-box;
}

:root {
    --amber-950: #451a03;
    --amber-900: #78350f;
    --amber-800: #92400e;
    --amber-700: #b45309;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-200: #fde68a;
    --stone-950: #0c0a09;
    --stone-900: #1c1917;
    --stone-800: #292524;
    --stone-700: #44403c;
    --stone-600: #57534e;
    --stone-500: #78716c;
    --stone-200: #e7e5e4;
    --stone-100: #f5f5f4;
    --stone-50: #fafaf9;
    --white: #ffffff;
    --shadow-card: 0 18px 45px rgba(28, 25, 23, 0.12);
    --shadow-strong: 0 30px 90px rgba(28, 25, 23, 0.32);
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--stone-800);
    background: var(--stone-50);
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-950), var(--amber-800));
    box-shadow: 0 12px 34px rgba(69, 26, 3, 0.22);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--amber-950);
    background: linear-gradient(135deg, var(--amber-200), var(--amber-500));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 14px 24px rgba(245, 158, 11, 0.32);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 1.24rem;
}

.brand-text small {
    margin-top: 4px;
    color: var(--amber-200);
    font-size: 0.76rem;
    font-weight: 500;
}

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

.nav-link,
.mobile-link {
    border-radius: 999px;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.88);
    transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.active,
.mobile-link.active {
    color: var(--amber-950);
    background: var(--amber-200);
    transform: translateY(-1px);
}

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

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.hero {
    position: relative;
    height: 72vh;
    min-height: 580px;
    overflow: hidden;
    background: var(--stone-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    background-position: center;
    background-size: cover;
    transform: scale(1.04);
    transition: opacity 0.9s ease, visibility 0.9s ease, transform 5.4s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 74% 32%, rgba(245, 158, 11, 0.34), transparent 28%),
        linear-gradient(90deg, rgba(12, 10, 9, 0.92) 0%, rgba(12, 10, 9, 0.72) 45%, rgba(12, 10, 9, 0.24) 100%);
    backdrop-filter: blur(2px);
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 56px;
    color: var(--white);
}

.hero-copy {
    max-width: 720px;
}

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

.hero-tags span,
.movie-tags span {
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 0.78rem;
    color: var(--amber-950);
    background: var(--amber-200);
    font-weight: 700;
}

.hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(2.6rem, 6vw, 5.8rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
    text-shadow: 0 16px 46px rgba(0, 0, 0, 0.35);
}

.hero p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1rem, 1.7vw, 1.28rem);
}

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

.primary-button,
.ghost-button,
.section-more,
.search-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 0;
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-button,
.search-form button {
    color: var(--amber-950);
    background: linear-gradient(135deg, var(--amber-200), var(--amber-500));
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.35);
}

.ghost-button {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.ghost-button.light {
    color: var(--amber-950);
    border-color: rgba(120, 53, 15, 0.18);
    background: rgba(255, 255, 255, 0.6);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.search-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(120, 53, 15, 0.24);
}

.hero-poster {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 30px;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-strong);
    transform: rotate(2deg);
}

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

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

.hero-dot {
    width: 42px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
}

.hero-dot.active {
    background: var(--amber-200);
}

.search-panel {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    margin-top: -44px;
    border: 1px solid rgba(120, 53, 15, 0.12);
    border-radius: 28px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(18px);
}

.search-form label {
    display: block;
    margin-bottom: 10px;
    color: var(--amber-900);
    font-weight: 800;
}

.search-form div {
    display: flex;
    gap: 12px;
}

.search-form input,
.library-search input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--stone-200);
    border-radius: 999px;
    padding: 0 18px;
    color: var(--stone-800);
    background: var(--white);
    outline: none;
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.search-form input:focus,
.library-search input:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.quick-links,
.side-links,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-links a,
.side-links a,
.footer-links a {
    border-radius: 999px;
    padding: 9px 14px;
    color: var(--amber-900);
    background: var(--amber-200);
    font-weight: 700;
}

.content-section {
    padding: 64px 0 0;
}

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

.section-heading span,
.page-hero span {
    color: var(--amber-700);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
    margin: 6px 0 0;
    color: var(--stone-900);
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--stone-600);
}

.section-more {
    min-width: 110px;
    color: var(--amber-950);
    background: var(--amber-200);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(120, 53, 15, 0.08);
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 14px 30px rgba(28, 25, 23, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--amber-900), var(--stone-900));
}

.movie-poster img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.74));
}

.poster-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    color: var(--amber-950);
    background: var(--amber-200);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.26);
}

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

.movie-card-body h2 {
    margin: 12px 0 8px;
    color: var(--stone-900);
    font-size: 1.08rem;
    line-height: 1.32;
}

.movie-card-body h2 a:hover,
.rank-info h2 a:hover {
    color: var(--amber-700);
}

.movie-card-body p {
    display: -webkit-box;
    min-height: 3.3em;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--stone-600);
    font-size: 0.92rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--stone-500);
    font-size: 0.84rem;
}

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

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

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

.category-card {
    position: relative;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    border-radius: 24px;
    padding: 20px;
    color: var(--white);
    box-shadow: var(--shadow-card);
}

.category-card img,
.category-card span {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
}

.category-card span {
    background: linear-gradient(180deg, rgba(12, 10, 9, 0.15), rgba(12, 10, 9, 0.86));
}

.category-card strong,
.category-card em {
    position: relative;
    z-index: 1;
}

.category-card strong {
    font-size: 1.28rem;
}

.category-card em {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.88rem;
    font-style: normal;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
}

.split-section aside {
    position: sticky;
    top: 96px;
    align-self: start;
    border-radius: 28px;
    padding: 28px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-900), var(--stone-900));
    box-shadow: var(--shadow-card);
}

.split-section aside h2 {
    margin: 0 0 12px;
    font-size: 1.6rem;
}

.split-section aside p {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.78);
}

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

.compact-rank {
    gap: 12px;
}

.rank-item {
    display: grid;
    grid-template-columns: 58px 92px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    border: 1px solid rgba(120, 53, 15, 0.09);
    border-radius: 22px;
    padding: 14px;
    background: var(--white);
    box-shadow: 0 12px 26px rgba(28, 25, 23, 0.07);
}

.rank-number {
    color: var(--amber-700);
    font-size: 1.55rem;
    font-weight: 900;
    text-align: center;
}

.rank-cover {
    display: block;
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 3 / 4;
}

.rank-cover img {
    height: 100%;
    object-fit: cover;
}

.rank-info h2 {
    margin: 0 0 6px;
    font-size: 1.05rem;
    line-height: 1.35;
}

.rank-info p {
    margin: 0 0 8px;
    color: var(--stone-600);
    font-size: 0.92rem;
}

.page-main {
    padding-bottom: 72px;
}

.page-hero {
    margin-top: 42px;
    border-radius: 32px;
    padding: 48px;
    background:
        radial-gradient(circle at 92% 18%, rgba(245, 158, 11, 0.28), transparent 32%),
        linear-gradient(135deg, rgba(253, 230, 138, 0.72), rgba(255, 255, 255, 0.94));
    box-shadow: var(--shadow-card);
}

.small-hero p,
.category-hero p {
    max-width: 760px;
}

.library-search {
    max-width: 720px;
    margin-top: 22px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 26px;
    color: var(--stone-500);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--amber-800);
    font-weight: 700;
}

.detail-hero {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 34px;
    align-items: stretch;
    margin-top: 24px;
    border-radius: 34px;
    padding: 28px;
    color: var(--white);
    background:
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.34), transparent 30%),
        linear-gradient(135deg, var(--stone-950), var(--amber-950));
    box-shadow: var(--shadow-strong);
}

.detail-cover {
    overflow: hidden;
    border-radius: 26px;
    aspect-ratio: 3 / 4;
    background: rgba(255, 255, 255, 0.08);
}

.detail-cover img {
    height: 100%;
    object-fit: cover;
}

.detail-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-copy h1 {
    color: var(--white);
    font-size: clamp(2.2rem, 4.5vw, 4.8rem);
}

.detail-one-line {
    max-width: 760px;
    margin: 18px 0 24px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.08rem;
}

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

.detail-meta div {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.08);
}

.detail-meta dt {
    color: var(--amber-200);
    font-size: 0.78rem;
}

.detail-meta dd {
    margin: 4px 0 0;
    font-weight: 800;
}

.player-section {
    margin-top: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: var(--stone-950);
    box-shadow: var(--shadow-strong);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: var(--stone-950);
    object-fit: contain;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-content: center;
    gap: 12px;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(12, 10, 9, 0.16), rgba(12, 10, 9, 0.72));
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-overlay span {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    margin: 0 auto;
    border-radius: 50%;
    color: var(--amber-950);
    background: var(--amber-200);
    font-size: 2rem;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.play-overlay strong {
    font-size: 1.05rem;
}

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

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 34px;
}

.story-card {
    border: 1px solid rgba(120, 53, 15, 0.08);
    border-radius: 26px;
    padding: 26px;
    background: var(--white);
    box-shadow: 0 14px 30px rgba(28, 25, 23, 0.08);
}

.story-card h2 {
    margin: 0 0 14px;
    color: var(--stone-900);
    font-size: 1.35rem;
}

.story-card p {
    margin: 0;
    color: var(--stone-700);
}

.site-footer {
    margin-top: 80px;
    color: rgba(255, 255, 255, 0.78);
    background: linear-gradient(135deg, var(--stone-950), var(--amber-950));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr;
    gap: 36px;
    padding: 46px 0 30px;
}

.footer-brand {
    color: var(--white);
    font-size: 1.32rem;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: var(--white);
    font-size: 1rem;
}

.site-footer p {
    max-width: 520px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 0 26px;
    font-size: 0.88rem;
}

.is-filtered-out {
    display: none !important;
}

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

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

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

    .split-section,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .split-section aside {
        position: static;
    }
}

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

    .menu-button {
        display: grid;
        place-items: center;
    }

    .brand-text small {
        display: none;
    }

    .hero {
        min-height: 680px;
        height: auto;
    }

    .hero-slide {
        position: absolute;
        min-height: 680px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 96px 0 86px;
    }

    .hero-poster {
        width: min(250px, 80vw);
        margin: 0 auto;
        transform: none;
    }

    .search-panel {
        grid-template-columns: 1fr;
    }

    .search-form div {
        flex-direction: column;
    }

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

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

    .rank-item {
        grid-template-columns: 44px 74px minmax(0, 1fr);
        gap: 12px;
        padding: 10px;
    }

    .rank-info p {
        display: none;
    }

    .page-hero {
        padding: 32px 24px;
    }

    .detail-hero {
        grid-template-columns: 1fr;
        padding: 20px;
    }

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

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

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

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

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

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