:root {
    --stone-950: #0c0a09;
    --stone-900: #1c1917;
    --stone-850: #241f1c;
    --stone-800: #292524;
    --stone-700: #44403c;
    --stone-600: #57534e;
    --stone-500: #78716c;
    --stone-300: #d6d3d1;
    --stone-200: #e7e5e4;
    --stone-100: #f5f5f4;
    --stone-50: #fafaf9;
    --amber-700: #b45309;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --amber-200: #fde68a;
    --amber-100: #fef3c7;
    --white: #ffffff;
    --radius-lg: 18px;
    --shadow-soft: 0 20px 50px rgba(28, 25, 23, 0.18);
    --shadow-card: 0 12px 30px rgba(28, 25, 23, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    color: var(--stone-800);
    background: linear-gradient(180deg, var(--stone-50), var(--amber-100) 42%, var(--stone-50));
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(28, 25, 23, 0.92);
    backdrop-filter: blur(14px);
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.nav-wrap {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.logo-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: var(--stone-900);
    background: linear-gradient(135deg, var(--amber-200), var(--amber-500));
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.35);
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.78);
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: transparent;
    padding: 9px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--white);
    border-radius: 2px;
}

.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 720px;
    color: var(--white);
    background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.40), transparent 36%), linear-gradient(135deg, var(--stone-950), var(--stone-850) 44%, var(--amber-700));
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12) 0 2px, transparent 3px), linear-gradient(45deg, rgba(255, 255, 255, 0.04), transparent);
    background-size: 54px 54px, 100% 100%;
    opacity: 0.8;
}

.hero-container {
    position: relative;
    z-index: 1;
    padding: 76px 0 64px;
}

.hero-carousel {
    position: relative;
    min-height: 480px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
    align-items: center;
    gap: 44px;
    opacity: 0;
    transform: translateX(24px);
    pointer-events: none;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.hero-kicker,
.eyebrow {
    margin: 0 0 12px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--amber-400);
}

.hero-copy h1 {
    margin: 0 0 12px;
    font-size: clamp(2.6rem, 6vw, 5.4rem);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(1.7rem, 3vw, 3rem);
    color: var(--amber-100);
}

.hero-intro {
    max-width: 720px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.08rem;
}

.hero-actions,
.hero-controls,
.filter-bar,
.detail-meta,
.detail-tags,
.card-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

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

.btn.primary,
.hero-search button {
    background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
    color: var(--stone-950);
    box-shadow: 0 14px 36px rgba(245, 158, 11, 0.30);
}

.btn.ghost {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
}

.btn:hover,
.hero-search button:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.42));
}

.hero-poster img,
.poster-link img,
.rank-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.hero-poster:hover img,
.poster-link:hover img,
.rank-poster:hover img {
    transform: scale(1.06);
}

.hero-controls {
    justify-content: center;
    margin-top: 26px;
}

.hero-prev,
.hero-next,
.hero-dot {
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.hero-prev,
.hero-next {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 26px;
}

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

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

.hero-dot.active {
    width: 30px;
    background: var(--amber-400);
    opacity: 1;
}

.hero-search {
    display: flex;
    gap: 10px;
    max-width: 760px;
    margin: 34px auto 0;
    padding: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--white);
    background: transparent;
    padding: 0 16px;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.64);
}

.section {
    padding: 76px 0;
}

.soft-section {
    background: rgba(255, 255, 255, 0.42);
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.rank-head h2,
.prose-card h2,
.side-card h2 {
    margin: 0;
    letter-spacing: -0.04em;
    line-height: 1.12;
}

.section-heading h2 {
    font-size: clamp(2rem, 3vw, 3rem);
}

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

.text-link {
    font-weight: 800;
    color: var(--amber-700);
}

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

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

.category-card {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(180, 83, 9, 0.12);
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.category-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    font-weight: 900;
    color: var(--stone-950);
    background: linear-gradient(135deg, var(--amber-100), var(--amber-500));
}

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

.category-card em {
    font-style: normal;
    color: var(--stone-600);
    font-size: 0.94rem;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(68, 64, 60, 0.08);
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.poster-link,
.rank-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--stone-200);
}

.poster-badge,
.rank-medal {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--stone-950);
    background: rgba(253, 230, 138, 0.92);
    font-weight: 900;
    font-size: 0.8rem;
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--amber-700);
    font-size: 0.78rem;
    font-weight: 800;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--amber-700);
}

.card-body p {
    margin: 0;
    color: var(--stone-600);
    font-size: 0.92rem;
}

.card-tags,
.detail-tags {
    margin-top: 12px;
}

.card-tags span,
.detail-tags span,
.detail-meta span {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 9px;
    color: var(--stone-700);
    background: var(--amber-100);
    font-size: 0.78rem;
    font-weight: 700;
}

.rank-panel,
.prose-card,
.side-card,
.player-card,
.detail-info {
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(68, 64, 60, 0.08);
    box-shadow: var(--shadow-card);
}

.rank-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
}

.rank-head {
    margin-bottom: 16px;
}

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

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

.rank-line {
    display: grid;
    grid-template-columns: 38px 52px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(245, 245, 244, 0.72);
    transition: background 0.25s ease, transform 0.25s ease;
}

.rank-line:hover {
    background: var(--amber-100);
    transform: translateX(3px);
}

.rank-line img {
    height: 68px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-no {
    font-weight: 900;
    color: var(--amber-700);
}

.rank-text strong,
.rank-text em {
    display: block;
}

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

.rank-text em {
    color: var(--stone-500);
    font-style: normal;
    font-size: 0.8rem;
}

.filter-bar {
    margin-bottom: 24px;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.70);
    border: 1px solid rgba(68, 64, 60, 0.08);
}

.search-box,
.select-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid var(--stone-200);
}

.search-box {
    flex: 1;
    min-width: 240px;
}

.search-box span,
.select-box span {
    color: var(--amber-700);
    font-weight: 900;
}

.search-box input,
.select-box select {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--stone-800);
}

.page-hero {
    padding: 82px 0 64px;
    color: var(--white);
    background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.35), transparent 32%), linear-gradient(135deg, var(--stone-950), var(--stone-800));
}

.page-hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.78);
}

.detail-hero {
    padding: 52px 0;
    color: var(--white);
    background: linear-gradient(135deg, var(--stone-950), var(--stone-800) 58%, var(--amber-700));
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
    gap: 26px;
    align-items: center;
}

.player-card {
    overflow: hidden;
    background: var(--stone-950);
}

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

.video-wrap video {
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    background: #000000;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.62));
}

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

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

.play-ring {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--stone-950);
    background: linear-gradient(135deg, var(--amber-200), var(--amber-500));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    font-size: 30px;
}

.detail-info {
    padding: 30px;
    color: var(--stone-800);
}

.crumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--stone-500);
    margin-bottom: 16px;
    font-size: 0.92rem;
}

.crumbs a:hover {
    color: var(--amber-700);
}

.detail-info h1 {
    font-size: clamp(2rem, 4vw, 3.8rem);
}

.detail-line {
    color: var(--stone-600);
    font-size: 1.08rem;
}

.detail-meta span {
    color: var(--stone-950);
    background: var(--stone-100);
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.prose-card,
.side-card {
    padding: 28px;
}

.prose-card h2,
.side-card h2 {
    margin-bottom: 14px;
    font-size: 1.6rem;
}

.prose-card p {
    margin: 0 0 24px;
    color: var(--stone-700);
    font-size: 1.03rem;
}

.side-card dl {
    margin: 0;
    display: grid;
    gap: 12px;
}

.side-card dt {
    color: var(--stone-500);
    font-size: 0.82rem;
    font-weight: 900;
}

.side-card dd {
    margin: -10px 0 0;
    color: var(--stone-800);
}

.rank-grid-page .rank-card {
    position: relative;
}

.site-footer {
    padding: 44px 0;
    color: rgba(255, 255, 255, 0.76);
    background: var(--stone-950);
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-logo {
    color: var(--white);
    font-size: 1.2rem;
}

.site-footer p {
    max-width: 560px;
    margin: 10px 0 0;
}

.footer-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--amber-200);
    font-weight: 700;
}

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

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

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

    .rank-panel {
        position: static;
    }
}

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

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 70px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 18px;
        background: rgba(28, 25, 23, 0.98);
        box-shadow: var(--shadow-soft);
    }

    .site-nav.open {
        display: flex;
    }

    .hero-slide,
    .detail-grid {
        grid-template-columns: 1fr;
    }

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

    .hero-poster {
        max-width: 360px;
        margin: 0 auto;
    }

    .hero-search {
        border-radius: 24px;
        flex-direction: column;
    }

    .hero-search input {
        min-height: 46px;
    }

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

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

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

    .hero-section {
        min-height: 800px;
    }

    .hero-container {
        padding-top: 46px;
    }

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

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

    .filter-bar,
    .search-box,
    .select-box {
        align-items: stretch;
        flex-direction: column;
        border-radius: 18px;
    }

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

    .play-ring {
        width: 64px;
        height: 64px;
        font-size: 24px;
    }
}
