:root {
    --bg: #0f172a;
    --bg-soft: #111c31;
    --bg-card: rgba(30, 41, 59, 0.78);
    --bg-card-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.22);
    --line-strong: rgba(16, 185, 129, 0.36);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --primary: #10b981;
    --primary-bright: #34d399;
    --primary-soft: rgba(16, 185, 129, 0.16);
    --teal: #14b8a6;
    --shadow: 0 26px 80px rgba(0, 0, 0, 0.35);
    --radius: 22px;
    --radius-lg: 32px;
    --max: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 5%, rgba(16, 185, 129, 0.16), transparent 32rem),
        radial-gradient(circle at 85% 15%, rgba(20, 184, 166, 0.14), transparent 30rem),
        linear-gradient(180deg, #0b1120 0%, var(--bg) 42%, #090f1d 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.78));
    backdrop-filter: blur(18px);
}

.nav-shell {
    max-width: var(--max);
    height: 70px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #06281e;
    background: linear-gradient(135deg, var(--primary-bright), var(--teal));
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.28);
}

.brand-text {
    font-size: 21px;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary-bright), #5eead4);
    -webkit-background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #cbd5e1;
    font-size: 15px;
}

.nav-link,
.mobile-link {
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--primary-bright);
}

.nav-category-link {
    color: #94a3b8;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.65);
    color: var(--text);
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    padding: 16px 24px 24px;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.98);
}

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

main {
    overflow: hidden;
}

.hero-slider {
    position: relative;
    min-height: 720px;
    padding-top: 70px;
    isolation: isolate;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    padding-top: 70px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -3;
    filter: saturate(1.1) brightness(0.45);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 72% 46%, rgba(16, 185, 129, 0.2), transparent 23rem),
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.72) 46%, rgba(15, 23, 42, 0.2)),
        linear-gradient(0deg, var(--bg), transparent 38%);
}

.hero-content {
    max-width: var(--max);
    height: 100%;
    min-height: 650px;
    margin: 0 auto;
    padding: 70px 24px 84px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 60px;
}

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

.eyebrow {
    margin: 0 0 14px;
    color: var(--primary-bright);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-desc {
    max-width: 660px;
    margin: 24px 0 0;
    color: #dbeafe;
    font-size: 19px;
    line-height: 1.75;
}

.hero-tags,
.tag-row,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: 999px;
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.12);
    font-size: 13px;
}

.hero-actions,
.compact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.primary-btn,
.ghost-btn,
.text-link,
.quick-search-box a,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #052e25;
    background: linear-gradient(135deg, var(--primary-bright), var(--teal));
    box-shadow: 0 18px 40px rgba(16, 185, 129, 0.25);
}

.ghost-btn {
    color: #e2e8f0;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.54);
}

.primary-btn:hover,
.ghost-btn:hover,
.quick-search-box a:hover,
.section-more:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    height: 500px;
    overflow: hidden;
    border: 1px solid rgba(52, 211, 153, 0.24);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow);
    transform: perspective(1000px) rotateY(-7deg);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.88));
}

.hero-poster span {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 2;
    font-size: 24px;
    font-weight: 800;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 5;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.32);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--primary-bright);
}

.quick-search,
.inner-main {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px;
}

.quick-search {
    margin-top: -44px;
    position: relative;
    z-index: 6;
}

.quick-search-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px;
    border: 1px solid rgba(52, 211, 153, 0.24);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search h2,
.section-heading h2,
.page-hero h1,
.detail-content h2 {
    margin: 0;
}

.quick-search-box {
    flex: 1;
    max-width: 620px;
    display: flex;
    gap: 12px;
}

.quick-search-box input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--text);
    outline: none;
    background: rgba(15, 23, 42, 0.78);
    padding: 0 16px;
}

.quick-search-box input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.quick-search-box a,
.section-more,
.text-link {
    color: var(--primary-bright);
    border: 1px solid rgba(16, 185, 129, 0.28);
    background: var(--primary-soft);
    white-space: nowrap;
}

.page-section {
    max-width: var(--max);
    margin: 0 auto;
    padding: 72px 24px 0;
    position: relative;
}

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

.section-heading h2,
.quick-search h2 {
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -0.03em;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.category-card img {
    position: absolute;
    inset: 0;
    filter: brightness(0.45) saturate(1.08);
    transition: transform 0.35s ease;
}

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

.category-card span,
.category-card p {
    position: relative;
    z-index: 2;
    display: block;
    padding: 0 20px;
}

.category-card span {
    margin-top: 118px;
    font-size: 24px;
    font-weight: 800;
}

.category-card p {
    margin: 10px 0 20px;
    color: #cbd5e1;
    line-height: 1.6;
    font-size: 14px;
}

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

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

.movie-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(30, 41, 59, 0.56);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.2);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card[hidden] {
    display: none;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(52, 211, 153, 0.4);
    background: rgba(30, 41, 59, 0.82);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #0f172a);
}

.movie-card-wide {
    min-width: 250px;
    max-width: 250px;
    flex: 0 0 250px;
}

.poster-link img {
    transition: transform 0.35s ease, filter 0.35s ease;
}

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.86));
}

.poster-shine {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg, transparent 25%, rgba(255, 255, 255, 0.12), transparent 55%);
    transform: translateX(-120%);
    transition: transform 0.45s ease;
}

.movie-card:hover .poster-shine {
    transform: translateX(120%);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 6px 12px;
    color: #052e25;
    background: linear-gradient(135deg, var(--primary-bright), var(--teal));
}

.rank-badge {
    left: 12px;
    top: 12px;
    width: 40px;
    height: 40px;
    color: white;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.card-body {
    padding: 16px;
}

.card-meta {
    color: var(--primary-bright);
    font-size: 13px;
    font-weight: 700;
}

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

.card-body h3 a:hover,
.rank-info h3 a:hover {
    color: var(--primary-bright);
}

.card-body p {
    min-height: 46px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.tag-row span {
    min-height: 26px;
    padding: 4px 9px;
    font-size: 12px;
}

.rail-section {
    overflow: visible;
}

.horizontal-rail {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 2px 22px;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.horizontal-rail::-webkit-scrollbar {
    display: none;
}

.rail-controls {
    position: absolute;
    right: 24px;
    top: 74px;
    display: flex;
    gap: 10px;
}

.rail-controls button {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text);
    background: rgba(30, 41, 59, 0.72);
    cursor: pointer;
}

.ranking-section {
    position: relative;
}

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

.full-rank-list {
    grid-template-columns: 1fr;
}

.rank-item {
    display: grid;
    grid-template-columns: 86px 48px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 12px;
}

.rank-cover {
    display: block;
    width: 86px;
    height: 116px;
    border-radius: 16px;
    overflow: hidden;
}

.rank-number {
    font-size: 30px;
    font-weight: 900;
    color: rgba(52, 211, 153, 0.78);
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 19px;
}

.rank-info p {
    margin: 0 0 8px;
    color: #cbd5e1;
    line-height: 1.6;
}

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

.inner-main {
    padding-top: 116px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 300px;
    padding: 48px;
    border: 1px solid rgba(52, 211, 153, 0.24);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 84% 18%, rgba(16, 185, 129, 0.24), transparent 18rem),
        linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.84));
    box-shadow: var(--shadow);
}

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

.small-hero {
    min-height: 260px;
}

.filter-wrap {
    padding-top: 34px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 160px 160px;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
}

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

.category-overview-grid {
    display: grid;
    gap: 22px;
    padding: 44px 0 76px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
}

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

.category-preview img {
    border-radius: 16px;
}

.category-overview-card h2 {
    margin: 0 0 12px;
    font-size: 30px;
}

.category-overview-card p {
    color: #cbd5e1;
    line-height: 1.8;
}

.detail-main {
    padding-bottom: 80px;
}

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

.breadcrumb a:hover {
    color: var(--primary-bright);
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 28px;
    border: 1px solid rgba(52, 211, 153, 0.22);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 78% 20%, rgba(16, 185, 129, 0.18), transparent 24rem),
        rgba(15, 23, 42, 0.76);
    box-shadow: var(--shadow);
}

.detail-cover {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: #020617;
}

.detail-info h1 {
    font-size: clamp(38px, 5vw, 64px);
}

.detail-one-line {
    margin: 20px 0;
    max-width: 780px;
    color: #dbeafe;
    font-size: 19px;
    line-height: 1.8;
}

.detail-meta {
    margin: 18px 0;
}

.detail-tags {
    margin-bottom: 28px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(52, 211, 153, 0.24);
    border-radius: var(--radius-lg);
    background: #000;
    box-shadow: var(--shadow);
}

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

.play-mask {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: white;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.7));
}

.play-mask.is-hidden {
    display: none;
}

.play-mask-icon {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px;
    border-radius: 50%;
    color: #052e25;
    background: linear-gradient(135deg, var(--primary-bright), var(--teal));
    box-shadow: 0 20px 50px rgba(16, 185, 129, 0.34);
    font-size: 30px;
}

.detail-content {
    display: grid;
    gap: 22px;
    margin-top: 42px;
}

.detail-content article {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.58);
}

.detail-content h2 {
    font-size: 26px;
}

.detail-content p {
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.9;
}

.related-section {
    padding-left: 0;
    padding-right: 0;
}

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

.footer-grid {
    max-width: var(--max);
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
}

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

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

.site-footer h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

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

.footer-links a:hover {
    color: var(--primary-bright);
}

.footer-bottom {
    max-width: var(--max);
    margin: 0 auto;
    padding: 20px 24px 34px;
    color: var(--muted-2);
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

@media (max-width: 1120px) {
    .desktop-nav {
        gap: 14px;
        font-size: 14px;
    }

    .nav-category-link {
        display: none;
    }

    .hero-content {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 34px;
    }

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero-slider,
    .hero-slide {
        min-height: 760px;
    }

    .hero-content {
        min-height: 690px;
        grid-template-columns: 1fr;
        align-content: center;
        gap: 28px;
        padding-top: 48px;
    }

    .hero-poster {
        display: none;
    }

    .quick-search-inner,
    .section-heading,
    .detail-hero,
    .category-overview-card {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .quick-search-box,
    .filter-panel {
        max-width: none;
        grid-template-columns: 1fr;
    }

    .rank-list,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 620px) {
    .nav-shell,
    .quick-search,
    .page-section,
    .inner-main {
        padding-left: 16px;
        padding-right: 16px;
    }

    .brand-text {
        font-size: 18px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 38px;
    }

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

    .hero-actions,
    .quick-search-box {
        flex-direction: column;
    }

    .category-grid,
    .movie-grid,
    .large-grid {
        grid-template-columns: 1fr;
    }

    .page-hero,
    .detail-hero,
    .detail-content article {
        padding: 22px;
        border-radius: 24px;
    }

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

    .rank-cover {
        width: 74px;
        height: 100px;
    }

    .rank-number {
        font-size: 24px;
    }
}
