:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --brand: #34d399;
    --brand-2: #14b8a6;
    --gold: #f59e0b;
    --rose: #fb7185;
    --blue: #60a5fa;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 12%, rgba(16, 185, 129, 0.22), transparent 30%),
        radial-gradient(circle at 82% 8%, rgba(79, 70, 229, 0.22), transparent 26%),
        linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(22px);
    background: rgba(2, 6, 23, 0.86);
    border-bottom: 1px solid var(--line);
}

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

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

.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 14px 30px rgba(20, 184, 166, 0.24);
}

.logo-text {
    font-size: 24px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, #a7f3d0, #5eead4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-links a {
    padding: 10px 14px;
    border-radius: 12px;
    color: #cbd5e1;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ffffff;
    background: rgba(51, 65, 85, 0.58);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.7);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    border-top: 1px solid var(--line);
}

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

.mobile-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.58);
}

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

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

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.35) 100%),
        linear-gradient(0deg, #020617 0%, transparent 36%);
    z-index: 2;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.75s ease, transform 0.9s ease;
}

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

.hero-media {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.48;
}

.hero-content {
    position: relative;
    z-index: 3;
    min-height: 620px;
    display: grid;
    align-items: center;
    padding: 76px 0 92px;
}

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

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 12px;
    border: 1px solid rgba(52, 211, 153, 0.34);
    border-radius: 999px;
    color: #a7f3d0;
    background: rgba(6, 78, 59, 0.25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

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

.hero h2 {
    margin: 16px 0 0;
    font-size: clamp(24px, 3.3vw, 44px);
    line-height: 1.16;
}

.hero-text,
.page-hero p,
.detail-intro {
    max-width: 780px;
    margin: 20px 0 0;
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.85;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(51, 65, 85, 0.78);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    background: rgba(71, 85, 105, 0.9);
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #022c22;
    font-weight: 800;
    box-shadow: 0 18px 38px rgba(20, 184, 166, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6ee7b7, #2dd4bf);
}

.hero-search,
.search-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
    max-width: 720px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-search input,
.search-panel input,
.search-panel select {
    flex: 1 1 220px;
    min-height: 46px;
    border: 0;
    outline: 0;
    border-radius: 12px;
    padding: 0 14px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.78);
}

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

.hero-dot {
    width: 34px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.36);
    cursor: pointer;
}

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

.page-hero {
    padding: 78px 0 52px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 22% 0%, rgba(16, 185, 129, 0.18), transparent 28%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.58), rgba(2, 6, 23, 0));
}

.section {
    padding: 64px 0;
}

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

.section-card {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.48));
    box-shadow: var(--shadow);
}

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

.section-title {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.035em;
}

.section-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.scroller {
    overflow-x: auto;
    padding: 4px 2px 18px;
    scrollbar-width: thin;
}

.scroller-track {
    display: flex;
    gap: 22px;
    min-width: max-content;
}

.scroller-track .movie-card {
    width: 280px;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.8);
}

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

.movie-card:hover .movie-poster img {
    transform: scale(1.055);
    opacity: 0.9;
}

.movie-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: #052e16;
    font-size: 12px;
    font-weight: 800;
    background: linear-gradient(135deg, #fcd34d, #34d399);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.movie-type {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    max-width: calc(100% - 24px);
    padding: 5px 9px;
    border-radius: 999px;
    color: #d1fae5;
    font-size: 12px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(12px);
}

.movie-body {
    padding: 15px;
}

.movie-title {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 800;
}

.movie-title a:hover {
    color: #6ee7b7;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.movie-desc {
    margin: 11px 0 0;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(52, 211, 153, 0.24);
    border-radius: 999px;
    color: #a7f3d0;
    font-size: 12px;
    background: rgba(6, 78, 59, 0.22);
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        radial-gradient(circle at 78% 18%, rgba(52, 211, 153, 0.26), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.58));
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(52, 211, 153, 0.4);
}

.category-tile h2,
.category-tile h3 {
    margin: 0;
    font-size: 24px;
}

.category-tile p {
    color: var(--soft);
    line-height: 1.75;
}

.category-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.filter-bar {
    position: sticky;
    top: 73px;
    z-index: 20;
    padding: 14px;
    margin: 0 0 28px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.84);
    backdrop-filter: blur(18px);
}

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

.chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    min-height: 36px;
    padding: 0 13px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.74);
    cursor: pointer;
}

.chip.is-active,
.chip:hover {
    color: #022c22;
    border-color: rgba(52, 211, 153, 0.8);
    background: linear-gradient(135deg, #6ee7b7, #2dd4bf);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 74px 82px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.68);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
    transform: translateY(-3px);
    border-color: rgba(52, 211, 153, 0.4);
}

.rank-no {
    font-size: 28px;
    font-weight: 900;
    color: #6ee7b7;
    text-align: center;
}

.rank-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.9);
}

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

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

.rank-info p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

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

.breadcrumb a:hover {
    color: #6ee7b7;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-cover-button {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.58));
    cursor: pointer;
}

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

.play-icon {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 32px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #022c22;
    box-shadow: 0 18px 50px rgba(20, 184, 166, 0.34);
}

.player-status {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 5;
    color: #e2e8f0;
    font-size: 14px;
    pointer-events: none;
}

.detail-card,
.sidebar-card {
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 24px;
    background: var(--panel);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.detail-card + .detail-card {
    margin-top: 20px;
}

.detail-card h2,
.sidebar-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.detail-card p {
    color: #cbd5e1;
    line-height: 1.9;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
}

.info-list strong {
    color: #f8fafc;
}

.related-list {
    display: grid;
    gap: 14px;
}

.related-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
}

.related-item img {
    width: 72px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.92);
}

.related-item h3 {
    margin: 0;
    font-size: 15px;
}

.related-item p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.58), rgba(2, 6, 23, 0.96));
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 26px;
    color: var(--muted);
}

.footer-inner h2,
.footer-inner h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

.footer-inner p,
.footer-inner li {
    line-height: 1.8;
}

.footer-inner ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.empty-message {
    display: none;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 24px;
    color: var(--muted);
    text-align: center;
    background: rgba(15, 23, 42, 0.72);
}

.empty-message.is-visible {
    display: block;
}

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

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

    .detail-layout {
        grid-template-columns: 1fr;
    }
}

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

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero,
    .hero-content {
        min-height: 580px;
    }

    .section-card {
        padding: 24px;
    }

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

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

    .rank-row {
        grid-template-columns: 52px 70px 1fr;
    }

    .rank-row .btn {
        grid-column: 2 / 4;
        width: 100%;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .container,
    .header-inner,
    .mobile-nav,
    .footer-inner {
        width: min(100% - 22px, 1180px);
    }

    .logo-text {
        font-size: 20px;
    }

    .hero,
    .hero-content {
        min-height: 620px;
    }

    .hero-search,
    .search-panel {
        border-radius: 16px;
    }

    .hero-search .btn,
    .search-panel .btn {
        width: 100%;
    }

    .section {
        padding: 42px 0;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .movie-body {
        padding: 12px;
    }

    .movie-title {
        font-size: 15px;
    }

    .movie-desc {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .rank-row {
        grid-template-columns: 44px 62px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .rank-no {
        font-size: 21px;
    }

    .play-icon {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}
