:root {
    color-scheme: dark;
    --bg: #0a0a0a;
    --panel: #171717;
    --panel-soft: #1f1f1f;
    --line: #2a2a2a;
    --muted: #a3a3a3;
    --text: #f7f7f7;
    --amber: #f59e0b;
    --amber-soft: rgba(245, 158, 11, 0.14);
    --shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.08), transparent 32%), var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 50;
    background: rgba(23, 23, 23, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1240px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: var(--amber);
    color: #111;
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.22);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong,
.footer-brand {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.brand-text small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link {
    padding: 10px 16px;
    border-radius: 12px;
    color: #d4d4d4;
    font-size: 14px;
    font-weight: 650;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    background: var(--amber);
    color: #111;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    background: #262626;
    color: #fff;
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    padding: 10px 20px 18px;
    border-top: 1px solid var(--line);
}

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

main {
    min-height: 80vh;
}

.hero-carousel {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #050505;
}

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

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s 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(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.72) 42%, rgba(0, 0, 0, 0.16) 100%), linear-gradient(0deg, #0a0a0a 0%, transparent 35%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    margin: 0 auto;
    padding: 180px 24px 120px;
}

.hero-content h1 {
    max-width: 760px;
    margin: 18px 0 18px;
    font-size: clamp(38px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 660px;
    margin: 0;
    color: #d4d4d4;
    font-size: 18px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    border: 1px solid rgba(245, 158, 11, 0.36);
    border-radius: 999px;
    background: var(--amber-soft);
    color: #fbbf24;
    font-size: 12px;
    font-weight: 700;
}

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

.tag-row {
    position: absolute;
    top: 12px;
    left: 12px;
}

.tag-row span {
    padding: 4px 8px;
    background: rgba(23, 23, 23, 0.88);
}

.hero-meta,
.detail-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
}

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

.hero-meta span,
.detail-meta span,
.movie-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #e5e5e5;
}

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

.movie-meta span {
    padding: 4px 8px;
    font-size: 12px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.25s ease, background 0.25s ease, border 0.25s ease;
}

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

.btn-primary {
    background: var(--amber);
    color: #111;
}

.btn-secondary,
.btn-ghost {
    border: 1px solid var(--line);
    background: rgba(38, 38, 38, 0.78);
    color: #fff;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.48);
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

.hero-dot.is-active {
    background: var(--amber);
}

.site-intro,
.content-section,
.detail-layout,
.breadcrumb,
.footer-grid,
.footer-bottom,
.page-hero,
.detail-hero {
    max-width: 1240px;
    margin-right: auto;
    margin-left: auto;
    padding-right: 24px;
    padding-left: 24px;
}

.site-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 44px;
    padding-bottom: 12px;
}

.site-intro h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-article h2,
.detail-side h2 {
    margin: 0;
    color: #fff;
}

.site-intro h2,
.section-heading h2 {
    font-size: clamp(24px, 3vw, 36px);
}

.site-intro p,
.section-heading p,
.page-hero p,
.overview-card p,
.detail-one-line,
.detail-article p,
.detail-side dd,
.site-footer p {
    color: var(--muted);
}

.content-section {
    padding-top: 48px;
    padding-bottom: 16px;
}

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

.section-heading p {
    margin: 8px 0 0;
}

.section-heading a {
    color: var(--amber);
    font-weight: 800;
    white-space: nowrap;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 200px 200px;
    gap: 14px;
    margin-bottom: 26px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(23, 23, 23, 0.82);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #d4d4d4;
    font-size: 13px;
    font-weight: 700;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 46px;
    border: 1px solid #363636;
    border-radius: 12px;
    outline: 0;
    background: #0f0f0f;
    color: #fff;
    padding: 0 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--amber);
}

.empty-state {
    padding: 18px;
    border: 1px dashed #3a3a3a;
    border-radius: 14px;
    color: var(--muted);
    text-align: center;
}

.category-grid,
.movie-grid,
.overview-grid,
.rank-hero-list {
    display: grid;
    gap: 22px;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #111;
    box-shadow: var(--shadow);
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
    opacity: 0.58;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.category-tile:hover img {
    opacity: 0.78;
    transform: scale(1.08);
}

.category-tile span,
.category-tile small {
    position: absolute;
    left: 18px;
    right: 18px;
    z-index: 2;
}

.category-tile span {
    bottom: 56px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile small {
    bottom: 18px;
    color: #d4d4d4;
}

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

.feature-grid {
    grid-auto-flow: dense;
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.22);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    border-color: var(--amber);
    box-shadow: 0 24px 45px rgba(245, 158, 11, 0.1);
    transform: translateY(-6px);
}

.feature-card {
    grid-column: span 2;
    grid-row: span 2;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f0f0f;
}

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

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

.poster-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 56%);
    opacity: 0.85;
}

.movie-type,
.rank-badge {
    position: absolute;
    right: 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
}

.movie-type {
    bottom: 12px;
    padding: 5px 8px;
    background: rgba(0, 0, 0, 0.74);
}

.rank-badge {
    top: 12px;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    background: var(--amber);
    color: #111;
}

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

.movie-card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card-body h3 a:hover {
    color: var(--amber);
}

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

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

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

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

.page-main,
.detail-main {
    padding-top: 92px;
}

.page-hero {
    display: grid;
    gap: 24px;
    padding-top: 46px;
    padding-bottom: 28px;
}

.compact-hero {
    min-height: 260px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    background: radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.16), transparent 26%);
}

.page-hero h1 {
    max-width: 820px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.02;
}

.page-hero p {
    max-width: 760px;
    font-size: 17px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--amber) !important;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

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

.overview-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.overview-poster {
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 16 / 11;
}

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

.overview-card h2 {
    margin: 0 0 8px;
}

.overview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.overview-links a {
    padding: 5px 9px;
    border-radius: 999px;
    background: #262626;
    color: #e5e5e5;
    font-size: 12px;
}

.rank-hero {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
    align-items: center;
}

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

.rank-hero-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 4 / 5;
    background: #111;
}

.rank-hero-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.75;
}

.rank-hero-item span {
    position: absolute;
    right: 10px;
    bottom: 10px;
    left: 10px;
    font-weight: 800;
    text-shadow: 0 2px 16px #000;
}

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

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

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding-top: 24px;
    padding-bottom: 38px;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #111;
    box-shadow: var(--shadow);
    aspect-ratio: 3 / 4;
}

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

.detail-info h1 {
    font-size: clamp(36px, 6vw, 70px);
    line-height: 1;
}

.detail-one-line {
    max-width: 760px;
    font-size: 18px;
}

.detail-meta,
.detail-tags {
    margin-top: 18px;
}

.player-section {
    scroll-margin-top: 90px;
}

.movie-player {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-video {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    gap: 12px;
    place-content: center;
    border: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.35));
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: opacity 0.25s ease;
}

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

.play-circle {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    margin: 0 auto;
    border-radius: 999px;
    background: var(--amber);
    color: #111;
    font-size: 30px;
    box-shadow: 0 18px 36px rgba(245, 158, 11, 0.26);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    padding-top: 34px;
}

.detail-article,
.detail-side {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(23, 23, 23, 0.82);
    padding: 24px;
}

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

.detail-article p {
    font-size: 16px;
}

.detail-side dl {
    display: grid;
    gap: 12px;
    margin: 18px 0 0;
}

.detail-side dt {
    color: #fff;
    font-weight: 900;
}

.detail-side dd {
    margin: -8px 0 8px;
}

.site-footer {
    margin-top: 76px;
    border-top: 1px solid var(--line);
    background: #101010;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 34px;
    padding-top: 34px;
    padding-bottom: 28px;
}

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

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: var(--muted);
}

.site-footer a:hover {
    color: var(--amber);
}

.footer-bottom {
    padding-top: 18px;
    padding-bottom: 22px;
    border-top: 1px solid var(--line);
    color: #737373;
    text-align: center;
}

[hidden],
.movie-card.is-hidden {
    display: none !important;
}

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

    .overview-grid,
    .rank-hero,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-hero {
        grid-template-columns: 260px minmax(0, 1fr);
    }
}

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

    .menu-toggle {
        display: flex;
    }

    .nav-shell {
        height: 64px;
        padding: 0 16px;
    }

    .brand-text strong {
        font-size: 18px;
    }

    .brand-text small {
        display: none;
    }

    .hero-carousel {
        min-height: 78vh;
    }

    .hero-content {
        padding: 132px 18px 94px;
    }

    .hero-control {
        display: none;
    }

    .site-intro,
    .section-heading,
    .detail-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .site-intro,
    .section-heading {
        display: grid;
    }

    .filter-panel,
    .category-grid,
    .movie-grid,
    .overview-card,
    .detail-hero,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        grid-column: span 1;
        grid-row: span 1;
    }

    .detail-cover {
        max-width: 280px;
    }

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

    .content-section,
    .site-intro,
    .page-hero,
    .detail-hero,
    .detail-layout,
    .breadcrumb,
    .footer-grid,
    .footer-bottom {
        padding-right: 16px;
        padding-left: 16px;
    }
}

@media (max-width: 520px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }

    .rail-card {
        flex-basis: 82vw;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        letter-spacing: -0.02em;
    }
}
