
:root {
    color-scheme: dark;
    --bg: #050816;
    --panel: #0f172a;
    --panel-soft: #172033;
    --panel-line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --subtle: #cbd5e1;
    --brand: #f59e0b;
    --brand-light: #fbbf24;
    --brand-deep: #ea580c;
    --danger: #ef4444;
    --radius: 18px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.18), transparent 30%),
        radial-gradient(circle at 80% 8%, rgba(249, 115, 22, 0.12), transparent 28%),
        linear-gradient(180deg, #0b1220 0%, var(--bg) 45%, #020617 100%);
    color: var(--text);
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

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

.logo-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand-light), var(--brand-deep));
    color: white;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.35);
}

.logo-text {
    font-size: 22px;
    font-weight: 850;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fde68a, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
}

.nav-link,
.mobile-link {
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--subtle);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
    background: rgba(245, 158, 11, 0.16);
    color: #fff7ed;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-search,
.mobile-search,
.filter-input,
.filter-select {
    border: 1px solid rgba(148, 163, 184, 0.24);
    outline: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: var(--text);
}

.top-search {
    width: 240px;
    padding: 10px 16px;
}

.top-search:focus,
.mobile-search:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: rgba(245, 158, 11, 0.82);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.9);
    color: white;
}

.mobile-panel {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

.mobile-search {
    width: 100%;
    padding: 12px 16px;
}

.page-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 34px 24px 70px;
}

.hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    border-radius: 30px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.hero-track {
    position: relative;
    min-height: 560px;
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 44%, rgba(15, 23, 42, 0.12) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent 48%);
}

.hero-content {
    position: absolute;
    left: clamp(24px, 6vw, 72px);
    bottom: clamp(34px, 8vw, 86px);
    max-width: 700px;
    display: grid;
    gap: 18px;
}

.hero-kicker {
    display: inline-flex;
    width: max-content;
    gap: 8px;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.18);
    color: #fde68a;
    font-weight: 700;
}

.hero h1,
.hero h2 {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    margin: 0;
    color: var(--subtle);
    font-size: 18px;
    line-height: 1.8;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 760;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-light), var(--brand-deep));
    color: white;
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.3);
}

.btn-ghost {
    background: rgba(15, 23, 42, 0.68);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    color: white;
    font-size: 26px;
}

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

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

.hero-dots {
    position: absolute;
    right: 32px;
    bottom: 34px;
    display: flex;
    gap: 8px;
}

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

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

.section {
    margin-top: 46px;
}

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

.section-head h1,
.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -0.03em;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-more {
    padding: 9px 14px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
}

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

.category-tile {
    display: grid;
    gap: 14px;
    min-height: 170px;
    padding: 24px;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.24), transparent 42%),
        linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    border: 1px solid var(--panel-line);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-tile strong {
    font-size: 22px;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 28px 70px rgba(245, 158, 11, 0.12);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--panel-soft);
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(2, 6, 23, 0.78));
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    transform: translate(-50%, -50%) scale(0.88);
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-light), var(--brand-deep));
    color: white;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.card-category,
.card-duration {
    position: absolute;
    top: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: white;
    font-size: 12px;
    background: rgba(15, 23, 42, 0.74);
}

.card-category {
    left: 12px;
    background: rgba(245, 158, 11, 0.88);
}

.card-duration {
    right: 12px;
}

.card-body {
    padding: 16px;
}

.card-title {
    display: block;
    min-height: 48px;
    color: white;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.42;
}

.card-title:hover {
    color: #fde68a;
}

.card-body p,
.wide-body p {
    margin: 9px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    color: var(--subtle);
    font-size: 13px;
}

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

.tag-row span,
.detail-tag,
.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.13);
    color: #dbeafe;
}

.tag-row span {
    padding: 5px 8px;
    font-size: 12px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--panel-line);
}

.filter-input,
.filter-select {
    min-height: 46px;
    width: 100%;
    padding: 0 15px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 62px 116px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid var(--panel-line);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.rank-num {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(245, 158, 11, 0.16);
    color: #fde68a;
    font-size: 20px;
    font-weight: 900;
}

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

.rank-info strong {
    display: block;
    margin-bottom: 6px;
    font-size: 18px;
}

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

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

.movie-card-wide {
    display: grid;
    grid-template-columns: 180px 1fr;
}

.wide-cover {
    position: relative;
    min-height: 126px;
    overflow: hidden;
}

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

.wide-body {
    padding: 18px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.85fr);
    gap: 30px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: rgba(2, 6, 23, 0.28);
    color: white;
    cursor: pointer;
}

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

.player-button {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-light), var(--brand-deep));
    box-shadow: 0 22px 52px rgba(245, 158, 11, 0.36);
    font-size: 28px;
}

.detail-card,
.text-card {
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid var(--panel-line);
    padding: 24px;
}

.detail-title {
    margin: 24px 0 10px;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

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

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 16px 0 18px;
}

.meta-pill,
.detail-tag {
    padding: 7px 11px;
    font-size: 13px;
}

.detail-summary {
    color: var(--subtle);
    font-size: 17px;
    line-height: 1.9;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.text-card {
    margin-top: 22px;
}

.text-card h2,
.detail-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.text-card p,
.detail-card p {
    margin: 0;
    color: var(--subtle);
    line-height: 1.9;
}

.compact-stack {
    display: grid;
    gap: 12px;
}

.compact-card {
    display: grid;
    grid-template-columns: 96px 1fr;
    align-items: center;
    gap: 12px;
    padding: 9px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.74);
    transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
    background: rgba(51, 65, 85, 0.9);
    transform: translateX(3px);
}

.compact-card img {
    width: 96px;
    height: 62px;
    border-radius: 12px;
    object-fit: cover;
}

.compact-card strong {
    display: block;
    line-height: 1.35;
}

.compact-card small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

.empty-state {
    display: none;
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--panel-line);
    background: rgba(15, 23, 42, 0.76);
    color: var(--muted);
    text-align: center;
}

.site-footer {
    border-top: 1px solid var(--panel-line);
    background: #020617;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 24px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    color: var(--muted);
}

.footer-inner strong {
    color: white;
    font-size: 20px;
}

.footer-inner p {
    margin: 8px 0 0;
}

.footer-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

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

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

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

    .top-search {
        display: none;
    }

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

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

@media (max-width: 820px) {
    .header-inner {
        height: 64px;
        padding: 0 16px;
    }

    .logo-text {
        font-size: 19px;
    }

    .page-main {
        padding: 24px 16px 54px;
    }

    .hero,
    .hero-track,
    .hero-slide img {
        min-height: 540px;
    }

    .hero-content {
        left: 22px;
        right: 22px;
        bottom: 62px;
    }

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

    .hero-control {
        display: none;
    }

    .hero-dots {
        left: 22px;
        right: auto;
        bottom: 24px;
    }

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

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

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

    .rank-score {
        grid-column: 3;
    }

    .rank-num {
        width: 40px;
        height: 40px;
        border-radius: 13px;
        font-size: 16px;
    }

    .rank-item img {
        width: 82px;
        height: 58px;
    }

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

    .footer-links {
        justify-content: flex-start;
    }
}

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

    .movie-card-wide {
        grid-template-columns: 1fr;
    }

    .wide-cover {
        aspect-ratio: 16 / 9;
    }

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

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