* {
    box-sizing: border-box;
}

:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --muted: #94a3b8;
    --text: #f8fafc;
    --soft: #cbd5e1;
    --line: rgba(148, 163, 184, 0.22);
    --amber: #f59e0b;
    --orange: #fb923c;
    --rose: #f43f5e;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 32rem),
        radial-gradient(circle at top right, rgba(244, 63, 94, 0.14), transparent 34rem),
        linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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: 100;
    border-bottom: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.brand-text {
    font-size: 1.45rem;
    background: linear-gradient(90deg, #fbbf24, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-links a {
    padding: 10px 14px;
    color: var(--soft);
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    color: #fff;
    background: rgba(148, 163, 184, 0.14);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.7);
    color: var(--text);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
    border-radius: 2px;
}

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

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    filter: saturate(1.1) contrast(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.7) 45%, rgba(2, 6, 23, 0.25)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.15) 42%, rgba(2, 6, 23, 0.86) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) 380px;
    align-items: center;
    gap: 52px;
}

.hero-copy {
    padding-top: 40px;
}

.eyebrow {
    margin: 0 0 12px;
    color: #fbbf24;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(2.45rem, 7vw, 5.6rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-desc,
.page-hero p,
.detail-line {
    max-width: 720px;
    margin: 22px 0 0;
    color: var(--soft);
    font-size: clamp(1rem, 2vw, 1.22rem);
    line-height: 1.8;
}

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

.hero-tags {
    margin-top: 24px;
}

.tag,
.hero-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(251, 191, 36, 0.24);
    background: rgba(245, 158, 11, 0.12);
    color: #fde68a;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 700;
}

.hero-actions,
.detail-copy .btn {
    margin-top: 32px;
}

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

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

.btn-primary {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
    margin-left: 10px;
    color: #fff;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.62);
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow);
    transform: perspective(1000px) rotateY(-5deg);
}

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

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: #fff;
    font-weight: 800;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-active {
    width: 34px;
    background: linear-gradient(90deg, #fbbf24, #fb923c);
}

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

.section,
.search-panel {
    padding: 64px 0 0;
}

.page-shell,
.detail-shell {
    padding: 34px 0 72px;
}

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

.section-heading.center {
    display: block;
    text-align: center;
}

.section-heading h2,
.content-card h2 {
    margin: 0;
    font-size: clamp(1.65rem, 3vw, 2.45rem);
    letter-spacing: -0.04em;
}

.section-heading p,
.search-panel p,
.content-card p,
.footer-grid p,
.category-overview-card p,
.compact-card p,
.rank-info p {
    color: var(--muted);
    line-height: 1.75;
}

.section-heading a {
    color: #fbbf24;
    font-weight: 800;
}

.search-panel {
    margin-top: -42px;
    position: relative;
    z-index: 8;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-box {
    max-width: 720px;
    margin: 26px auto 0;
}

.search-box input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 54px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: #fff;
    background: rgba(2, 6, 23, 0.72);
    outline: none;
    padding: 0 18px;
}

.search-box input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(251, 191, 36, 0.72);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.search-results {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.search-result-item {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.54);
}

.search-result-item img {
    width: 58px;
    height: 78px;
    border-radius: 12px;
    object-fit: cover;
}

.search-result-item strong {
    display: block;
    margin-bottom: 4px;
}

.search-result-item span {
    color: var(--muted);
    font-size: 0.85rem;
}

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

.category-chip {
    min-height: 136px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 9rem),
        rgba(15, 23, 42, 0.72);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-chip:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 191, 36, 0.45);
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.24), transparent 9rem),
        rgba(15, 23, 42, 0.94);
}

.category-chip span {
    display: block;
    margin-bottom: 10px;
    font-size: 1.15rem;
    font-weight: 900;
}

.category-chip small {
    color: var(--muted);
    line-height: 1.65;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.42);
    box-shadow: 0 22px 64px rgba(0, 0, 0, 0.36);
}

.card-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.8));
}

.card-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.28s ease;
}

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

.card-score,
.card-play {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 900;
}

.card-score {
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    color: #111827;
    background: #fbbf24;
}

.card-play {
    right: 10px;
    bottom: 10px;
    padding: 7px 12px;
    color: #fff;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(12px);
}

.card-body {
    padding: 14px;
}

.card-body h2 {
    margin: 10px 0 8px;
    font-size: 1.02rem;
    line-height: 1.32;
}

.card-body h2 a:hover,
.rank-info h2 a:hover,
.category-overview-title:hover {
    color: #fbbf24;
}

.card-meta {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.86rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-line {
    margin: 0;
    min-height: 4.8em;
    color: var(--soft);
    font-size: 0.88rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.compact-card {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.68);
}

.compact-card a {
    display: block;
    position: relative;
}

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

.compact-card span {
    display: block;
    padding: 10px 10px 4px;
    font-weight: 850;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compact-card p {
    margin: 0;
    padding: 0 10px 12px;
    font-size: 0.84rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-hero {
    padding: 54px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 18rem),
        rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.page-hero.slim h1 {
    font-size: clamp(2.2rem, 6vw, 4.6rem);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    color: var(--muted);
}

.breadcrumb a {
    color: #fbbf24;
}

.filter-bar {
    margin: 28px 0;
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 14px;
}

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

.category-overview-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.7);
}

.category-overview-title {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 1.4rem;
    font-weight: 900;
}

.mini-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 18px;
}

.rank-list {
    margin-top: 28px;
    display: grid;
    gap: 14px;
}

.rank-row {
    display: grid;
    grid-template-columns: 54px 92px 1fr 76px;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.7);
}

.rank-num {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    font-weight: 950;
}

.rank-cover img {
    width: 92px;
    height: 126px;
    border-radius: 16px;
    object-fit: cover;
}

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

.rank-info p {
    margin: 0 0 10px;
}

.rank-score {
    justify-self: end;
    font-size: 1.6rem;
    color: #fbbf24;
}

.detail-hero {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 34px;
    align-items: center;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 19rem),
        rgba(15, 23, 42, 0.76);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    border-radius: 24px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

.detail-copy h1 {
    font-size: clamp(2.1rem, 5vw, 4.4rem);
}

.large-tags {
    margin-top: 22px;
}

.detail-stats {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-stats span {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(2, 6, 23, 0.44);
}

.player-section,
.content-card {
    margin-top: 30px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.24);
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
}

.video-frame video {
    width: 100%;
    min-height: 320px;
    aspect-ratio: 16 / 9;
    background: #000;
    object-fit: contain;
}

.video-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.48), rgba(2, 6, 23, 0.78));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    font-size: 2rem;
    box-shadow: 0 22px 54px rgba(245, 158, 11, 0.34);
}

.content-card {
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
}

.content-card h2 + p {
    margin-top: 12px;
}

.content-card p + h2 {
    margin-top: 26px;
}

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

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

.footer-brand {
    margin-bottom: 16px;
    font-size: 1.25rem;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 1.05rem;
}

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

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

.footer-links a:hover {
    color: #fbbf24;
}

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

@media (max-width: 1080px) {
    .hero-content {
        grid-template-columns: 1fr 300px;
    }

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

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

@media (max-width: 820px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

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

    .hero {
        min-height: 760px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 24px;
    }

    .hero-poster {
        width: min(260px, 72vw);
        transform: none;
    }

    .search-results,
    .category-overview-grid,
    .footer-grid,
    .detail-hero,
    .filter-bar {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .full-grid,
    .compact-grid,
    .mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .rank-row {
        grid-template-columns: 42px 74px 1fr;
    }

    .rank-score {
        grid-column: 3;
        justify-self: start;
        font-size: 1.1rem;
    }
}

@media (max-width: 520px) {
    .nav-wrap,
    .section,
    .search-panel,
    .page-shell,
    .detail-shell,
    .footer-grid {
        width: min(100% - 22px, 1180px);
    }

    .hero-content {
        width: min(100% - 22px, 1180px);
    }

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

    .hero h1,
    .page-hero.slim h1,
    .detail-copy h1 {
        font-size: 2.25rem;
        line-height: 1.05;
    }

    .category-grid,
    .movie-grid,
    .full-grid,
    .compact-grid,
    .mini-grid {
        grid-template-columns: 1fr;
    }

    .btn-ghost {
        margin-left: 0;
        margin-top: 10px;
    }

    .hero-actions {
        display: grid;
        gap: 10px;
        justify-items: start;
    }
}
