:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: #111827;
    --bg-card-2: #1e293b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --line: rgba(148, 163, 184, 0.18);
    --emerald: #34d399;
    --emerald-strong: #10b981;
    --cyan: #22d3ee;
    --amber: #fbbf24;
    --danger: #fb7185;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
    --radius: 22px;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 28rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

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

.header-inner {
    width: min(1440px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: var(--text);
    white-space: nowrap;
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    color: #052e2b;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 0 28px rgba(52, 211, 153, 0.36);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav a {
    color: var(--muted-strong);
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--emerald);
}

.header-search,
.mobile-search,
.large-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.86);
}

.header-search input,
.mobile-search input,
.large-search input,
.filter-bar input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.header-search {
    width: 320px;
}

.header-search input {
    padding: 8px 8px 8px 14px;
}

.header-search button,
.mobile-search button,
.large-search button {
    border: 0;
    border-radius: 999px;
    color: #042f2e;
    cursor: pointer;
    font-weight: 800;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    padding: 8px 16px;
}

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

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--text);
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-panel a {
    display: block;
    padding: 10px 0;
    color: var(--muted-strong);
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.hero {
    position: relative;
    height: 72vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--bg);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: scale(1.04);
    background-size: cover;
    background-position: center;
    transition: opacity 0.7s ease, transform 1.1s ease;
    pointer-events: none;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.38) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.24) 54%, rgba(2, 6, 23, 0.74) 100%);
}

.hero-content {
    position: relative;
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    max-width: 720px;
    padding-top: 48px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--emerald);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 13px;
}

.hero h1 {
    margin: 16px 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.055em;
    max-width: 760px;
}

.hero p {
    max-width: 700px;
    margin: 0;
    color: var(--muted-strong);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

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

.hero-tags {
    margin: 26px 0 30px;
}

.hero-tags span,
.tag-row span,
.category-stats span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    color: var(--muted-strong);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn-primary,
.btn-ghost,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    color: #052e2b;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    padding: 14px 28px;
    box-shadow: 0 18px 38px rgba(16, 185, 129, 0.28);
}

.btn-ghost,
.section-more {
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: rgba(15, 23, 42, 0.72);
    padding: 13px 24px;
}

.btn-primary:hover,
.btn-ghost:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(34, 211, 238, 0.16);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: var(--text);
    background: rgba(0, 0, 0, 0.42);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: var(--emerald);
}

.page-shell {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
}

.top-space {
    padding-top: 44px;
}

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

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

.section-heading h2,
.page-hero-panel h1 {
    margin: 8px 0 0;
    font-size: clamp(28px, 3vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.section-heading p,
.page-hero-panel p,
.category-summary-main p,
.category-card p,
.footer-brand p {
    color: var(--muted);
    line-height: 1.72;
}

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

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

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

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

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card-link:hover {
    border-color: rgba(52, 211, 153, 0.48);
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.34);
    transform: translateY(-5px);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.72));
    transition: opacity 0.25s ease;
}

.movie-card-link:hover .poster-layer {
    opacity: 1;
}

.play-dot,
.big-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #052e2b;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

.play-dot {
    width: 44px;
    height: 44px;
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.36);
}

.rating-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    color: #111827;
    font-size: 12px;
    font-weight: 900;
    border-radius: 999px;
    background: var(--amber);
}

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

.movie-card-body h3 {
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--text);
    font-size: 16px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}

.tag-row {
    margin-top: 12px;
}

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

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

.category-card,
.category-summary-card,
.page-hero-panel,
.detail-text,
.rank-item,
.filter-bar {
    border: 1px solid rgba(148, 163, 184, 0.14);
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(34, 211, 238, 0.06)),
        rgba(15, 23, 42, 0.76);
    box-shadow: var(--shadow);
}

.category-card {
    min-height: 210px;
    padding: 24px;
    border-radius: var(--radius);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card span,
.category-summary-main span {
    color: var(--emerald);
    font-weight: 900;
}

.category-card strong,
.category-summary-main strong {
    display: block;
    margin: 14px 0;
    font-size: 42px;
    line-height: 1;
}

.browse-list {
    display: grid;
    gap: 36px;
}

.browse-row h3 {
    margin: 0 0 18px;
    color: var(--emerald);
    font-size: 22px;
}

.page-hero-panel {
    padding: clamp(28px, 5vw, 54px);
    border-radius: 28px;
}

.page-hero-panel p {
    max-width: 780px;
    margin: 16px 0 0;
    font-size: 17px;
}

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

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

.category-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding: 14px 18px;
    border-radius: 18px;
}

.filter-bar input {
    min-height: 42px;
}

.filter-bar span {
    color: var(--muted);
    white-space: nowrap;
}

.category-summary-card {
    overflow: hidden;
    border-radius: var(--radius);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-summary-main {
    display: block;
    padding: 24px;
}

.category-sample-links {
    display: grid;
    gap: 10px;
    padding: 0 24px 24px;
}

.category-sample-links a {
    overflow: hidden;
    color: var(--muted-strong);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-sample-links a:hover {
    color: var(--emerald);
}

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

.rank-item {
    border-radius: 20px;
    overflow: hidden;
}

.rank-item a {
    display: grid;
    grid-template-columns: 74px 92px 1fr;
    gap: 18px;
    align-items: center;
    padding: 16px;
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    color: #052e2b;
    font-weight: 900;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

.rank-item img {
    width: 92px;
    height: 128px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-item h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.rank-item p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.7;
}

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

.video-player {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
}

.video-player video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: var(--text);
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.big-play {
    width: 74px;
    height: 74px;
    font-size: 28px;
    box-shadow: 0 0 44px rgba(34, 211, 238, 0.38);
}

.detail-info {
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
}

.detail-title-row {
    display: grid;
    grid-template-columns: 116px 1fr;
    gap: 18px;
    align-items: start;
}

.detail-title-row img {
    width: 116px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 16px;
}

.detail-title-row h1 {
    margin: 10px 0 12px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.08;
}

.detail-title-row p {
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.72;
}

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

.detail-meta-grid span {
    padding: 12px;
    color: var(--muted-strong);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.42);
}

.detail-meta-grid b {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
}

.detail-text {
    padding: clamp(24px, 4vw, 42px);
    border-radius: 24px;
}

.detail-text h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.detail-text h2:not(:first-child) {
    margin-top: 30px;
}

.detail-text p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 17px;
    line-height: 1.95;
}

.large-search {
    max-width: 720px;
    margin-top: 24px;
}

.large-search input {
    min-height: 48px;
    padding: 0 14px;
}

.search-status {
    margin-bottom: 20px;
    color: var(--muted-strong);
}

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

.footer-inner {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    padding: 46px 0;
}

.footer-brand p {
    max-width: 520px;
}

.footer-links h2 {
    margin: 0 0 18px;
    font-size: 17px;
}

.footer-links div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.footer-links a {
    color: var(--muted);
    font-size: 14px;
}

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

.is-filter-hidden {
    display: none;
}

@media (max-width: 1180px) {
    .header-search {
        display: none;
    }

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

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

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

@media (max-width: 860px) {
    .header-inner {
        height: 66px;
    }

    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: inline-block;
        margin-left: auto;
    }

    .mobile-panel.is-open {
        display: grid;
        gap: 4px;
    }

    .hero {
        height: 78vh;
        min-height: 620px;
    }

    .hero-content {
        padding-top: 78px;
    }

    .hero-arrow {
        display: none;
    }

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

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

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

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

@media (max-width: 620px) {
    .page-shell,
    .header-inner,
    .mobile-panel,
    .footer-inner,
    .hero-content {
        width: min(100% - 24px, 1440px);
    }

    .hero h1 {
        font-size: 42px;
    }

    .movie-grid,
    .wide-grid,
    .compact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 13px;
    }

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

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

    .rank-item a {
        grid-template-columns: 52px 74px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .rank-number {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .rank-item img {
        width: 74px;
        height: 104px;
    }

    .rank-item h2 {
        font-size: 17px;
    }

    .rank-item p {
        display: none;
    }

    .detail-title-row {
        grid-template-columns: 86px 1fr;
    }

    .detail-title-row img {
        width: 86px;
    }

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

    .filter-bar {
        align-items: stretch;
        flex-direction: column;
    }
}
