:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --dark: #020617;
    --dark-soft: #0f172a;
    --accent: #f59e0b;
    --accent-strong: #f97316;
    --radius: 24px;
    --shadow: 0 24px 70px rgba(15, 23, 42, .14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 52%, #f8fafc 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(226, 232, 240, .72);
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #334155, #020617);
    box-shadow: 0 14px 30px rgba(15, 23, 42, .22);
}

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

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

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: #475569;
    font-weight: 700;
    transition: .24s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: #0f172a;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #0f172a;
    cursor: pointer;
    padding: 11px;
}

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

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    border-radius: 18px;
    background: #0f172a;
    color: #fff;
}

.mobile-nav a {
    display: inline-flex;
    margin: 4px;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
}

.mobile-category-row {
    margin-top: 8px;
}

.section,
.page-hero,
.detail-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.section {
    padding: 52px 0;
}

.section-floating {
    margin-top: -64px;
    position: relative;
    z-index: 5;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 54px);
    line-height: 1.08;
    letter-spacing: -.04em;
}

.section-kicker,
.eyebrow {
    margin: 0 0 10px;
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.text-link {
    font-weight: 900;
    color: #0f172a;
    border-bottom: 2px solid #0f172a;
}

.text-link.light {
    color: #fff;
    border-color: rgba(255, 255, 255, .6);
}

.hero-slider {
    position: relative;
    height: min(78vh, 760px);
    min-height: 560px;
    overflow: hidden;
    color: #fff;
    background: #020617;
}

.hero-track,
.hero-slide,
.hero-img,
.hero-gradient {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    transform: scale(1.02);
    transition: opacity .8s ease, transform 1.2s ease;
}

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

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.05);
}

.hero-gradient {
    background:
        radial-gradient(circle at 72% 28%, rgba(245, 158, 11, .28), transparent 28%),
        linear-gradient(90deg, rgba(2, 6, 23, .94), rgba(15, 23, 42, .72) 45%, rgba(15, 23, 42, .28)),
        linear-gradient(0deg, rgba(2, 6, 23, .96), transparent 52%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 46px;
}

.hero-content h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(42px, 8vw, 88px);
    line-height: .98;
    letter-spacing: -.06em;
}

.hero-content p {
    max-width: 680px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, .88);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-row,
.detail-meta,
.rank-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.rank-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .08);
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.hero-tags span,
.detail-meta span,
.big-tags span {
    color: rgba(255, 255, 255, .9);
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(8px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    font-weight: 900;
    cursor: pointer;
    transition: .24s ease;
}

.btn.primary {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 18px 34px rgba(249, 115, 22, .28);
}

.btn.ghost {
    color: #fff;
    background: rgba(255, 255, 255, .13);
    backdrop-filter: blur(10px);
}

.btn.slim {
    min-height: 40px;
    color: #fff;
    background: #0f172a;
}

.btn:hover,
.movie-card:hover,
.category-tile:hover,
.category-card-large:hover {
    transform: translateY(-3px);
}

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

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

.hero-dot.active {
    width: 36px;
    background: #fff;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: var(--radius);
    color: #fff;
    box-shadow: var(--shadow);
    transition: .24s ease;
}

.category-tile img,
.category-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.category-tile:hover img,
.category-card-large:hover img,
.movie-card:hover img,
.detail-poster:hover img {
    transform: scale(1.08);
}

.tile-mask,
.category-cover span,
.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, .9));
}

.category-tile strong,
.category-tile em {
    position: absolute;
    left: 18px;
    right: 18px;
    z-index: 2;
}

.category-tile strong {
    bottom: 54px;
    font-size: 22px;
}

.category-tile em {
    bottom: 18px;
    color: rgba(255, 255, 255, .82);
    font-size: 13px;
    font-style: normal;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 160px;
    gap: 14px;
    margin: 0 0 24px;
    padding: 16px;
    border: 1px solid rgba(226, 232, 240, .85);
    border-radius: 22px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 12px 42px rgba(15, 23, 42, .08);
}

.filter-panel label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    color: #0f172a;
    padding: 0 14px;
    outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, .12);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, .86);
    border-radius: 24px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 14px 44px rgba(15, 23, 42, .08);
    transition: .24s ease;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

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

.year-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(15, 23, 42, .72);
    backdrop-filter: blur(8px);
}

.year-badge {
    left: 12px;
}

.rank-badge {
    right: 12px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

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

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.movie-meta strong {
    color: #f97316;
    font-size: 18px;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.25;
}

.movie-card h3 a:hover,
.rank-main h3 a:hover,
.category-card-large h2 a:hover {
    color: #f97316;
}

.movie-card p {
    min-height: 48px;
    margin: 0 0 14px;
    color: #64748b;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dark-panel {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto;
    padding: 42px;
    border-radius: 34px;
    color: #fff;
    background:
        radial-gradient(circle at 80% 12%, rgba(245, 158, 11, .22), transparent 30%),
        linear-gradient(135deg, #1e293b, #020617);
    box-shadow: var(--shadow);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 56px 88px minmax(0, 1fr) 110px;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
}

.compact-rank-list .rank-row {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .12);
}

.rank-number {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.rank-cover {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

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

.rank-main h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-main p {
    margin: 0 0 10px;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-rank-list .rank-main p,
.compact-rank-list .rank-tags span,
.compact-rank-list .rank-score span {
    color: rgba(255, 255, 255, .72);
}

.rank-score {
    text-align: right;
}

.rank-score strong {
    display: block;
    color: #f97316;
    font-size: 30px;
    line-height: 1;
}

.rank-score span {
    display: block;
    margin-top: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.page-hero {
    margin-top: 34px;
    padding: 72px;
    border-radius: 36px;
    color: #fff;
    background:
        radial-gradient(circle at 76% 18%, rgba(249, 115, 22, .28), transparent 28%),
        linear-gradient(135deg, #334155, #020617);
    box-shadow: var(--shadow);
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, .78);
    font-size: 18px;
}

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

.category-card-large {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    padding: 16px;
    border: 1px solid rgba(226, 232, 240, .85);
    border-radius: 28px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 14px 44px rgba(15, 23, 42, .08);
    transition: .24s ease;
}

.category-cover {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 22px;
    background: #0f172a;
}

.category-card-large h2 {
    margin: 0 0 10px;
    font-size: 26px;
}

.category-card-large p,
.category-sample {
    color: #64748b;
}

.category-sample {
    margin: 14px 0;
    font-size: 14px;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
    background: #020617;
}

.detail-bg,
.detail-shade {
    position: absolute;
    inset: 0;
}

.detail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(14px) scale(1.08) saturate(1.1);
    opacity: .5;
}

.detail-shade {
    background:
        radial-gradient(circle at 78% 22%, rgba(245, 158, 11, .22), transparent 30%),
        linear-gradient(90deg, rgba(2, 6, 23, .96), rgba(15, 23, 42, .64)),
        linear-gradient(0deg, rgba(2, 6, 23, 1), transparent 50%);
}

.detail-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 46px;
    align-items: center;
    padding: 80px 0 64px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .38);
    background: #0f172a;
}

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

.breadcrumb {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, .72);
    font-weight: 800;
}

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

.detail-one-line {
    max-width: 780px;
    margin: 20px 0;
    color: rgba(255, 255, 255, .84);
    font-size: 20px;
}

.detail-meta {
    margin: 0 0 18px;
}

.detail-meta strong {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    color: #111827;
    background: #fbbf24;
}

.player-section {
    margin-top: -66px;
    position: relative;
    z-index: 3;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    background: #000;
    box-shadow: 0 34px 90px rgba(2, 6, 23, .4);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #fff;
    background:
        radial-gradient(circle at 50% 40%, rgba(245, 158, 11, .22), transparent 24%),
        linear-gradient(180deg, rgba(2, 6, 23, .18), rgba(2, 6, 23, .82));
    cursor: pointer;
    transition: .24s ease;
}

.player-box.is-playing .player-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-button {
    width: 84px;
    height: 84px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 18px 45px rgba(249, 115, 22, .32);
    cursor: pointer;
}

.play-button span {
    display: block;
    width: 0;
    height: 0;
    margin: 0 auto;
    transform: translateX(4px);
    border-top: 17px solid transparent;
    border-bottom: 17px solid transparent;
    border-left: 26px solid #111827;
}

.player-overlay strong {
    max-width: calc(100% - 48px);
    text-align: center;
    font-size: clamp(22px, 4vw, 42px);
    line-height: 1.1;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, .9fr);
    gap: 22px;
}

.story-card {
    padding: 30px;
    border: 1px solid rgba(226, 232, 240, .88);
    border-radius: 30px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 14px 44px rgba(15, 23, 42, .08);
}

.story-card h2 {
    margin: 0 0 14px;
    font-size: 30px;
}

.story-card p:last-child {
    margin-bottom: 0;
    color: #475569;
    font-size: 17px;
}

.empty-state {
    display: none;
    padding: 26px;
    border-radius: 22px;
    text-align: center;
    color: #64748b;
    background: rgba(255, 255, 255, .8);
}

.empty-state.show {
    display: block;
}

.site-footer {
    margin-top: 60px;
    padding: 42px 0 26px;
    color: rgba(255, 255, 255, .76);
    background: #020617;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr .7fr 1.4fr;
    gap: 28px;
}

.footer-brand {
    color: #fff;
    font-size: 22px;
}

.footer-inner p {
    max-width: 460px;
}

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

.footer-links a,
.footer-category-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    color: rgba(255, 255, 255, .5);
}

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

    .category-list-large,
    .content-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .site-header.is-open .mobile-nav {
        display: block;
    }

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

    .hero-content {
        justify-content: flex-end;
        padding-bottom: 88px;
    }

    .section-heading,
    .detail-layout,
    .category-card-large,
    .rank-row,
    .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .filter-panel {
        display: grid;
    }

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

    .page-hero {
        padding: 46px 24px;
        border-radius: 28px;
    }

    .detail-layout {
        padding: 60px 0 94px;
    }

    .detail-poster {
        width: min(260px, 72vw);
    }

    .rank-row {
        grid-template-columns: 48px 76px 1fr;
    }

    .rank-score {
        grid-column: 2 / -1;
        text-align: left;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .section,
    .page-hero,
    .detail-layout,
    .footer-inner,
    .copyright {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-slider {
        height: 620px;
        min-height: 620px;
    }

    .hero-content h1 {
        font-size: 42px;
    }

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

    .dark-panel {
        width: min(100% - 22px, 1180px);
        padding: 24px;
        border-radius: 28px;
    }

    .story-card {
        padding: 22px;
    }
}
