:root {
    color-scheme: dark;
    --bg: #030712;
    --panel: #0b1120;
    --panel-soft: rgba(17, 24, 39, 0.78);
    --panel-strong: #111827;
    --line: #1f2937;
    --text: #f3f4f6;
    --muted: #9ca3af;
    --muted-strong: #d1d5db;
    --emerald: #10b981;
    --emerald-soft: rgba(16, 185, 129, 0.16);
    --teal: #14b8a6;
    --cyan: #22d3ee;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius: 18px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.17), transparent 30rem),
        radial-gradient(circle at 85% 10%, rgba(20, 184, 166, 0.12), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.is-nav-open {
    overflow: hidden;
}

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;
    border-bottom: 1px solid rgba(31, 41, 55, 0.86);
    background: rgba(3, 7, 18, 0.92);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    color: #001b16;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.28);
}

.brand-text {
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #34d399, #2dd4bf);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.nav-links a {
    padding: 10px 13px;
    border-radius: 999px;
    color: #d1d5db;
    font-size: 0.95rem;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: #ecfdf5;
    background: var(--emerald-soft);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(17, 24, 39, 0.72);
    color: var(--text);
    cursor: pointer;
}

.page-main {
    min-height: calc(100vh - 68px);
}

.hero {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    background: #030712;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.65s ease, visibility 0.65s ease;
}

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

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.56;
    transform: scale(1.04);
}

.hero-slide.is-active .hero-image {
    animation: slowZoom 9s ease forwards;
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3, 7, 18, 0.97) 0%, rgba(3, 7, 18, 0.86) 42%, rgba(3, 7, 18, 0.18) 100%),
        linear-gradient(0deg, rgba(3, 7, 18, 0.96) 0%, rgba(3, 7, 18, 0.18) 44%, rgba(3, 7, 18, 0.45) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 38px;
    align-items: center;
    padding: 86px 0 72px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 18px;
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.11);
    color: #a7f3d0;
    font-size: 0.9rem;
}

.hero h1,
.page-hero h1,
.detail-title {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 4.7rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
    font-weight: 900;
}

.gradient-text {
    background: linear-gradient(90deg, #34d399, #2dd4bf, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-summary {
    max-width: 680px;
    margin: 20px 0 0;
    color: #d1d5db;
    font-size: clamp(1rem, 2vw, 1.22rem);
}

.hero-meta,
.card-meta,
.detail-meta,
.rank-meta,
.breadcrumbs,
.category-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.hero-meta {
    margin: 22px 0 0;
}

.pill,
.tag,
.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid rgba(75, 85, 99, 0.82);
    background: rgba(17, 24, 39, 0.72);
    color: #d1d5db;
    font-size: 0.86rem;
}

.tag {
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.tag:hover {
    border-color: rgba(16, 185, 129, 0.62);
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.1);
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 45px;
    padding: 0 18px;
    border-radius: 13px;
    border: 1px solid transparent;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    color: #022c22;
    box-shadow: 0 18px 38px rgba(16, 185, 129, 0.26);
}

.btn-ghost {
    border-color: rgba(75, 85, 99, 0.78);
    background: rgba(17, 24, 39, 0.66);
    color: #ecfdf5;
}

.btn-ghost:hover {
    border-color: rgba(16, 185, 129, 0.65);
    background: rgba(16, 185, 129, 0.1);
}

.hero-poster-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(45, 212, 191, 0.28);
    border-radius: 28px;
    background: rgba(17, 24, 39, 0.6);
    box-shadow: var(--shadow);
}

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

.hero-poster-info {
    position: absolute;
    inset: auto 16px 16px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(3, 7, 18, 0.72);
    backdrop-filter: blur(14px);
}

.hero-poster-info strong {
    display: block;
    margin-bottom: 4px;
}

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

.hero-dot {
    width: 38px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

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

.section,
.page-hero,
.detail-wrap {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}

.section {
    padding: 66px 0;
}

.section-soft {
    background: rgba(17, 24, 39, 0.32);
    border-block: 1px solid rgba(31, 41, 55, 0.6);
}

.section-header,
.page-hero-content {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.section-title,
.page-hero h1,
.detail-content h2 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    line-height: 1.18;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-subtitle,
.page-desc {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
}

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

.card-grid.featured-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

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

.movie-card,
.category-card,
.year-card,
.rank-row,
.related-card,
.info-panel,
.content-panel {
    border: 1px solid rgba(31, 41, 55, 0.94);
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.9), rgba(3, 7, 18, 0.8));
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
}

.movie-card,
.category-card,
.year-card {
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover,
.category-card:hover,
.year-card:hover,
.rank-row:hover,
.related-card:hover {
    border-color: rgba(16, 185, 129, 0.64);
    transform: translateY(-4px);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

.poster {
    position: relative;
    overflow: hidden;
    background: #111827;
}

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

.movie-card:hover .poster img,
.category-card:hover .poster img,
.year-card:hover .poster img,
.related-card:hover img,
.rank-row:hover img {
    transform: scale(1.08);
}

.poster-tall {
    aspect-ratio: 2 / 3;
}

.poster-wide {
    aspect-ratio: 16 / 9;
}

.poster-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(3, 7, 18, 0.94));
}

.card-body {
    padding: 14px;
}

.featured-card .card-body {
    position: absolute;
    inset: auto 0 0;
    padding: 20px;
    background: linear-gradient(0deg, rgba(3, 7, 18, 0.94), transparent);
}

.movie-title,
.category-card h3,
.year-card h3,
.rank-title,
.related-title {
    margin: 0;
    font-weight: 850;
    line-height: 1.36;
}

.movie-title {
    font-size: 1rem;
}

.featured-card .movie-title {
    font-size: 1.28rem;
}

.movie-desc,
.category-card p,
.year-card p,
.rank-desc,
.related-meta {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-1 {
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    -webkit-line-clamp: 3;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 170px 170px 170px;
    gap: 12px;
    margin: 0 0 28px;
    padding: 16px;
    border: 1px solid rgba(31, 41, 55, 0.92);
    border-radius: 20px;
    background: rgba(17, 24, 39, 0.58);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    border-radius: 13px;
    outline: 0;
    background: rgba(3, 7, 18, 0.76);
    color: var(--text);
    padding: 0 13px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(16, 185, 129, 0.8);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.page-hero {
    padding: 58px 0 28px;
}

.page-hero-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(31, 41, 55, 0.88);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(45, 212, 191, 0.18), transparent 24rem),
        linear-gradient(135deg, rgba(17, 24, 39, 0.92), rgba(3, 7, 18, 0.86));
    padding: clamp(28px, 5vw, 48px);
    box-shadow: var(--shadow);
}

.category-card {
    min-height: 210px;
    padding: 22px;
}

.category-card .category-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 18px;
    border-radius: 16px;
    background: var(--emerald-soft);
    color: #a7f3d0;
    font-weight: 900;
}

.category-card strong {
    display: block;
    margin-top: 16px;
    color: #a7f3d0;
    font-size: 0.94rem;
}

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

.year-card {
    padding: 18px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 96px minmax(0, 1fr) 90px;
    align-items: center;
    gap: 16px;
    border-radius: 18px;
    padding: 12px;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(16, 185, 129, 0.12);
    color: #a7f3d0;
    font-weight: 900;
}

.rank-row img {
    width: 96px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-score {
    justify-self: end;
    color: #a7f3d0;
    font-weight: 900;
}

.detail-wrap {
    padding: 32px 0 70px;
}

.breadcrumbs {
    margin-bottom: 22px;
    font-size: 0.95rem;
}

.breadcrumbs a {
    color: #a7f3d0;
}

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

.video-player {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(31, 41, 55, 0.9);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
}

.video-player video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
}

.video-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    background: linear-gradient(0deg, rgba(3, 7, 18, 0.7), rgba(3, 7, 18, 0.28));
    color: #ecfdf5;
    cursor: pointer;
}

.video-start.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.play-badge {
    display: inline-grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    color: #022c22;
    font-size: 2rem;
    box-shadow: 0 20px 55px rgba(16, 185, 129, 0.36);
}

.play-label {
    display: block;
    font-size: 1.08rem;
    font-weight: 900;
}

.player-message,
.player-loading {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(3, 7, 18, 0.84);
    color: #fecaca;
    font-weight: 800;
}

.player-loading {
    color: #a7f3d0;
}

.player-loading[hidden],
.player-message[hidden] {
    display: none;
}

.detail-content {
    margin-top: 24px;
}

.detail-title {
    font-size: clamp(2rem, 4vw, 3.25rem);
}

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

.content-panel,
.info-panel {
    border-radius: 22px;
    padding: 22px;
    margin-top: 18px;
}

.content-panel h2,
.info-panel h2 {
    font-size: 1.18rem;
    color: #a7f3d0;
}

.content-panel p,
.info-panel p,
.info-list {
    color: #d1d5db;
}

.quote-panel {
    border-left: 4px solid var(--emerald);
}

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

.info-list div {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 10px;
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
}

.related-list {
    display: grid;
    gap: 13px;
    margin-top: 16px;
}

.related-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    padding: 11px;
    border-radius: 16px;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.related-card img {
    width: 96px;
    height: 64px;
    border-radius: 11px;
    object-fit: cover;
}

.site-footer {
    border-top: 1px solid rgba(31, 41, 55, 0.9);
    background: rgba(3, 7, 18, 0.86);
    margin-top: 54px;
}

.footer-shell {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 30px;
}

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

.footer-shell p,
.footer-shell a,
.footer-copy {
    color: var(--muted);
    font-size: 0.94rem;
}

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

.footer-copy {
    border-top: 1px solid rgba(31, 41, 55, 0.7);
    padding-top: 18px;
    grid-column: 1 / -1;
}

@keyframes slowZoom {
    from {
        transform: scale(1.04);
    }

    to {
        transform: scale(1.11);
    }
}

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

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

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

    .hero-poster-card {
        display: none;
    }

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

@media (max-width: 760px) {
    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .nav-links {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 78px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(3, 7, 18, 0.96);
        box-shadow: var(--shadow);
    }

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

    .nav-links a {
        border-radius: 12px;
    }

    .hero {
        min-height: 620px;
    }

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

    .section-header,
    .page-hero-content {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .rank-row {
        grid-template-columns: 42px 82px minmax(0, 1fr);
    }

    .rank-row img {
        width: 82px;
        height: 56px;
    }

    .rank-score {
        grid-column: 3;
        justify-self: start;
    }

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

    .footer-copy {
        grid-column: auto;
    }
}

@media (max-width: 480px) {
    .brand-text {
        font-size: 1rem;
    }

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

    .hero-actions,
    .section-actions,
    .detail-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
