:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: rgba(15, 23, 42, 0.72);
    --panel: rgba(30, 41, 59, 0.64);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --emerald: #10b981;
    --emerald-dark: #059669;
    --teal: #14b8a6;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.14), transparent 34rem),
        radial-gradient(circle at top right, rgba(20, 184, 166, 0.12), transparent 28rem),
        linear-gradient(135deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

main {
    padding-top: 64px;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.97), rgba(15, 23, 42, 0.82));
    backdrop-filter: blur(18px);
}

.site-nav {
    max-width: 1280px;
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #34d399, #5eead4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-logo {
    font-size: 21px;
}

.logo-mark {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #052e26;
    background: linear-gradient(135deg, #34d399, #2dd4bf);
    box-shadow: 0 0 36px rgba(16, 185, 129, 0.42);
    font-size: 14px;
}

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

.nav-links a {
    transition: color 180ms ease, transform 180ms ease;
}

.nav-links a:hover {
    color: #34d399;
    transform: translateY(-1px);
}

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

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: #d1d5db;
}

.hero-slider {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: #020617;
}

.hero-stage {
    position: relative;
    min-height: 640px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 700ms ease, visibility 700ms ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-bg,
.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg {
    position: absolute;
    inset: 0;
    transform: scale(1.03);
}

.hero-slide.is-active .hero-bg {
    animation: slowZoom 8s ease forwards;
}

@keyframes slowZoom {
    from {
        transform: scale(1.03);
    }
    to {
        transform: scale(1.1);
    }
}

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

.hero-inner {
    position: relative;
    z-index: 2;
    min-height: 640px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 24px 56px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.52fr);
    gap: 48px;
    align-items: center;
}

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

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #34d399;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-kicker::before,
.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #34d399;
    box-shadow: 0 0 18px rgba(52, 211, 153, 0.8);
}

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

.hero-copy p,
.page-hero p,
.detail-copy .lead {
    color: #d1d5db;
    font-size: clamp(17px, 1.8vw, 22px);
    line-height: 1.8;
}

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

.hero-tags {
    margin: 28px 0;
}

.hero-tags span,
.card-tag-row span,
.detail-meta span {
    padding: 7px 12px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 999px;
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.14);
    font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.primary-btn {
    color: white;
    background: linear-gradient(90deg, #10b981, #14b8a6);
    box-shadow: 0 16px 38px rgba(16, 185, 129, 0.28);
}

.ghost-btn,
.section-link {
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #e5e7eb;
    background: rgba(15, 23, 42, 0.5);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 45px rgba(16, 185, 129, 0.2);
}

.hero-search {
    display: flex;
    max-width: 560px;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 0;
    outline: 0;
    color: #f8fafc;
    background: transparent;
}

.hero-search input {
    padding: 0 18px;
}

.hero-search button {
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    padding: 13px 22px;
    color: white;
    background: #10b981;
    font-weight: 700;
}

.hero-poster {
    justify-self: end;
    width: min(360px, 100%);
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
    transition: transform 280ms ease;
}

.hero-poster:hover {
    transform: rotate(0deg) translateY(-6px);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: white;
    background: rgba(15, 23, 42, 0.82);
    font-size: 34px;
    line-height: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.hero-arrow.prev {
    left: 22px;
}

.hero-arrow.next {
    right: 22px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: #64748b;
    transition: width 180ms ease, background 180ms ease;
}

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

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 70px 24px;
}

.content-section + .content-section {
    padding-top: 38px;
}

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

.section-heading h2 {
    margin: 10px 0 8px;
    font-size: clamp(30px, 4vw, 42px);
    letter-spacing: -0.03em;
}

.section-heading p {
    max-width: 740px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.52);
    box-shadow: 0 16px 44px rgba(2, 6, 23, 0.18);
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 26px 60px rgba(16, 185, 129, 0.12);
}

.card-cover {
    position: relative;
    display: block;
    height: 270px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.85);
}

.movie-card.large .card-cover {
    height: 340px;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 520ms ease;
}

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

.cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.35), transparent);
}

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

.card-tag-row span {
    padding: 5px 9px;
    font-size: 12px;
}

.rank-mark {
    position: absolute;
    left: 14px;
    top: 14px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #052e26;
    background: linear-gradient(135deg, #facc15, #34d399);
    font-size: 18px;
    box-shadow: 0 14px 28px rgba(2, 6, 23, 0.35);
}

.card-body {
    padding: 18px;
}

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

.card-body h3 a {
    transition: color 180ms ease;
}

.card-body h3 a:hover {
    color: #34d399;
}

.card-body p {
    min-height: 48px;
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #94a3b8;
    font-size: 12px;
}

.category-section,
.featured-section {
    max-width: none;
    background: rgba(15, 23, 42, 0.28);
}

.category-section > *,
.featured-section > * {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

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

.category-tile,
.category-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.54);
    box-shadow: 0 16px 44px rgba(2, 6, 23, 0.18);
}

.category-tile {
    padding: 22px;
}

.category-tile > a span {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 800;
}

.category-tile p,
.category-card p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.7;
}

.category-tile div,
.category-links,
.footer-links {
    display: grid;
    gap: 8px;
}

.category-tile div a,
.category-links a,
.footer-links a {
    color: #cbd5e1;
    transition: color 180ms ease;
}

.category-tile div a:hover,
.category-links a:hover,
.footer-links a:hover {
    color: #34d399;
}

.movie-rail {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 14px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

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

.rail-card {
    flex: 0 0 320px;
    scroll-snap-align: start;
}

.rail-actions {
    display: flex;
    gap: 10px;
}

.rail-actions button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    color: white;
    background: rgba(51, 65, 85, 0.75);
    font-size: 26px;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
    gap: 30px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.45);
    transition: transform 180ms ease, border-color 180ms ease;
}

.rank-item:hover {
    transform: translateX(5px);
    border-color: rgba(16, 185, 129, 0.5);
}

.rank-item span {
    grid-row: span 2;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #052e26;
    background: linear-gradient(135deg, #34d399, #facc15);
    font-weight: 900;
}

.rank-item strong {
    font-size: 16px;
}

.rank-item em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.spotlight-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
}

.spotlight-grid .movie-card:first-child {
    grid-row: span 2;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
}

.page-hero.compact {
    max-width: 1280px;
    margin: 0 auto;
    padding: 90px 24px 44px;
}

.page-hero.compact > div {
    max-width: 840px;
}

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

.category-card {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 22px;
    padding: 18px;
}

.category-art {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    overflow: hidden;
    border-radius: 16px;
}

.category-art img {
    width: 100%;
    height: 112px;
    object-fit: cover;
}

.category-card h2 {
    margin: 4px 0 10px;
    font-size: 24px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 14px;
    margin-bottom: 30px;
}

.filter-panel.wide {
    grid-template-columns: minmax(260px, 1fr) 220px 220px;
}

.filter-panel input,
.filter-panel select {
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.68);
}

.filter-panel select option {
    background: #0f172a;
}

.empty-state {
    padding: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
    background: rgba(30, 41, 59, 0.42);
}

.detail-hero {
    min-height: 620px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop span {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.92)),
        linear-gradient(0deg, rgba(15, 23, 42, 1), transparent 48%);
}

.detail-grid {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 620px;
    margin: 0 auto;
    padding: 70px 24px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 52px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

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

.player-section {
    max-width: 1160px;
    margin: -80px auto 0;
    padding: 0 24px 44px;
    position: relative;
    z-index: 3;
}

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

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

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.58));
    transition: opacity 180ms ease, visibility 180ms ease;
}

.play-layer span {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    border-radius: 999px;
    color: #052e26;
    background: linear-gradient(135deg, #34d399, #2dd4bf);
    font-size: 38px;
    box-shadow: 0 0 48px rgba(16, 185, 129, 0.5);
}

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

.detail-content {
    display: grid;
    grid-template-columns: 1fr 0.86fr;
    gap: 24px;
    padding-top: 26px;
}

.story-block {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.52);
}

.story-block h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.story-block p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.9;
}

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

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 24px 32px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr;
    gap: 48px;
}

.footer-logo {
    margin-bottom: 14px;
    font-size: 22px;
}

.site-footer p {
    color: var(--muted);
    line-height: 1.75;
}

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

.copyright {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 14px;
}

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

    .hero-inner,
    .split-layout,
    .detail-grid,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

    .detail-grid {
        gap: 30px;
    }

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

@media (max-width: 860px) {
    main {
        padding-top: 62px;
    }

    .site-nav {
        padding: 0 16px;
    }

    .mobile-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        display: none;
        grid-template-columns: 1fr;
        gap: 0;
        padding: 12px 20px 22px;
        border-bottom: 1px solid var(--line);
        background: rgba(15, 23, 42, 0.98);
    }

    .nav-links.is-open {
        display: grid;
    }

    .nav-links a {
        padding: 12px 0;
    }

    .hero-slider,
    .hero-stage,
    .hero-inner {
        min-height: 620px;
    }

    .hero-inner {
        padding-top: 46px;
        padding-bottom: 70px;
    }

    .hero-arrow {
        top: auto;
        bottom: 22px;
    }

    .hero-arrow.prev {
        left: 22px;
    }

    .hero-arrow.next {
        right: 22px;
    }

    .movie-grid,
    .category-grid,
    .category-overview,
    .spotlight-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .filter-panel,
    .filter-panel.wide {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .site-logo {
        font-size: 18px;
    }

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

    .hero-search {
        border-radius: 18px;
        flex-direction: column;
        gap: 8px;
    }

    .hero-search input {
        min-height: 46px;
    }

    .movie-grid,
    .category-grid,
    .category-overview,
    .spotlight-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .content-section,
    .page-hero.compact,
    .detail-grid {
        padding-left: 16px;
        padding-right: 16px;
    }

    .player-section {
        margin-top: -42px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .play-layer span {
        width: 72px;
        height: 72px;
        font-size: 30px;
    }
}
