:root {
    color-scheme: dark;
    --bg: #070812;
    --bg-soft: #101320;
    --bg-card: rgba(18, 22, 38, 0.82);
    --bg-card-strong: rgba(24, 29, 48, 0.96);
    --line: rgba(255, 255, 255, 0.12);
    --text: #f8fafc;
    --muted: #a8b3cf;
    --muted-strong: #d6ddf1;
    --primary: #ff4d8d;
    --primary-2: #7c5cff;
    --gold: #ffd166;
    --green: #52e0b7;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    --radius: 24px;
    --radius-sm: 16px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 10%, rgba(124, 92, 255, 0.28), transparent 30%),
        radial-gradient(circle at 86% 16%, rgba(255, 77, 141, 0.22), transparent 34%),
        linear-gradient(135deg, #070812 0%, #0b1020 42%, #111827 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 8, 18, 0.82);
    backdrop-filter: blur(18px);
}

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

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

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 14px 38px rgba(255, 77, 141, 0.26);
}

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

.site-nav a,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted-strong);
    transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

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

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

.mobile-nav {
    display: none;
    width: min(100% - 32px, var(--max));
    margin: 0 auto 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(7, 8, 18, 0.92);
}

.hero-section {
    position: relative;
    overflow: hidden;
    width: min(100% - 32px, var(--max));
    margin: 28px auto 72px;
    min-height: 620px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(255, 77, 141, 0.18), transparent 36%),
        linear-gradient(225deg, rgba(124, 92, 255, 0.2), transparent 38%),
        rgba(10, 13, 27, 0.82);
    box-shadow: var(--shadow);
}

.hero-glow {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    filter: blur(48px);
    opacity: 0.5;
}

.hero-glow-one {
    left: -120px;
    top: -120px;
    background: var(--primary);
}

.hero-glow-two {
    right: -120px;
    bottom: -120px;
    background: var(--primary-2);
}

.hero-content {
    position: relative;
    z-index: 1;
    min-height: 620px;
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    gap: 34px;
    align-items: center;
    padding: 48px;
}

.section-kicker {
    margin: 0 0 10px;
    color: var(--green);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-main-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(36px, 7vw, 76px);
    line-height: 1.03;
    letter-spacing: -0.06em;
}

.hero-main-copy p,
.page-hero p,
.detail-one-line {
    color: var(--muted-strong);
    font-size: 18px;
}

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

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

.primary-button {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(255, 77, 141, 0.24);
}

.secondary-button {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted-strong);
}

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

.hero-mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.hero-mini-links a {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, 0.06);
}

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

.hero-slide {
    display: none;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: stretch;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(8, 10, 20, 0.58);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero-slide.is-active {
    display: grid;
    animation: fadeUp 0.45s ease both;
}

.hero-slide-image img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}

.hero-slide-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.hero-slide-copy h2 {
    margin: 10px 0 12px;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.hero-slide-copy p {
    margin: 0;
    color: var(--muted-strong);
}

.hero-dots {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 18px;
}

.hero-dots button {
    width: 34px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
}

.hero-dots button.is-active {
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

.section-wrap,
.filter-panel,
.page-hero,
.detail-hero {
    width: min(100% - 32px, var(--max));
    margin: 0 auto 56px;
}

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

.section-head h2,
.filter-heading h2,
.article-card h2 {
    margin: 0;
    font-size: clamp(24px, 4vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-head a {
    color: var(--green);
    font-weight: 800;
}

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

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

.category-card a {
    position: relative;
    overflow: hidden;
    display: flex;
    min-height: 210px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.25);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
    transition: transform 0.35s ease;
}

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

.category-card-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(4, 5, 10, 0.96), rgba(4, 5, 10, 0.14));
}

.category-number {
    position: absolute;
    top: 14px;
    right: 14px;
    color: var(--gold);
    font-weight: 900;
}

.category-card div {
    position: relative;
    z-index: 1;
    align-self: end;
    padding: 18px;
}

.category-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

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

.filter-panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(18, 22, 38, 0.72);
    box-shadow: var(--shadow);
}

.filter-controls {
    display: grid;
    grid-template-columns: 1.7fr repeat(4, 1fr);
    gap: 14px;
}

.filter-controls label {
    display: grid;
    gap: 8px;
    color: var(--muted-strong);
    font-weight: 700;
}

.filter-controls input,
.filter-controls select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    padding: 0 14px;
}

.filter-controls select option {
    color: #111827;
}

.filter-note {
    margin: 14px 0 0;
    color: var(--muted);
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.24);
    background: var(--bg-card-strong);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, rgba(255, 77, 141, 0.32), rgba(124, 92, 255, 0.32));
}

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

.movie-card:hover .movie-poster img {
    transform: scale(1.06);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5, 6, 12, 0.78), transparent 50%);
}

.poster-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 77, 141, 0.92);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.movie-meta-line span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.movie-card h3 {
    margin: 12px 0 8px;
    font-size: 19px;
    line-height: 1.28;
}

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

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, 0.06);
    font-size: 12px;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 3;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #111827;
    background: linear-gradient(135deg, #ffe08a, #ff9f43);
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.movie-card-compact {
    display: grid;
    grid-template-columns: 118px 1fr;
    min-height: 176px;
}

.movie-card-compact .movie-poster {
    aspect-ratio: auto;
    height: 100%;
}

.movie-card-compact .movie-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-hero,
.detail-hero {
    padding: 44px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(255, 77, 141, 0.18), rgba(124, 92, 255, 0.08)),
        rgba(15, 18, 32, 0.82);
    box-shadow: var(--shadow);
}

.slim-hero {
    margin-top: 28px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    color: var(--muted-strong);
}

.breadcrumb a {
    color: var(--green);
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 36px;
    align-items: center;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.4);
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0 0;
}

.detail-meta div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
}

.detail-meta dt {
    color: var(--muted);
    font-size: 13px;
}

.detail-meta dd {
    margin: 6px 0 0;
    color: var(--text);
    font-weight: 800;
}

.detail-tags {
    margin-top: 22px;
}

.player-section {
    scroll-margin-top: 92px;
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18));
}

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

.player-play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
    font-size: 30px;
}

.article-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.article-card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
}

.article-card p {
    color: var(--muted-strong);
    margin: 16px 0 0;
    text-align: justify;
}

.empty-state {
    padding: 28px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--muted-strong);
    text-align: center;
    background: rgba(255, 255, 255, 0.06);
}

.site-footer {
    width: min(100% - 32px, var(--max));
    margin: 72px auto 28px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(7, 8, 18, 0.72);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
}

.footer-grid h2 {
    margin: 0 0 12px;
    font-size: 16px;
}

.footer-grid p,
.footer-bottom {
    color: var(--muted);
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: var(--muted-strong);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

[hidden] {
    display: none !important;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

    .filter-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .nav-toggle {
        display: block;
    }

    .mobile-nav.is-open {
        display: grid;
        gap: 6px;
    }

    .hero-section {
        min-height: auto;
        margin-top: 18px;
        border-radius: 24px;
    }

    .hero-content,
    .page-hero,
    .detail-hero {
        padding: 24px;
    }

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

    .hero-slide-image img {
        height: 320px;
    }

    .category-grid,
    .category-grid-large,
    .movie-grid,
    .ranking-grid,
    .ranking-grid-wide,
    .filter-controls,
    .detail-meta {
        grid-template-columns: 1fr;
    }

    .movie-card-compact {
        grid-template-columns: 104px 1fr;
    }

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