:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: rgba(30, 41, 59, 0.82);
    --panel-solid: #1e293b;
    --panel-deep: #0b1120;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --muted-deep: #94a3b8;
    --amber: #f59e0b;
    --amber-soft: #fbbf24;
    --danger: #ef4444;
    --radius: 22px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 34rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 30rem),
        linear-gradient(180deg, #0f172a 0%, #111827 48%, #020617 100%);
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.86);
    backdrop-filter: blur(20px);
}

.nav-wrap {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 26px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}

.nav-links a,
.mobile-panel a {
    color: var(--muted);
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.mobile-panel a:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 300px;
}

.top-search input,
.mobile-panel input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.22);
    outline: none;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    border-radius: 14px;
    padding: 11px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search input:focus,
.mobile-panel input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
    background: rgba(15, 23, 42, 0.94);
}

.top-search button,
.mobile-panel button,
.btn-primary,
.btn-secondary,
.text-link {
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
}

.top-search button,
.mobile-panel button,
.btn-primary {
    color: #111827;
    background: linear-gradient(135deg, var(--amber-soft), var(--amber));
    padding: 11px 18px;
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.24);
}

.btn-secondary {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    padding: 11px 18px;
}

.text-link {
    display: inline-flex;
    align-items: center;
    color: var(--amber-soft);
    padding: 0;
    background: transparent;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #ffffff;
    background: rgba(30, 41, 59, 0.82);
}

.mobile-panel {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
}

.mobile-panel.is-open {
    display: grid;
    gap: 16px;
}

.mobile-panel form {
    display: flex;
    gap: 10px;
}

.main-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-carousel {
    position: relative;
    min-height: 76vh;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #020617;
}

.hero-slide {
    display: none;
    min-height: 76vh;
    background-size: cover;
    background-position: center;
    align-items: center;
    position: relative;
}

.hero-slide.is-active {
    display: flex;
    animation: heroFade 0.75s ease both;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.78) 45%, rgba(15, 23, 42, 0.22) 100%),
        radial-gradient(circle at 70% 20%, rgba(245, 158, 11, 0.24), transparent 30rem);
}

.hero-inner {
    position: relative;
    z-index: 1;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    gap: 54px;
    align-items: center;
    padding: 86px 0 70px;
}

.hero-kicker,
.section-kicker,
.breadcrumbs,
.movie-meta,
.detail-meta {
    color: var(--amber-soft);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.hero-content h2 {
    margin: 0 0 18px;
    font-size: clamp(28px, 4.5vw, 54px);
    line-height: 1.05;
}

.hero-content p {
    max-width: 690px;
    margin: 0 0 26px;
    color: var(--muted);
    font-size: 18px;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin-top: 24px;
}

.hero-panel {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.hero-panel img {
    aspect-ratio: 3 / 4;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.44);
}

.hero-panel h3 {
    margin: 16px 0 4px;
    font-size: 22px;
}

.hero-panel p {
    margin: 0;
    color: var(--muted-deep);
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
    padding: 62px 0;
}

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

.section-header h1,
.section-header h2 {
    margin: 8px 0 0;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.58);
    box-shadow: 0 18px 38px 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(245, 158, 11, 0.5);
    box-shadow: 0 26px 56px rgba(0, 0, 0, 0.32);
}

.poster-link {
    display: block;
    position: relative;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.72);
}

.poster-link img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.05);
    filter: saturate(1.08) contrast(1.05);
}

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.86));
}

.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    min-width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #111827;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber-soft), var(--amber));
    box-shadow: 0 10px 22px rgba(245, 158, 11, 0.3);
}

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

.movie-card h3 {
    margin: 8px 0 8px;
    color: #ffffff;
    font-size: 20px;
    line-height: 1.28;
}

.movie-card p {
    min-height: 82px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.tag-row,
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span,
.meta-row span,
.detail-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(245, 158, 11, 0.26);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.1);
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(30, 41, 59, 0.62);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.category-art {
    min-height: 172px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 14px;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18), rgba(15, 23, 42, 0.42));
}

.category-art img {
    height: 150px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
}

.category-art img:nth-child(2) {
    transform: translateY(14px);
}

.category-body {
    padding: 22px;
}

.category-body h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.category-body p {
    margin: 0 0 16px;
    color: var(--muted);
}

.category-preview {
    display: grid;
    gap: 8px;
    margin: 0 0 18px;
}

.category-preview a {
    color: var(--muted);
    transition: color 0.2s ease;
}

.category-preview a:hover {
    color: #ffffff;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 16px;
    align-items: end;
    margin: 0 0 26px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.68);
}

.filter-search span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted-deep);
    font-size: 13px;
    font-weight: 800;
}

.filter-selects {
    display: flex;
    gap: 10px;
}

.filter-selects select {
    min-width: 140px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 52px 74px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.62);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.42);
}

.rank-number {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #111827;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber-soft), var(--amber));
}

.rank-item img {
    width: 74px;
    height: 102px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-item h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-item p {
    margin: 0;
    color: var(--muted);
}

.detail-hero {
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.95));
}

.detail-layout {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 44px;
    align-items: center;
    padding: 62px 0;
}

.detail-poster {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.7);
    box-shadow: var(--shadow);
}

.detail-poster img {
    aspect-ratio: 2 / 3;
    border-radius: 22px;
    object-fit: cover;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 16px;
}

.breadcrumbs a {
    color: #fde68a;
}

.detail-content h1 {
    margin: 0 0 16px;
    font-size: clamp(36px, 5.5vw, 68px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.detail-lead {
    max-width: 760px;
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 18px;
}

.player-section,
.content-section,
.related-section {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0 0;
}

.player-section h2,
.content-section h2,
.related-section h2 {
    margin: 0 0 18px;
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: -0.03em;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: #111827;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.16), rgba(2, 6, 23, 0.48));
    cursor: pointer;
}

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

.play-icon {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber-soft), var(--amber));
    box-shadow: 0 18px 36px rgba(245, 158, 11, 0.34);
    font-size: 32px;
    transform: translateX(3px);
}

.content-card {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(30, 41, 59, 0.62);
    padding: 28px;
}

.content-card p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 17px;
}

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

.is-hidden {
    display: none !important;
}

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

.footer-grid {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 36px;
    padding: 46px 0;
}

.footer-grid p {
    max-width: 520px;
    color: var(--muted);
}

.footer-grid h3 {
    margin: 0 0 14px;
}

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

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

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

.footer-bottom {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 30px;
    color: var(--muted-deep);
    border-top: 1px solid var(--line);
}

@keyframes heroFade {
    from {
        opacity: 0;
        transform: scale(1.015);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 1080px) {
    .top-search {
        display: none;
    }

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

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

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

    .hero-panel,
    .detail-poster {
        max-width: 360px;
    }
}

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

    .menu-toggle {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

    .brand {
        font-size: 19px;
    }

    .hero-slide,
    .hero-carousel {
        min-height: auto;
    }

    .hero-inner {
        padding: 54px 0 82px;
    }

    .hero-content p,
    .detail-lead {
        font-size: 16px;
    }

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

    .section-header,
    .filter-bar,
    .rank-item {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .section-header {
        display: grid;
    }

    .filter-selects {
        flex-direction: column;
    }

    .rank-item {
        grid-template-columns: 44px 64px 1fr;
    }

    .rank-item .btn-secondary {
        grid-column: 1 / -1;
        text-align: center;
    }

    .detail-layout {
        padding: 36px 0;
    }
}
