:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --muted: #94a3b8;
    --text: #f8fafc;
    --line: rgba(148, 163, 184, 0.18);
    --amber: #f59e0b;
    --amber-soft: rgba(245, 158, 11, 0.16);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.18), transparent 32rem),
        radial-gradient(circle at 82% 18%, rgba(59, 130, 246, 0.12), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    min-height: 100vh;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 68px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: white;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.25);
    font-size: 15px;
}

.brand-name {
    color: white;
    font-size: 21px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.nav-link {
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 650;
    white-space: nowrap;
    transition: color 0.2s ease;
}

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

.site-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.site-search input,
.filter-input,
.filter-select {
    width: 220px;
    color: white;
    border: 1px solid rgba(148, 163, 184, 0.2);
    outline: 0;
    background: rgba(15, 23, 42, 0.78);
    border-radius: 12px;
    padding: 10px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.site-search button,
.primary-btn,
.secondary-btn,
.filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(245, 158, 11, 0.22);
    transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.site-search button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.filter-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.secondary-btn {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(245, 158, 11, 0.38);
    box-shadow: none;
}

.menu-toggle {
    display: none;
    color: white;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    padding: 8px 11px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    padding: 16px;
    background: rgba(15, 23, 42, 0.98);
}

.mobile-panel.open {
    display: block;
}

.mobile-panel nav {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.58), rgba(2, 6, 23, 0.30)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 44%, rgba(2, 6, 23, 0.48) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    min-height: 560px;
    padding: 88px 0 86px;
}

.hero-copy {
    max-width: 760px;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--amber);
    font-size: 14px;
    font-weight: 780;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.hero h2 {
    margin: 16px 0 18px;
    color: white;
    font-size: clamp(36px, 6vw, 62px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 24px;
    color: #dbe4ef;
    font-size: clamp(16px, 2vw, 19px);
    line-height: 1.8;
}

.hero-chips,
.card-tags,
.detail-chips,
.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-chips span,
.card-tags span,
.detail-chips span,
.category-chips a,
.category-chips span {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 13px;
    font-weight: 650;
}

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

.hero-control {
    position: absolute;
    z-index: 4;
    top: 50%;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: white;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.65);
    transform: translateY(-50%) scale(1.04);
}

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

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

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

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

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

.main-content {
    padding: 54px 0 70px;
}

.section {
    margin-bottom: 64px;
}

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

.section-head h1,
.section-head h2 {
    margin: 7px 0 0;
    color: white;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.16;
    font-weight: 880;
    letter-spacing: -0.03em;
}

.section-head p {
    max-width: 720px;
    margin: 9px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.section-more {
    flex: 0 0 auto;
    color: #fbbf24;
    font-weight: 750;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.36);
    background: rgba(30, 41, 59, 0.88);
}

.movie-card figure {
    position: relative;
    margin: 0;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: rgba(15, 23, 42, 0.9);
}

.movie-card.wide figure,
.movie-card.compact figure {
    aspect-ratio: 16 / 10;
}

.movie-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

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

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: white;
    background: rgba(245, 158, 11, 0.92);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-duration,
.rank-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    color: white;
    background: rgba(0, 0, 0, 0.62);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 720;
}

.rank-badge {
    left: 10px;
    right: auto;
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 8px;
    overflow: hidden;
    color: white;
    font-size: 16px;
    line-height: 1.36;
    font-weight: 780;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: #fbbf24;
}

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

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

.card-tags {
    margin-top: 10px;
}

.card-tags span {
    padding: 4px 8px;
    font-size: 12px;
}

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

.category-tile {
    position: relative;
    min-height: 170px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    padding: 22px;
    background:
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.18), transparent 11rem),
        rgba(15, 23, 42, 0.74);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-tile h2,
.category-tile h3 {
    margin: 0 0 10px;
    color: white;
    font-size: 22px;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.rank-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

.rank-panel,
.filter-panel,
.detail-panel,
.player-shell,
.search-panel {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.rank-panel {
    overflow: hidden;
}

.rank-row {
    display: grid;
    grid-template-columns: 54px 74px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
    transition: background 0.2s ease;
}

.rank-row:hover {
    background: rgba(30, 41, 59, 0.72);
}

.rank-row img {
    width: 74px;
    height: 50px;
    object-fit: cover;
    border-radius: 10px;
}

.rank-number {
    color: #fbbf24;
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.rank-info strong {
    display: block;
    color: white;
    font-size: 15px;
    line-height: 1.4;
}

.rank-info em {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.rank-score {
    color: #fbbf24;
    font-weight: 850;
}

.filter-panel,
.search-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 18px;
}

.filter-panel .filter-input {
    flex: 1 1 260px;
}

.filter-select {
    width: 170px;
}

.hidden-by-filter {
    display: none !important;
}

.empty-state {
    display: none;
    margin: 28px 0;
    color: var(--muted);
    text-align: center;
}

.empty-state.show {
    display: block;
}

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

.breadcrumb a {
    color: #fbbf24;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 28px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #000;
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

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

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

.player-cover button {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    color: white;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    border-radius: 999px;
    box-shadow: 0 24px 60px rgba(245, 158, 11, 0.35);
    cursor: pointer;
    font-size: 30px;
}

.detail-panel {
    padding: 24px;
}

.detail-panel h1 {
    margin: 0 0 14px;
    color: white;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.detail-panel p {
    color: #cbd5e1;
    line-height: 1.85;
}

.detail-poster {
    margin-top: 22px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
}

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

.article-card {
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: var(--panel);
}

.article-card h2 {
    margin: 0 0 13px;
    color: white;
    font-size: 24px;
}

.article-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.95;
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.96));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
    padding: 42px 0;
}

.footer-brand {
    margin-bottom: 16px;
}

.site-footer p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: white;
    font-size: 18px;
}

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

.footer-links a {
    color: #cbd5e1;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    padding: 18px 0 26px;
    color: #64748b;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.10);
}

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

    .site-search input {
        width: 180px;
    }

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

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

@media (max-width: 840px) {
    .desktop-nav,
    .header-inner > .site-search {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .mobile-panel .site-search {
        display: flex;
        margin-left: 0;
    }

    .mobile-panel .site-search input {
        width: 100%;
        flex: 1 1 auto;
    }

    .hero,
    .hero-content {
        min-height: 520px;
    }

    .hero-content {
        padding: 78px 0 78px;
    }

    .hero-control {
        display: none;
    }

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

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

    .filter-select {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .brand-name {
        font-size: 18px;
    }

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

    .hero p {
        font-size: 15px;
    }

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

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

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

    .rank-row img {
        width: 58px;
        height: 42px;
    }

    .rank-score {
        display: none;
    }
}
