:root {
    color-scheme: dark;
    --bg: #0c0a09;
    --bg-soft: #1c1917;
    --bg-panel: #292524;
    --line: rgba(214, 211, 209, 0.12);
    --text: #f5f5f4;
    --muted: #a8a29e;
    --amber: #f59e0b;
    --amber-soft: rgba(245, 158, 11, 0.18);
    --orange: #f97316;
    --red: #ef4444;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
    --radius: 22px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 32rem),
        radial-gradient(circle at bottom right, rgba(239, 68, 68, 0.1), transparent 36rem),
        var(--bg);
    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(28, 25, 23, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: #111827;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.32);
}

.brand-text,
.footer-brand {
    font-size: 22px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 15px;
}

.nav-link,
.mobile-link {
    color: #d6d3d1;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover {
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(68, 64, 60, 0.65);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-nav.open {
    display: grid;
}

.mobile-link {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(41, 37, 36, 0.76);
}

main {
    overflow: hidden;
}

.hero {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 30px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(310px, 0.8fr);
    gap: 22px;
}

.hero-stage {
    position: relative;
    min-height: 620px;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    background: var(--bg-panel);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.2s ease;
    pointer-events: none;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(12, 10, 9, 0.95), rgba(12, 10, 9, 0.72) 42%, rgba(12, 10, 9, 0.2)),
        linear-gradient(0deg, rgba(12, 10, 9, 0.9), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(680px, 88%);
    height: 100%;
    padding: 72px 54px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-kicker,
.section-label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.hero h1 {
    margin: 22px 0 12px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.02;
    letter-spacing: -0.08em;
}

.hero h2 {
    margin: 0 0 16px;
    font-size: clamp(24px, 3.2vw, 42px);
    color: #fde68a;
}

.hero p,
.page-hero p,
.footer-about p,
.category-card p,
.content-card p {
    color: #d6d3d1;
    line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(68, 64, 60, 0.72);
    color: #e7e5e4;
    font-size: 12px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 0 20px;
    font-weight: 850;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: #111827;
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.28);
}

.btn.ghost {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.btn.small {
    min-height: 38px;
    padding: 0 16px;
    font-size: 14px;
}

.hero-dots {
    position: absolute;
    left: 54px;
    bottom: 34px;
    z-index: 4;
    display: flex;
    gap: 8px;
}

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

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

.hero-panel {
    display: grid;
    gap: 22px;
}

.search-card,
.hero-rail,
.ranking-card,
.content-card,
.category-card {
    border: 1px solid var(--line);
    background: rgba(28, 25, 23, 0.82);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.search-card {
    padding: 28px;
}

.search-card h2,
.section-heading h2,
.ranking-card h2,
.content-card h2 {
    margin: 12px 0 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.04em;
}

.search-box {
    position: relative;
    margin-top: 22px;
}

.search-box input {
    width: 100%;
    height: 54px;
    border: 1px solid var(--line);
    outline: none;
    border-radius: 18px;
    background: rgba(12, 10, 9, 0.65);
    color: var(--text);
    padding: 0 18px;
}

.search-box input:focus {
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.13);
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.quick-links a {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #d6d3d1;
    background: rgba(68, 64, 60, 0.35);
}

.hero-rail {
    padding: 22px;
}

.hero-rail strong {
    display: block;
    margin-bottom: 14px;
    color: #fde68a;
}

.hero-rail-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-rail-card:hover {
    background: rgba(68, 64, 60, 0.6);
    transform: translateX(4px);
}

.hero-rail-card img {
    width: 72px;
    height: 50px;
    object-fit: cover;
    border-radius: 12px;
}

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

.page-hero {
    min-height: 280px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 28px;
    align-items: center;
    padding: 44px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.18), transparent 38%),
        linear-gradient(315deg, rgba(239, 68, 68, 0.12), transparent 42%),
        rgba(28, 25, 23, 0.78);
    box-shadow: var(--shadow);
}

.page-hero.slim {
    min-height: 230px;
}

.page-hero h1,
.detail-copy h1 {
    margin: 14px 0;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.06;
    letter-spacing: -0.07em;
}

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

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

.section-heading {
    margin-bottom: 28px;
}

.section-heading.split {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.section-more {
    color: var(--amber);
    font-weight: 800;
}

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

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

.category-chip,
.category-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(41, 37, 36, 0.98), rgba(28, 25, 23, 0.82));
    border-radius: 18px;
    padding: 18px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-chip:hover,
.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.45);
}

.category-chip span,
.category-card-title {
    display: block;
    font-size: 18px;
    font-weight: 900;
    color: #fde68a;
}

.category-chip small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.6;
}

.category-card {
    padding: 26px;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.category-samples a {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(68, 64, 60, 0.54);
    color: #e7e5e4;
    font-size: 13px;
}

.section-panel {
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(28, 25, 23, 0.76);
    box-shadow: var(--shadow);
}

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

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(28, 25, 23, 0.9);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #292524, #0c0a09);
}

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

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

.quality-badge,
.year-badge {
    position: absolute;
    top: 10px;
    z-index: 2;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

.quality-badge {
    left: 10px;
    color: #111827;
    background: var(--amber);
}

.year-badge {
    right: 10px;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    background: rgba(245, 158, 11, 0.92);
    color: #111827;
    font-weight: 900;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.movie-card-body {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 14px;
}

.movie-card-body strong {
    font-size: 16px;
    line-height: 1.35;
}

.movie-card-body em {
    min-height: 42px;
    color: var(--muted);
    line-height: 1.55;
    font-size: 13px;
    font-style: normal;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #d6d3d1;
    font-size: 12px;
}

.tag-row span {
    padding: 4px 7px;
    font-size: 11px;
}

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

.ranking-layout {
    grid-template-columns: 360px minmax(0, 1fr);
}

.ranking-card {
    padding: 26px;
    position: sticky;
    top: 92px;
}

.ranking-card.tall {
    max-height: calc(100vh - 120px);
    overflow: auto;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 2px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(68, 64, 60, 0.38);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    background: rgba(245, 158, 11, 0.14);
    transform: translateX(4px);
}

.rank-number {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    font-weight: 950;
}

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

.rank-meta {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--muted);
    font-size: 13px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.filter-pill {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 13px;
    color: #d6d3d1;
    background: rgba(41, 37, 36, 0.8);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.filter-pill:hover,
.filter-pill.active {
    color: #111827;
    border-color: transparent;
    background: var(--amber);
}

.detail-hero {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 36px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.18), transparent 35%),
        rgba(28, 25, 23, 0.82);
    box-shadow: var(--shadow);
}

.detail-poster {
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
    background: #1c1917;
}

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

.detail-line {
    color: #e7e5e4;
    line-height: 1.8;
    font-size: 18px;
}

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

.player-section {
    margin-top: 42px;
}

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

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

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    width: 100%;
    border: 0;
    color: #fff;
    background:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.2), transparent 35%),
        rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

.play-cover.is-hidden {
    display: none;
}

.play-ring {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: #111827;
    font-size: 32px;
    box-shadow: 0 18px 45px rgba(245, 158, 11, 0.3);
}

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

.content-card {
    padding: 30px;
}

.content-card p {
    margin-bottom: 0;
}

.site-footer {
    margin-top: 84px;
    border-top: 1px solid var(--line);
    background: rgba(28, 25, 23, 0.82);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 1fr 1fr;
    gap: 30px;
    padding: 42px 0;
}

.footer-links {
    display: grid;
    gap: 10px;
    align-content: start;
}

.footer-links h2 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #fde68a;
}

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 14px;
}

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

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

    .menu-toggle {
        display: block;
    }

    .hero,
    .page-hero,
    .detail-hero,
    .two-column,
    .ranking-layout,
    .detail-content,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .hero-stage {
        min-height: 560px;
    }

    .hero-panel,
    .ranking-card {
        position: static;
    }

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

    .category-card-grid,
    .rank-list.wide-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .nav-inner,
    .hero,
    .section,
    .page-hero,
    .detail-hero,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 22px, 1180px);
    }

    .hero {
        margin-top: 16px;
    }

    .hero-stage {
        min-height: 540px;
        border-radius: 24px;
    }

    .hero-content {
        width: 100%;
        padding: 36px 24px 78px;
        justify-content: end;
    }

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

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

    .hero-dots {
        left: 24px;
        bottom: 28px;
    }

    .search-card,
    .hero-rail,
    .section-panel,
    .page-hero,
    .detail-hero,
    .content-card,
    .ranking-card {
        padding: 22px;
        border-radius: 22px;
    }

    .category-chip-grid,
    .movie-grid,
    .full-grid,
    .compact-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

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

    .movie-card-body em {
        min-height: auto;
    }

    .section-heading.split {
        display: block;
    }

    .section-more {
        display: inline-flex;
        margin-top: 12px;
    }

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

    .video-shell {
        border-radius: 20px;
    }

    .play-ring {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}

@media (max-width: 420px) {
    .category-chip-grid,
    .movie-grid,
    .full-grid,
    .compact-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .mobile-nav {
        grid-template-columns: 1fr;
    }
}
