:root {
    --bg: #030712;
    --bg-soft: #0b1120;
    --panel: rgba(17, 24, 39, 0.72);
    --panel-strong: rgba(31, 41, 55, 0.86);
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --accent: #ffffff;
    --accent-dark: #111827;
    --glow: rgba(148, 163, 184, 0.28);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(75, 85, 99, 0.32), transparent 34rem),
        linear-gradient(180deg, #030712 0%, #111827 45%, #030712 100%);
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: rgba(3, 7, 18, 0.86);
    backdrop-filter: blur(20px);
}

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

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

.brand-mark {
    position: relative;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
    box-shadow: 0 0 30px var(--glow);
}

.brand-mark span {
    width: 0;
    height: 0;
    margin-left: 3px;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid #f8fafc;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.brand-text strong {
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 0.08em;
}

.brand-text small {
    color: var(--muted-2);
    font-size: 12px;
}

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

.nav-link {
    color: var(--muted);
    padding: 10px 14px;
    border-radius: 12px;
    transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    background: rgba(31, 41, 55, 0.78);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

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

.hero {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
    background: #030712;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.8s ease, transform 1.2s ease;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

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

.hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3, 7, 18, 0.92) 0%, rgba(3, 7, 18, 0.68) 44%, rgba(3, 7, 18, 0.26) 100%),
        linear-gradient(0deg, #030712 0%, rgba(3, 7, 18, 0.42) 38%, rgba(3, 7, 18, 0.06) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding-bottom: clamp(64px, 9vw, 128px);
}

.hero-copy {
    width: min(720px, 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #cbd5e1;
    font-size: 14px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    display: inline-block;
    width: 26px;
    height: 1px;
    background: rgba(203, 213, 225, 0.7);
}

.hero h1,
.page-hero h1,
.movie-detail-hero h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 78px);
    font-weight: 300;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 680px;
    margin: 18px 0 0;
    color: #d1d5db;
    font-size: clamp(16px, 2vw, 20px);
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(14px);
    font-size: 13px;
}

.hero-actions,
.detail-info .btn {
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    transition: 0.25s ease;
    cursor: pointer;
}

.btn + .btn {
    margin-left: 10px;
}

.btn-primary {
    color: var(--accent-dark);
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(255, 255, 255, 0.16);
}

.btn-primary:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
}

.btn-ghost {
    color: #e5e7eb;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(14px);
}

.btn-ghost:hover {
    background: rgba(31, 41, 55, 0.9);
    transform: translateY(-2px);
}

.hero-dots {
    position: absolute;
    right: min(48px, 5vw);
    bottom: 46px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
    transition: 0.25s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: #ffffff;
}

.section {
    padding: clamp(52px, 7vw, 96px) 0;
}

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

.section-head.compact {
    margin-bottom: 20px;
}

.section h2,
.ranking-head h2,
.content-card h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 40px);
    font-weight: 300;
    letter-spacing: -0.02em;
}

.text-link,
.ranking-head a {
    color: #cbd5e1;
    border-bottom: 1px solid rgba(203, 213, 225, 0.4);
}

.text-link:hover,
.ranking-head a:hover {
    color: #ffffff;
}

.intro-section {
    padding-bottom: 36px;
}

.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 24px;
    align-items: center;
}

.intro-grid p {
    max-width: 760px;
    color: var(--muted);
    font-size: 17px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-grid span {
    display: grid;
    min-height: 104px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
}

.stat-grid strong {
    font-size: 34px;
    font-weight: 300;
}

.stat-grid small {
    color: var(--muted);
}

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

.category-tile,
.category-overview-card,
.content-card,
.ranking-card,
.filter-panel,
.player-panel {
    border: 1px solid var(--line);
    background: var(--panel);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.category-tile {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.26);
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    min-height: 118px;
}

.category-preview img {
    width: 100%;
    height: 118px;
    object-fit: cover;
    border-radius: 12px;
}

.category-tile strong {
    font-size: 21px;
    font-weight: 400;
}

.category-tile small,
.category-tile p {
    color: var(--muted);
}

.category-tile p {
    margin: 0;
}

.feature-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 26px;
    align-items: start;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
    gap: 22px;
}

.movie-grid-featured {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.movie-grid-related {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

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

.poster-shine {
    position: absolute;
    inset: auto 0 0 0;
    height: 50%;
    background: linear-gradient(0deg, rgba(3, 7, 18, 0.82), transparent);
}

.poster-link:hover img {
    transform: scale(1.07);
    filter: brightness(1.08);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    color: #111827;
    background: #ffffff;
    font-style: normal;
    font-weight: 700;
}

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

.movie-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--muted-2);
    font-size: 12px;
}

.movie-card h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: #cbd5e1;
}

.movie-card p {
    display: -webkit-box;
    margin: 8px 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ranking-card {
    border-radius: var(--radius-xl);
    padding: 22px;
}

.sticky-card {
    position: sticky;
    top: 98px;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 38px 52px minmax(0, 1fr) 18px;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.42);
    transition: 0.25s ease;
}

.rank-row:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(31, 41, 55, 0.78);
}

.rank-number {
    color: #e5e7eb;
    font-size: 18px;
    font-weight: 300;
    text-align: center;
}

.rank-row img {
    width: 52px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-content {
    min-width: 0;
}

.rank-content strong,
.rank-content small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-content small {
    color: var(--muted);
    font-size: 12px;
}

.rank-arrow {
    color: var(--muted-2);
    font-size: 24px;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 18px;
    border-radius: var(--radius-lg);
}

.search-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.search-box input,
.filter-row select {
    width: 100%;
    min-height: 46px;
    color: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    background: rgba(3, 7, 18, 0.6);
}

.search-box input {
    padding: 0 16px;
}

.search-box button {
    min-height: 46px;
    padding: 0 16px;
    color: #111827;
    border: 0;
    border-radius: 14px;
    background: #ffffff;
    cursor: pointer;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.filter-row select {
    padding: 0 12px;
}

.result-count {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.movie-card.is-hidden {
    display: none;
}

.page-hero,
.movie-detail-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(82px, 10vw, 150px) 0 clamp(64px, 8vw, 108px);
}

.page-hero::before,
.movie-detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: var(--page-hero-image, var(--detail-image));
    background-size: cover;
    background-position: center;
    opacity: 0.24;
    filter: blur(2px) saturate(0.8);
}

.page-hero::after,
.movie-detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(3, 7, 18, 0.96), rgba(3, 7, 18, 0.68)),
        linear-gradient(0deg, #030712, rgba(3, 7, 18, 0.22));
}

.small-hero {
    padding: 86px 0 72px;
}

.page-hero p,
.movie-detail-hero p {
    max-width: 760px;
    color: #cbd5e1;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

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

.breadcrumb > * + *::before {
    content: "/";
    margin-right: 8px;
    color: var(--muted-2);
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
    padding: 20px;
    border-radius: var(--radius-xl);
}

.category-cover {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.category-cover img {
    width: 100%;
    height: 102px;
    object-fit: cover;
    border-radius: 12px;
}

.category-overview-body p {
    color: var(--muted);
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.mini-links a {
    color: #cbd5e1;
    padding: 3px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: clamp(24px, 5vw, 64px);
    align-items: end;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

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

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.detail-meta span {
    padding: 7px 12px;
    color: #d1d5db;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.66);
}

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

.detail-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    align-items: start;
}

.player-panel {
    padding: 14px;
    border-radius: var(--radius-xl);
}

.video-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    background: #000000;
}

.video-frame video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    gap: 14px;
    color: #ffffff;
    border: 0;
    background: linear-gradient(0deg, rgba(3, 7, 18, 0.6), rgba(3, 7, 18, 0.18));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(255, 255, 255, 0.2);
}

.play-circle i {
    width: 0;
    height: 0;
    margin-left: 5px;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    border-left: 22px solid #111827;
}

.play-overlay strong {
    font-size: 20px;
    font-weight: 400;
}

.content-card {
    margin-top: 22px;
    padding: clamp(22px, 4vw, 34px);
    border-radius: var(--radius-xl);
}

.content-card p {
    color: #cbd5e1;
    font-size: 17px;
}

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

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(3, 7, 18, 0.72);
    padding: 44px 0;
}

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

.site-footer p,
.site-footer a {
    color: var(--muted);
}

.site-footer a {
    display: block;
    margin-top: 8px;
}

.site-footer a:hover {
    color: #ffffff;
}

.site-footer h3 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 500;
}

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

@media (max-width: 1120px) {
    .feature-layout,
    .detail-main-grid {
        grid-template-columns: 1fr;
    }

    .sticky-card {
        position: static;
    }

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

@media (max-width: 860px) {
    .container {
        width: min(100% - 24px, 1320px);
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 76px;
        right: 12px;
        left: 12px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        max-height: calc(100vh - 96px);
        overflow: auto;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(3, 7, 18, 0.96);
        box-shadow: var(--shadow);
    }

    body.menu-open .nav-links {
        display: flex;
    }

    .nav-link {
        padding: 13px 14px;
    }

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

    .hero {
        min-height: 76vh;
    }

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

    .hero-dots {
        right: 24px;
        bottom: 34px;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        width: min(100%, 320px);
    }

    .btn + .btn {
        margin-left: 0;
    }

    .intro-grid,
    .detail-layout,
    .category-overview-card,
    .footer-grid,
    .prose-grid {
        grid-template-columns: 1fr;
    }

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

    .category-overview-grid {
        grid-template-columns: 1fr;
    }

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

    .category-cover img {
        height: 92px;
    }

    .detail-poster {
        max-width: 240px;
    }

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

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

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

    .brand-text small {
        display: none;
    }

    .nav-links {
        top: 68px;
    }

    .hero h1,
    .page-hero h1,
    .movie-detail-hero h1 {
        font-size: 36px;
    }

    .section {
        padding: 48px 0;
    }

    .category-grid,
    .stat-grid,
    .filter-row {
        grid-template-columns: 1fr;
    }

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

    .movie-card h3 {
        font-size: 15px;
    }

    .movie-card p {
        font-size: 12px;
    }

    .ranking-card,
    .filter-panel,
    .content-card {
        border-radius: 20px;
    }

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

    .rank-row {
        grid-template-columns: 30px 48px minmax(0, 1fr);
    }

    .rank-arrow {
        display: none;
    }

    .play-circle {
        width: 64px;
        height: 64px;
    }

    .play-overlay strong {
        font-size: 16px;
    }
}
