:root {
    color-scheme: dark;
    --bg: #080a12;
    --bg-soft: #101522;
    --card: rgba(18, 24, 38, 0.82);
    --card-solid: #141b2b;
    --line: rgba(255, 255, 255, 0.1);
    --text: #f8fafc;
    --muted: #a7b0c2;
    --brand: #f97316;
    --brand-2: #ec4899;
    --brand-3: #8b5cf6;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(236, 72, 153, 0.2), transparent 34rem),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.18), transparent 32rem),
        linear-gradient(135deg, #070812 0%, #101425 46%, #171020 100%);
    color: var(--text);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 78%);
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(8, 10, 18, 0.72);
    backdrop-filter: blur(18px);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2), var(--brand-3));
    box-shadow: 0 14px 34px rgba(236, 72, 153, 0.3);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.site-nav a {
    padding: 9px 12px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: currentColor;
}

.hero {
    position: relative;
    min-height: 680px;
    padding: 54px 0 72px;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -10% 0;
    height: 240px;
    background: linear-gradient(to top, rgba(8, 10, 18, 1), transparent);
    pointer-events: none;
}

.hero-slider {
    position: relative;
    z-index: 2;
    min-height: 560px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
    gap: 42px;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(24px) scale(0.99);
    transition: opacity 0.6s ease, visibility 0.6s ease, transform 0.6s ease;
}

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

.hero-copy {
    position: relative;
    padding: 38px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04)),
        rgba(8, 10, 18, 0.48);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.eyebrow {
    margin: 0 0 12px;
    color: #fbbf24;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 70px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-copy p {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
    border: 0;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 18px 42px rgba(236, 72, 153, 0.28);
}

.btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.14);
}

.hero-poster {
    position: relative;
    min-height: 520px;
    border-radius: 36px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background: #111827;
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent 55%);
    z-index: 1;
}

.hero-poster-info {
    position: absolute;
    z-index: 2;
    left: 22px;
    right: 22px;
    bottom: 22px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.hero-poster-info strong {
    font-size: 22px;
}

.hero-poster-info span {
    color: var(--muted);
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 38px;
    bottom: 18px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 7px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.24);
    cursor: pointer;
}

.hero-dot.is-active {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

main {
    position: relative;
    z-index: 1;
}

.section {
    padding: 42px 0;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.section-head p:not(.eyebrow) {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-more {
    flex: 0 0 auto;
    color: #fbbf24;
    font-weight: 800;
}

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

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

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card-link:hover {
    transform: translateY(-6px);
    border-color: rgba(249, 115, 22, 0.48);
    background: rgba(22, 29, 46, 0.95);
}

.poster-frame {
    position: relative;
    aspect-ratio: 2 / 3;
    margin: 0;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(139, 92, 246, 0.16));
}

.poster-frame img {
    transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card-link:hover img {
    transform: scale(1.06);
    filter: saturate(1.08) contrast(1.05);
}

.poster-year {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 9px;
    border-radius: 99px;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

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

.movie-meta-line {
    display: flex;
    gap: 8px;
    color: #fbbf24;
    font-size: 12px;
    font-weight: 700;
}

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

.movie-card p {
    margin: 0;
    min-height: 58px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 13px;
}

.chip-row span,
.info-chip,
.tag-chip {
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.06);
    color: #dce3f3;
    font-size: 12px;
}

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

.category-card {
    min-height: 150px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.18), transparent 55%),
        rgba(255, 255, 255, 0.055);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(236, 72, 153, 0.45);
}

.category-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 19px;
}

.category-card span {
    color: var(--muted);
    line-height: 1.6;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 44px 58px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.055);
    transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.09);
}

.rank-item img {
    width: 58px;
    height: 78px;
    border-radius: 12px;
    background: var(--card-solid);
}

.rank-no {
    color: #fbbf24;
    font-size: 20px;
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-year {
    color: var(--muted);
    font-size: 13px;
}

.page-hero {
    padding: 62px 0 26px;
}

.page-hero-card {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(139, 92, 246, 0.1)),
        rgba(255, 255, 255, 0.055);
    box-shadow: var(--shadow);
}

.page-hero p {
    max-width: 760px;
    color: var(--muted);
    line-height: 1.8;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin: 22px 0;
}

.search-panel input,
.search-panel select {
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
    outline: none;
    padding: 0 16px;
}

.search-panel input:focus,
.search-panel select:focus {
    border-color: rgba(249, 115, 22, 0.7);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: #fbbf24;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
    gap: 34px;
    align-items: start;
    padding: 42px 0;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: var(--card-solid);
    box-shadow: var(--shadow);
    aspect-ratio: 2 / 3;
}

.detail-title {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.055);
}

.detail-title p {
    color: var(--muted);
    line-height: 1.85;
}

.info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.player-section {
    padding: 22px 0 44px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(236, 72, 153, 0.18), rgba(0, 0, 0, 0.62));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    font-size: 34px;
    cursor: pointer;
    box-shadow: 0 20px 50px rgba(236, 72, 153, 0.42);
}

.content-panel {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.055);
    line-height: 1.9;
}

.content-panel h2 {
    margin-top: 0;
}

.content-panel p {
    color: #d8deeb;
}

.site-footer {
    margin-top: 52px;
    padding: 44px 0 26px;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.24);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
    gap: 24px;
}

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

.site-footer p,
.copyright {
    color: var(--muted);
    line-height: 1.7;
}

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

.footer-links a {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
}

.copyright {
    margin-top: 26px;
    font-size: 13px;
}

.empty-state {
    display: none;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.05);
}

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

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

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

    .hero-poster {
        min-height: 360px;
    }
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 64px;
    }

    .menu-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(8, 10, 18, 0.95);
    }

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

    .hero {
        min-height: 820px;
        padding-top: 30px;
    }

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

    .hero-copy {
        padding: 24px;
    }

    .hero-poster {
        min-height: 330px;
    }

    .hero-controls {
        left: 24px;
    }

    .section-head,
    .footer-grid,
    .detail-hero {
        grid-template-columns: 1fr;
        display: grid;
    }

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

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

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

    .detail-title {
        padding: 22px;
    }

    .rank-item {
        grid-template-columns: 38px 50px minmax(0, 1fr) auto;
    }

    .rank-item img {
        width: 50px;
        height: 68px;
    }
}
