:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-850: #111c31;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --gray-100: #f3f4f6;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --teal-300: #5eead4;
    --teal-500: #14b8a6;
    --ring: rgba(16, 185, 129, 0.32);
    --border: rgba(148, 163, 184, 0.18);
    --panel: rgba(30, 41, 59, 0.52);
    --panel-strong: rgba(15, 23, 42, 0.88);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: radial-gradient(circle at 15% 0%, rgba(16, 185, 129, 0.16), transparent 30%),
        linear-gradient(135deg, var(--slate-900), var(--slate-800) 46%, var(--slate-900));
    color: var(--gray-100);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body::-webkit-scrollbar {
    width: 10px;
}

body::-webkit-scrollbar-track {
    background: var(--slate-800);
}

body::-webkit-scrollbar-thumb {
    background: var(--slate-600);
    border-radius: 999px;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.97), rgba(15, 23, 42, 0.82));
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(14px);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--emerald-400), var(--teal-300));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(20, 184, 166, 0.12));
    border: 1px solid rgba(16, 185, 129, 0.36);
    color: var(--emerald-300);
    font-size: 13px;
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.12);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link,
.mobile-link {
    color: var(--gray-300);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--emerald-400);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.68);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    background: var(--gray-300);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 8px 20px 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

.mobile-link {
    padding: 10px 12px;
    border-radius: 12px;
}

.mobile-link:hover,
.mobile-link.active {
    background: rgba(16, 185, 129, 0.08);
}

main {
    padding-top: 64px;
}

.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: var(--slate-900);
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.82) 44%, rgba(15, 23, 42, 0.16)),
        linear-gradient(0deg, rgba(15, 23, 42, 0.42), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1180px;
}

.hero-content > * {
    width: min(650px, 100%);
}

.eyebrow,
.section-kicker {
    color: var(--emerald-400);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero-content h1 {
    margin: 14px 0 18px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p {
    color: var(--gray-300);
    font-size: 20px;
    line-height: 1.72;
}

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

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

.hero-tags span,
.card-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.32);
    color: var(--emerald-300);
}

.hero-tags span,
.detail-tags span {
    padding: 6px 12px;
}

.card-tags span {
    padding: 4px 8px;
    font-size: 12px;
}

.hero-actions,
.section-head,
.card-meta,
.rail-controls,
.filter-bar,
.detail-meta,
.breadcrumb {
    display: flex;
    align-items: center;
}

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

.primary-btn,
.ghost-btn,
.text-link,
.small-round {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--emerald-500), var(--teal-500));
    color: white;
    font-weight: 800;
    border: 0;
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.18);
}

.primary-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 16px 42px rgba(16, 185, 129, 0.32);
}

.primary-btn.compact {
    min-height: 40px;
    padding: 0 18px;
    font-size: 14px;
}

.ghost-btn {
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    color: var(--gray-300);
    background: rgba(15, 23, 42, 0.52);
}

.ghost-btn:hover {
    color: var(--emerald-300);
    border-color: var(--ring);
    background: rgba(15, 23, 42, 0.82);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: white;
    font-size: 32px;
    line-height: 1;
    transform: translateY(-50%);
}

.hero-arrow:hover {
    background: rgba(16, 185, 129, 0.86);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(209, 213, 219, 0.55);
    transition: width 0.2s ease, background 0.2s ease;
}

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

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

.section-shell {
    padding: 72px 0;
}

.bg-soft {
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100vw - 1180px) / 2));
    padding-right: max(16px, calc((100vw - 1180px) / 2));
    background: rgba(30, 41, 59, 0.28);
}

.section-head {
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.section-head h2,
.page-hero h1,
.detail-content h1 {
    margin: 8px 0 0;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.16;
}

.slim-head {
    margin-bottom: 18px;
}

.text-link {
    color: var(--emerald-400);
    font-weight: 700;
}

.text-link:hover {
    color: var(--emerald-300);
}

.movie-grid,
.feature-stage,
.mini-grid {
    display: grid;
    gap: 24px;
}

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

.feature-stage {
    grid-template-columns: repeat(5, minmax(220px, 1fr));
}

.mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 640px;
    overflow: auto;
    padding-right: 6px;
}

.movie-card {
    border-radius: 18px;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(16, 185, 129, 0.52);
    box-shadow: 0 24px 50px rgba(16, 185, 129, 0.1);
}

.poster-wrap {
    position: relative;
    height: 260px;
    overflow: hidden;
    background: #111827;
}

.card-large .poster-wrap {
    height: 320px;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.46), transparent);
}

.card-tags {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
}

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

.movie-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.3;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: var(--emerald-400);
}

.movie-card p,
.category-card p,
.category-overview-card p,
.ranking-card p,
.detail-content p,
.site-footer p {
    color: var(--gray-400);
    line-height: 1.66;
}

.movie-card p {
    min-height: 46px;
    margin: 0 0 14px;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    justify-content: space-between;
    gap: 12px;
    color: var(--gray-500);
    font-size: 13px;
}

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

.category-card,
.category-overview-card,
.rank-panel,
.filter-panel,
.detail-card,
.player-card,
.ranking-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.16);
}

.category-card {
    padding: 24px;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(16, 185, 129, 0.48);
    background: rgba(30, 41, 59, 0.72);
}

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

.category-kicker {
    color: var(--emerald-400);
    font-size: 13px;
    font-weight: 800;
}

.movie-rail {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 2px 0 20px;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

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

.movie-rail .movie-card {
    flex: 0 0 310px;
}

.small-round {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.72);
    color: white;
    font-size: 25px;
}

.small-round:hover {
    background: rgba(16, 185, 129, 0.82);
}

.rail-controls {
    gap: 8px;
}

.split-layout {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: 28px;
}

.rank-panel,
.filter-panel {
    padding: 18px;
}

.rank-row {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px 10px;
    border-radius: 14px;
    color: var(--gray-300);
}

.rank-row:hover {
    background: rgba(16, 185, 129, 0.08);
    color: var(--emerald-300);
}

.rank-index {
    color: var(--emerald-400);
    font-weight: 900;
}

.rank-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-meta {
    color: var(--gray-500);
    font-size: 13px;
}

.search-input,
.select-input {
    width: 100%;
    min-height: 46px;
    border-radius: 14px;
    border: 1px solid var(--border);
    outline: none;
    background: rgba(15, 23, 42, 0.72);
    color: white;
    padding: 0 16px;
}

.search-input:focus,
.select-input:focus {
    border-color: rgba(16, 185, 129, 0.56);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.08);
}

.filter-bar {
    gap: 14px;
    margin-bottom: 28px;
}

.filter-bar .search-input {
    flex: 1 1 360px;
}

.filter-bar .select-input {
    flex: 0 0 190px;
}

.wide-filter .select-input {
    flex-basis: 170px;
}

.page-hero {
    min-height: 330px;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 78% 18%, rgba(16, 185, 129, 0.22), transparent 30%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.58));
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

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

.page-hero p {
    max-width: 760px;
    margin-top: 18px;
}

.category-overview {
    display: grid;
    gap: 24px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 28px;
    align-items: center;
    padding: 24px;
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    height: 190px;
    overflow: hidden;
}

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

.category-overview-card h2 {
    margin: 8px 0 10px;
    font-size: 28px;
}

.category-overview-card p {
    margin-bottom: 20px;
}

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

.ranking-card {
    overflow: hidden;
}

.ranking-card a {
    display: grid;
    grid-template-columns: 78px 110px 1fr;
    gap: 18px;
    align-items: center;
    padding: 16px;
}

.ranking-number {
    font-size: 28px;
    font-weight: 900;
    color: var(--emerald-400);
}

.ranking-card img {
    width: 110px;
    height: 150px;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.detail-shell {
    padding: 28px 0 76px;
}

.breadcrumb {
    flex-wrap: wrap;
    gap: 10px;
    color: var(--gray-400);
    margin-bottom: 22px;
}

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

.player-card {
    padding: 14px;
    margin-bottom: 28px;
}

.player-box {
    position: relative;
    background: black;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 58px rgba(2, 6, 23, 0.42);
}

.player-box video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: black;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12), rgba(2, 6, 23, 0.38));
    color: white;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
    width: 78px;
    height: 78px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--emerald-500), var(--teal-500));
    box-shadow: 0 18px 44px rgba(16, 185, 129, 0.38);
    font-size: 30px;
    padding-left: 4px;
}

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

.detail-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    padding: 28px;
    margin-bottom: 30px;
}

.detail-cover img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 18px;
}

.detail-content h1 {
    margin-top: 0;
}

.detail-meta {
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
    color: var(--gray-400);
}

.detail-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.56);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

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

.lead-text {
    font-size: 18px;
    color: var(--gray-300) !important;
}

.detail-content section {
    margin-top: 26px;
}

.detail-content h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.related-shell {
    width: 100%;
    padding-top: 26px;
    padding-bottom: 0;
}

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

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.92);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
}

.footer-brand {
    color: var(--emerald-400);
    background: none;
    margin-bottom: 14px;
}

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

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

.footer-links a {
    color: var(--gray-400);
}

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    padding: 20px 16px;
    text-align: center;
    color: var(--gray-500);
}

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

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

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

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

    .detail-cover img {
        height: 360px;
    }
}

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

    .menu-toggle {
        display: inline-flex;
    }

    .hero-slider {
        height: 560px;
    }

    .hero-content p,
    .page-hero p {
        font-size: 17px;
    }

    .hero-arrow {
        display: none;
    }

    .section-head,
    .filter-bar,
    .detail-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid,
    .feature-stage,
    .mini-grid,
    .category-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .poster-wrap,
    .card-large .poster-wrap {
        height: 300px;
    }

    .ranking-card a {
        grid-template-columns: 48px 88px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .ranking-card img {
        width: 88px;
        height: 120px;
    }

    .ranking-number {
        font-size: 20px;
    }

    .category-cover-stack {
        height: 150px;
    }

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