:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #f8fafc;
    --shadow: rgba(2, 6, 23, 0.55);
    --radius: 24px;
    --header-height: 72px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 0%, rgba(71, 85, 105, 0.28), transparent 28rem),
        radial-gradient(circle at 88% 18%, rgba(30, 41, 59, 0.65), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(226, 232, 240, 0.15);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(148, 163, 184, 0.8));
    color: #020617;
    font-weight: 900;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.42);
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.brand-name {
    color: #f8fafc;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.brand-tagline {
    color: #94a3b8;
    font-size: 12px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-links a {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: #ffffff;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.74);
    color: #f8fafc;
}

.mobile-panel {
    display: none;
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    z-index: 45;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.96);
    backdrop-filter: blur(18px);
}

.mobile-panel a {
    display: block;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 15px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    color: #e2e8f0;
    font-weight: 700;
}

.hero {
    position: relative;
    min-height: calc(86vh - var(--header-height));
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.72s ease, visibility 0.72s ease;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    min-height: calc(86vh - var(--header-height));
    object-fit: cover;
    transform: scale(1.02);
}

.hero-slide.is-active .hero-image {
    animation: heroZoom 9s ease forwards;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.68) 40%, rgba(2, 6, 23, 0.28) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 54%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 92px 0 82px;
}

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

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 12px;
    border: 1px solid rgba(226, 232, 240, 0.16);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(14px);
}

.hero h1 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(42px, 7vw, 84px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero p {
    margin: 0;
    max-width: 720px;
    color: #cbd5e1;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid rgba(226, 232, 240, 0.12);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #dbeafe;
    font-size: 12px;
    font-weight: 700;
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}

.primary-button,
.secondary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    background: #f8fafc;
    color: #020617;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.42);
}

.secondary-button,
.ghost-button {
    border: 1px solid rgba(226, 232, 240, 0.16);
    background: rgba(15, 23, 42, 0.72);
    color: #f8fafc;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
}

.hero-controls {
    position: absolute;
    right: calc((100% - min(1180px, calc(100% - 32px))) / 2);
    bottom: 40px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dot {
    width: 40px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.38);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 72px;
    background: #f8fafc;
}

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

.section {
    padding: 76px 0 0;
}

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

.section-title {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.section-lead {
    margin: 12px 0 0;
    max-width: 720px;
    color: #94a3b8;
    font-size: 15px;
    line-height: 1.75;
}

.grid {
    display: grid;
    gap: 22px;
}

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

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

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

.movie-card,
.category-card,
.rank-card,
.info-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 24px 70px var(--shadow);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-card:hover {
    transform: translateY(-5px);
    border-color: rgba(226, 232, 240, 0.28);
    background: rgba(15, 23, 42, 0.94);
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #0f172a;
}

.featured-card .card-cover {
    aspect-ratio: 16 / 10;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover .card-cover img {
    transform: scale(1.08);
}

.card-cover::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.card-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.68);
    color: #f8fafc;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.card-body {
    padding: 16px;
}

.card-title {
    margin: 0 0 8px;
    color: #f8fafc;
    font-size: 17px;
    font-weight: 850;
    line-height: 1.35;
}

.card-title a:hover {
    color: #ffffff;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: #94a3b8;
    font-size: 12px;
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 0;
    overflow: hidden;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.68;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 260px);
    gap: 20px;
    overflow-x: auto;
    padding: 4px 4px 18px;
    scrollbar-width: thin;
}

.category-card {
    min-height: 220px;
    padding: 22px;
}

.category-card h2,
.category-card h3 {
    margin: 0 0 12px;
    font-size: 22px;
    letter-spacing: -0.04em;
}

.category-card p {
    margin: 0 0 18px;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.7;
}

.mini-list {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.mini-list a {
    display: block;
    overflow: hidden;
    color: #cbd5e1;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 170px 170px 170px;
    gap: 14px;
    margin: 0 0 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    outline: none;
    background: rgba(2, 6, 23, 0.72);
    color: #f8fafc;
    padding: 0 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(226, 232, 240, 0.46);
}

.page-hero {
    padding: 70px 0 6px;
}

.page-hero h1 {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1;
    letter-spacing: -0.07em;
}

.page-hero p {
    max-width: 780px;
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.8;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 74px 110px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.9);
    color: #020617;
    font-size: 20px;
    font-weight: 900;
}

.rank-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: #0f172a;
}

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

.rank-info h2,
.rank-info h3 {
    margin: 0 0 8px;
    color: #f8fafc;
    font-size: 20px;
}

.rank-info p {
    margin: 0;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.7;
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 36px;
    align-items: end;
    padding: 68px 0 38px;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #0f172a;
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.62);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-info h1 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1;
    letter-spacing: -0.07em;
}

.detail-one-line {
    max-width: 800px;
    margin: 0;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.85;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 0;
}

.player-section {
    padding: 32px 0 0;
}

.player-section h2,
.detail-body h2,
.related-section h2 {
    margin: 0 0 20px;
    color: #f8fafc;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.12);
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 36px 110px rgba(0, 0, 0, 0.45);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.22));
    color: #ffffff;
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.96);
    color: #020617;
    font-size: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.player-overlay span:last-child {
    font-size: 17px;
    font-weight: 900;
}

.detail-body {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 28px;
    padding: 50px 0 0;
}

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

.detail-body p {
    margin: 0 0 18px;
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.88;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-cloud span,
.tag-cloud a {
    display: inline-flex;
    padding: 8px 11px;
    border: 1px solid rgba(226, 232, 240, 0.12);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.42);
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 700;
}

.related-section {
    padding: 52px 0 90px;
}

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

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    color: #94a3b8;
    font-size: 13px;
}

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

.footer-links a:hover {
    color: #f8fafc;
}

@keyframes heroZoom {
    from {
        transform: scale(1.02);
    }
    to {
        transform: scale(1.08);
    }
}

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

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

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

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

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-panel.is-open {
        display: block;
    }

    .brand-tagline {
        display: none;
    }

    .hero {
        min-height: 78vh;
    }

    .hero-image {
        min-height: 78vh;
    }

    .hero-inner {
        align-items: flex-end;
        padding-bottom: 78px;
    }

    .hero-controls {
        right: auto;
        left: 16px;
        bottom: 28px;
    }

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

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

    .rank-card {
        grid-template-columns: 52px 86px 1fr;
    }

    .rank-card .primary-button {
        grid-column: 2 / -1;
        width: 100%;
    }

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

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

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

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

    .brand-mark {
        width: 38px;
        height: 38px;
    }

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

    .hero p,
    .detail-one-line,
    .page-hero p {
        font-size: 15px;
    }

    .featured-grid,
    .category-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .card-body {
        padding: 13px;
    }

    .card-title {
        font-size: 15px;
    }

    .rank-card {
        grid-template-columns: 44px 72px 1fr;
        gap: 12px;
    }

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

    .detail-info h1 {
        font-size: 40px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}
