:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: #111827;
    --bg-card-2: #0b1220;
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(245, 158, 11, 0.32);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --amber: #f59e0b;
    --amber-light: #fbbf24;
    --orange: #ea580c;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

* {
    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.08), transparent 28rem), var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line-strong);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
}

.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.25rem;
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    min-width: max-content;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 0 28px rgba(245, 158, 11, 0.28);
    color: #fff;
    font-weight: 900;
}

.logo-title {
    display: block;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, var(--amber-light), var(--orange));
    -webkit-background-clip: text;
    color: transparent;
}

.logo-subtitle {
    display: block;
    margin-top: -0.15rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

.main-nav a,
.mobile-panel a {
    color: #cbd5e1;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.mobile-panel a:hover {
    color: var(--amber-light);
}

.header-search {
    position: relative;
    width: min(270px, 24vw);
}

.header-search input,
.filter-input,
.filter-select {
    width: 100%;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    padding: 0.72rem 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
    padding-left: 2.6rem;
}

.header-search input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: rgba(245, 158, 11, 0.8);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
    background: rgba(2, 6, 23, 0.96);
}

.search-icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-2);
}

.mobile-toggle {
    display: none;
    border: 0;
    background: rgba(15, 23, 42, 0.88);
    color: var(--amber-light);
    width: 44px;
    height: 44px;
    border-radius: 14px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.98);
    padding: 0.8rem 1.25rem 1.2rem;
}

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

.mobile-panel nav {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
}

.mobile-panel a {
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
}

.mobile-panel a:hover {
    background: rgba(15, 23, 42, 0.9);
}

.hero {
    position: relative;
    min-height: 68vh;
    overflow: hidden;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.85s ease;
}

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
    filter: saturate(1.05) contrast(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.72) 58%, var(--bg)), linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.46), transparent 72%);
}

.hero-content {
    position: absolute;
    inset: auto 0 0 0;
    padding: 0 1.25rem 4.6rem;
}

.hero-box {
    max-width: 1180px;
    margin: 0 auto;
}

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

.eyebrow,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    font-weight: 800;
}

.eyebrow {
    margin-bottom: 1rem;
    padding: 0.35rem 0.8rem;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: white;
    font-size: 0.88rem;
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.22);
}

.hero h1,
.hero h2 {
    margin: 0 0 1rem;
    font-size: clamp(2.3rem, 6vw, 5.2rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero p {
    margin: 0 0 1.4rem;
    max-width: 58ch;
    color: #cbd5e1;
    font-size: clamp(1rem, 1.5vw, 1.22rem);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 1.1rem 0 1.55rem;
}

.hero-meta span,
.card-chip,
.rank-chip {
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.86rem;
    font-weight: 700;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    min-height: 44px;
    padding: 0.72rem 1.15rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 900;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: #fff;
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.22);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.78);
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.26);
}

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

.btn-primary:hover {
    box-shadow: 0 22px 48px rgba(245, 158, 11, 0.34);
}

.hero-dots {
    position: absolute;
    right: max(1.25rem, calc((100vw - 1180px) / 2));
    bottom: 2.5rem;
    display: flex;
    gap: 0.55rem;
    z-index: 5;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.42);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.page-hero {
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 1));
}

.page-hero-inner,
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.page-hero-inner {
    padding-top: 4rem;
    padding-bottom: 3.5rem;
}

.page-hero h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 1.08rem;
}

.section {
    padding: 3.8rem 0;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.6rem;
}

.section-title {
    margin: 0 0 0.25rem;
    font-size: clamp(1.55rem, 2.6vw, 2.35rem);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.section-subtitle {
    margin: 0;
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 1.2rem;
}

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

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

.movie-card,
.category-card,
.rank-card,
.info-panel,
.player-panel {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(11, 18, 32, 0.94));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
}

.movie-card,
.category-card,
.rank-card {
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.48);
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.3);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(15, 23, 42, 0.96));
    overflow: hidden;
}

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

.movie-card:hover .poster-wrap img,
.rank-card:hover img {
    transform: scale(1.08);
}

.poster-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.38);
    opacity: 0;
    transition: opacity 0.24s ease;
}

.movie-card:hover .poster-overlay,
.rank-card:hover .poster-overlay {
    opacity: 1;
}

.play-bubble {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: var(--amber);
    color: white;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.card-year {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    color: white;
    background: rgba(2, 6, 23, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 800;
}

.movie-body {
    padding: 1rem;
}

.movie-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}

.movie-meta small {
    color: var(--muted-2);
    font-weight: 700;
}

.movie-title {
    margin: 0 0 0.55rem;
    color: #fff;
    font-size: 1.08rem;
    line-height: 1.25;
    transition: color 0.2s ease;
}

.movie-card:hover .movie-title {
    color: var(--amber-light);
}

.movie-desc {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.line-2,
.line-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-2 {
    -webkit-line-clamp: 2;
}

.line-3 {
    -webkit-line-clamp: 3;
}

.category-card {
    padding: 1.4rem;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.category-card h2,
.category-card h3 {
    margin: 0 0 0.65rem;
    font-size: 1.36rem;
}

.category-card p {
    margin: 0;
    color: var(--muted);
}

.category-arrow {
    margin-top: 1.2rem;
    color: var(--amber-light);
    font-weight: 900;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.empty-state {
    display: none;
    padding: 2rem;
    text-align: center;
    color: var(--muted);
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.45);
}

.empty-state.is-visible {
    display: block;
}

.ranking-list {
    display: grid;
    gap: 0.85rem;
}

.rank-card {
    display: grid;
    grid-template-columns: 78px 132px minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 0.9rem;
}

.rank-num {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: rgba(245, 158, 11, 0.12);
    color: var(--amber-light);
    font-size: 1.35rem;
    font-weight: 950;
}

.rank-cover {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.9);
}

.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.rank-info h2,
.rank-info h3 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    margin-bottom: 1.2rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumb a {
    color: #e2e8f0;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.92fr);
    gap: 1.35rem;
}

.player-panel {
    padding: 1rem;
}

.video-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 18px;
    background: #000;
}

.video-stage video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.62));
    cursor: pointer;
    z-index: 2;
}

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

.player-button {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: #fff;
    box-shadow: 0 24px 60px rgba(245, 158, 11, 0.36);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.player-button:hover {
    transform: scale(1.06);
}

.detail-title {
    margin: 1.2rem 0 0.65rem;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1.1rem;
}

.info-panel {
    padding: 1.4rem;
}

.info-panel h2,
.info-panel h3 {
    margin: 0 0 0.8rem;
    font-size: 1.35rem;
}

.info-panel p {
    margin: 0 0 1rem;
    color: #cbd5e1;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-list span {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 999px;
    padding: 0.28rem 0.62rem;
    font-size: 0.85rem;
    font-weight: 800;
}

.sidebar-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 0.8rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
}

.sidebar-card:last-child {
    border-bottom: 0;
}

.sidebar-card img {
    width: 92px;
    height: 62px;
    object-fit: cover;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
}

.sidebar-card h3 {
    margin: 0 0 0.25rem;
    font-size: 0.98rem;
    line-height: 1.25;
}

.sidebar-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
}

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

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

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

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

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

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

@media (max-width: 820px) {
    .main-nav,
    .header-search {
        display: none;
    }

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero {
        min-height: 70vh;
    }

    .hero-content {
        padding-bottom: 4rem;
    }

    .hero-dots {
        left: 1.25rem;
        right: auto;
        bottom: 1.6rem;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .rank-card {
        grid-template-columns: 52px 96px minmax(0, 1fr);
    }

    .rank-card .btn {
        grid-column: 2 / -1;
        justify-self: start;
    }
}

@media (max-width: 620px) {
    .header-inner {
        min-height: 68px;
    }

    .logo-title {
        font-size: 1.08rem;
    }

    .logo-subtitle {
        display: none;
    }

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

    .hero h1,
    .hero h2 {
        font-size: clamp(2.1rem, 14vw, 3.6rem);
    }

    .rank-card {
        grid-template-columns: 42px 88px minmax(0, 1fr);
        gap: 0.7rem;
    }

    .rank-num {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 1rem;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
