:root {
    --bg: #070912;
    --panel: rgba(255, 255, 255, 0.08);
    --panel-strong: rgba(255, 255, 255, 0.14);
    --line: rgba(255, 255, 255, 0.16);
    --text: #f8fafc;
    --muted: rgba(248, 250, 252, 0.72);
    --soft: rgba(248, 250, 252, 0.55);
    --purple: #a855f7;
    --pink: #ec4899;
    --orange: #f97316;
    --cyan: #22d3ee;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 24px;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(168, 85, 247, 0.28), transparent 34rem),
        radial-gradient(circle at 84% 8%, rgba(236, 72, 153, 0.22), transparent 30rem),
        linear-gradient(135deg, #050816 0%, #111827 44%, #1e1b4b 100%);
    line-height: 1.6;
}

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

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

.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(7, 9, 18, 0.78);
    backdrop-filter: blur(18px);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
    font-size: 20px;
}

.logo-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--purple), var(--pink), var(--orange));
    box-shadow: 0 12px 32px rgba(236, 72, 153, 0.3);
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    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.08);
    padding: 10px;
}

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

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 9, 18, 0.94), rgba(7, 9, 18, 0.62), rgba(7, 9, 18, 0.92)),
        radial-gradient(circle at 68% 22%, rgba(236, 72, 153, 0.35), transparent 26rem);
    z-index: 2;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) brightness(0.66);
}

.hero-content {
    position: relative;
    z-index: 3;
    min-height: 680px;
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    align-items: center;
    gap: 56px;
    padding: 82px 0 64px;
}

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

.hero-title {
    margin: 0;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.gradient-text {
    background: linear-gradient(120deg, #fff 0%, #fde68a 24%, #f9a8d4 56%, #c4b5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-desc {
    max-width: 720px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 18px;
}

.hero-actions,
.form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

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

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.btn.primary {
    border: 0;
    background: linear-gradient(135deg, var(--purple), var(--pink), var(--orange));
}

.btn.small {
    min-height: 36px;
    padding: 0 13px;
    font-size: 13px;
}

.hero-panel {
    position: relative;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(236, 72, 153, 0.18));
}

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

.hero-card-info {
    padding: 20px 4px 4px;
}

.hero-card-info h2 {
    margin: 0 0 8px;
    font-size: 26px;
    line-height: 1.15;
}

.hero-card-info p {
    margin: 0;
    color: var(--muted);
}

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

.hero-dot {
    width: 42px;
    height: 8px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.25);
}

.hero-dot.active {
    background: linear-gradient(90deg, var(--pink), var(--orange));
}

.section {
    padding: 72px 0;
}

.section.compact {
    padding: 44px 0;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.section-heading p:not(.eyebrow) {
    margin: 10px 0 0;
    color: var(--muted);
    max-width: 740px;
}

.section-more {
    flex: 0 0 auto;
    font-weight: 900;
    color: #f9a8d4;
}

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

.category-card {
    min-height: 170px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 80% 0%, rgba(236, 72, 153, 0.22), transparent 9rem),
        rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.35);
    background:
        radial-gradient(circle at 80% 0%, rgba(249, 115, 22, 0.3), transparent 9rem),
        rgba(255, 255, 255, 0.12);
}

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

.category-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

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

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

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

.movie-link:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.36);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.34), rgba(236, 72, 153, 0.2));
}

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

.movie-link:hover .poster-wrap img {
    transform: scale(1.055);
}

.year-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(7, 9, 18, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

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

.movie-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--soft);
    font-size: 12px;
}

.movie-card-body h3 {
    margin: 8px 0 8px;
    min-height: 48px;
    font-size: 17px;
    line-height: 1.32;
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span,
.chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.11);
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
}

.search-panel {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    margin-bottom: 24px;
}

.search-input {
    width: 100%;
    height: 52px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 0 16px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.search-input:focus {
    border-color: rgba(236, 72, 153, 0.75);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.14);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-btn {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    min-height: 34px;
    padding: 0 12px;
    font-weight: 800;
}

.filter-btn.active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--purple), var(--pink));
}

.rank-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

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

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

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

.rank-item img {
    width: 58px;
    height: 78px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
}

.rank-num {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--pink), var(--orange));
}

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

.rank-item em {
    margin-top: 4px;
    color: var(--soft);
    font-style: normal;
    font-size: 13px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 28px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a::after {
    content: "/";
    margin-left: 10px;
    color: var(--soft);
}

.detail-hero {
    padding: 36px 0 54px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.96fr);
    gap: 28px;
    align-items: start;
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.28);
    cursor: pointer;
    z-index: 3;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.48) saturate(1.15);
}

.play-mark {
    position: relative;
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 34px;
    background: linear-gradient(135deg, var(--purple), var(--pink), var(--orange));
    box-shadow: 0 18px 46px rgba(236, 72, 153, 0.35);
}

.player-cover.hidden {
    display: none;
}

.detail-info {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 22px;
}

.detail-info p {
    color: var(--muted);
}

.content-box {
    margin-top: 22px;
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--line);
}

.content-box h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.content-box p {
    margin: 0 0 14px;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 36px 0;
    background: rgba(0, 0, 0, 0.18);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
}

.footer-inner p {
    margin: 6px 0 0;
}

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

.is-hidden {
    display: none !important;
}

@media (max-width: 1040px) {
    .hero-content,
    .detail-grid,
    .rank-layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 720px) {
    .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: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(7, 9, 18, 0.95);
        backdrop-filter: blur(18px);
    }

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

    .hero,
    .hero-content {
        min-height: auto;
    }

    .hero-content {
        padding: 54px 0;
    }

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

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

    .movie-card-body h3 {
        min-height: auto;
        font-size: 15px;
    }

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

    .detail-info,
    .content-box {
        padding: 18px;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 34px 50px 1fr;
    }
}
