:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: rgba(15, 23, 42, 0.74);
    --panel-strong: #111827;
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --amber: #f59e0b;
    --amber-deep: #ea580c;
    --green: #22c55e;
    --radius: 22px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.16), transparent 30%),
        radial-gradient(circle at 85% 8%, rgba(234, 88, 12, 0.14), transparent 28%),
        linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

main {
    min-height: 70vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

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

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

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

.nav-link {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.22s ease;
}

.nav-link:hover,
.nav-link.is-current {
    color: #fbbf24;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #f8fafc;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 10px 20px 18px;
    background: rgba(2, 6, 23, 0.96);
}

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

.mobile-nav-link {
    padding: 10px 12px;
    border-radius: 12px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
}

.mobile-nav-link.is-current,
.mobile-nav-link:hover {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.14);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 900ms ease;
}

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

.hero-slide img {
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.46) 48%, rgba(2, 6, 23, 0.76)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.28) 42%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 2;
    width: min(1280px, 100%);
    transform: translateX(-50%);
    padding: 72px 20px 88px;
}

.eyebrow {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
}

.eyebrow span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
    border: 1px solid var(--line);
    font-size: 13px;
    font-weight: 700;
}

.eyebrow span:first-child {
    background: linear-gradient(135deg, var(--amber), var(--amber-deep));
    color: #fff;
    border-color: transparent;
}

.hero h1 {
    max-width: 820px;
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 28px;
    color: #d1d5db;
    font-size: clamp(17px, 2.2vw, 22px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.22s ease, background 0.22s ease, border 0.22s ease;
}

.primary-button {
    background: linear-gradient(135deg, var(--amber), var(--amber-deep));
    color: #fff;
    box-shadow: 0 18px 34px rgba(245, 158, 11, 0.28);
}

.secondary-button {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.66);
    color: #f8fafc;
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-2px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.58);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-control.prev {
    left: 18px;
}

.hero-control.next {
    right: 18px;
}

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

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

.hero-dot.is-active {
    background: #fbbf24;
}

.page-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 20px;
}

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

.page-heading.center {
    text-align: center;
}

.page-heading h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.1;
}

.page-heading p {
    max-width: 780px;
    margin: 0;
    color: var(--muted-strong);
    font-size: 17px;
}

.page-heading.center p {
    margin-left: auto;
    margin-right: auto;
}

.section-stack {
    display: grid;
    gap: 56px;
}

.content-section {
    display: grid;
    gap: 24px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 3.5vw, 36px);
}

.section-head p {
    margin: 6px 0 0;
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 20px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.84);
    box-shadow: 0 16px 45px 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(-5px);
    border-color: rgba(245, 158, 11, 0.42);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

.movie-card-medium .poster-link {
    aspect-ratio: 16 / 10;
}

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

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

.year-badge,
.heat-badge {
    position: absolute;
    top: 12px;
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.year-badge {
    left: 12px;
}

.heat-badge {
    right: 12px;
    color: #fbbf24;
}

.movie-card-body {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.card-meta {
    display: flex;
    gap: 8px;
    color: #fbbf24;
    font-size: 12px;
    font-weight: 700;
}

.movie-card h2 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    line-height: 1.28;
}

.movie-card p {
    display: -webkit-box;
    min-height: 45px;
    margin: 0;
    overflow: hidden;
    color: #cbd5e1;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.tag-row span {
    padding: 4px 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: #cbd5e1;
    font-size: 12px;
    background: rgba(2, 6, 23, 0.32);
}

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

.category-card {
    position: relative;
    min-height: 180px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 12% 18%, rgba(245, 158, 11, 0.22), transparent 36%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.74));
}

.category-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p {
    margin: 0 0 18px;
    color: #cbd5e1;
}

.category-card span {
    color: #fbbf24;
    font-weight: 800;
}

.filter-panel {
    margin: 0 0 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 14px;
}

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

.filter-grid input,
.filter-grid select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.82);
    color: #fff;
    outline: none;
    padding: 0 12px;
}

.empty-state {
    margin: 16px 0 0;
    color: #fbbf24;
    font-weight: 700;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 18px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.78);
}

.rank-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    background: #111827;
}

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

.rank-num {
    position: absolute;
    left: 8px;
    top: 8px;
    display: grid;
    min-width: 36px;
    height: 28px;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--amber), var(--amber-deep));
    color: #fff;
    font-weight: 900;
}

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

.rank-info p {
    margin: 0 0 12px;
    color: #cbd5e1;
}

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rank-meta span {
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    font-size: 12px;
    font-weight: 800;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #020617;
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.32;
}

.detail-bg img {
    height: 100%;
    object-fit: cover;
    filter: blur(6px) saturate(1.2);
    transform: scale(1.04);
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 100%);
}

.detail-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
    gap: 30px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 20px 56px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumb a {
    color: #fbbf24;
}

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

.detail-copy p {
    margin: 0 0 20px;
    color: #d1d5db;
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.detail-meta span {
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    color: #e2e8f0;
    border: 1px solid var(--line);
    font-weight: 800;
    font-size: 13px;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

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

.player-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 20px 22px;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.62));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button {
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), var(--amber-deep));
    color: #fff;
    font-size: 34px;
    box-shadow: 0 18px 45px rgba(245, 158, 11, 0.34);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 20px 58px;
}

.article-panel,
.side-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.76);
    padding: 24px;
}

.article-panel h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.article-panel p {
    margin: 0 0 18px;
    color: #d1d5db;
}

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

.side-item {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    align-items: center;
}

.side-item img {
    aspect-ratio: 2 / 3;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.side-item h3 {
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.28;
}

.side-item p {
    margin: 0;
    color: #fbbf24;
    font-size: 12px;
    font-weight: 800;
}

.prev-next {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.prev-next a {
    flex: 1;
    min-width: 220px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.34);
    color: #cbd5e1;
}

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

.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 30px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 20px;
}

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

.footer-group h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-group ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

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

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 16px 20px;
    text-align: center;
    color: #64748b;
}

@media (max-width: 1100px) {
    .grid.featured,
    .grid.cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

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

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

    .menu-button {
        display: block;
    }

    .hero {
        min-height: 72vh;
    }

    .hero-control {
        display: none;
    }

    .hero-content {
        padding: 54px 18px 74px;
    }

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

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

    .rank-card {
        grid-template-columns: 92px 1fr;
    }

    .rank-info h2 {
        font-size: 18px;
    }

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

    .page-shell {
        padding: 40px 16px;
    }

    .detail-inner,
    .player-section,
    .detail-layout {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 520px) {
    .grid.featured,
    .grid.cards,
    .grid.compact,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .brand-text {
        font-size: 17px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
    }
}
