:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --orange-600: #ea580c;
    --blue-600: #2563eb;
    --green-600: #16a34a;
    --purple-600: #9333ea;
    --rose-600: #e11d48;
    --cyan-600: #0891b2;
    --text: #1f2937;
    --muted: #64748b;
    --surface: #ffffff;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(135deg, var(--slate-50), #f9fafb 45%, #e2e8f0);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.24);
    backdrop-filter: blur(12px);
}

.header-inner {
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand {
    transition: transform 0.2s ease;
}

.brand:hover {
    transform: scale(1.03);
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
    box-shadow: 0 12px 22px rgba(234, 88, 12, 0.28);
}

.brand-mark.small {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.brand-copy strong {
    display: block;
    font-size: 24px;
    line-height: 1;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--amber-400), var(--orange-600));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.brand-copy small {
    display: block;
    margin-top: 6px;
    color: #94a3b8;
    font-size: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 15px;
    color: #cbd5e1;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(51, 65, 85, 0.95);
}

.nav-link.active {
    color: #ffffff;
    background: linear-gradient(90deg, var(--amber-500), var(--orange-600));
    box-shadow: 0 12px 26px rgba(245, 158, 11, 0.24);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    color: #ffffff;
    border: 0;
    border-radius: 12px;
    background: rgba(51, 65, 85, 0.78);
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

.hero {
    position: relative;
    height: 420px;
    margin-bottom: 64px;
    overflow: hidden;
    color: #ffffff;
    background: var(--slate-900);
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.52) 48%, rgba(15, 23, 42, 0.28));
}

.hero-copy {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 52px 0;
}

.hero-content {
    max-width: 780px;
}

.hero-kicker,
.section-kicker,
.card-badge,
.detail-chip.primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--amber-500), var(--orange-600));
    border-radius: 999px;
    font-weight: 700;
}

.hero-kicker {
    padding: 8px 16px;
    margin-bottom: 18px;
    font-size: 14px;
}

.hero h1 {
    margin: 0 0 10px;
    font-size: clamp(30px, 5vw, 56px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(22px, 3.5vw, 40px);
    line-height: 1.15;
}

.hero p {
    max-width: 720px;
    margin: 0 0 26px;
    color: #e2e8f0;
    font-size: 17px;
}

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

.button,
.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button.primary,
.hero-button {
    color: #ffffff;
    background: linear-gradient(90deg, var(--amber-500), var(--orange-600));
    box-shadow: 0 16px 30px rgba(234, 88, 12, 0.24);
}

.button.ghost {
    color: #ffffff;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.button:hover,
.hero-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 38px rgba(15, 23, 42, 0.18);
}

.hero-control {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    color: #ffffff;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.50);
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.76);
}

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

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

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

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

.hero-dot.active {
    width: 34px;
    background: #ffffff;
}

.section {
    margin: 0 auto 68px;
}

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

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--amber-600);
    border-radius: 12px;
    background: #fffbeb;
}

.section h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    color: var(--slate-800);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
}

.section-lead,
.page-hero p,
.category-intro,
.detail-copy .lead {
    color: var(--muted);
}

.view-more {
    color: var(--amber-600);
    font-weight: 800;
}

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

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

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

.horizontal-row {
    display: flex;
    gap: 22px;
    padding: 4px 0 18px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
}

.horizontal-row .movie-card {
    width: 300px;
    flex: 0 0 300px;
    scroll-snap-align: start;
}

.movie-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.movie-card figure {
    position: relative;
    aspect-ratio: 16 / 9;
    margin: 0;
    overflow: hidden;
    background: #cbd5e1;
}

.movie-card figure::after,
.category-tile figure::after,
.side-card figure::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 62%);
    transition: opacity 0.25s ease;
}

.movie-card:hover figure::after,
.category-tile:hover figure::after,
.side-card:hover figure::after {
    opacity: 1;
}

.movie-card img,
.category-tile img,
.side-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.42s ease;
}

.movie-card:hover img,
.category-tile:hover img,
.side-card:hover img {
    transform: scale(1.08);
}

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 4px 10px;
    font-size: 12px;
}

.card-duration,
.rank-badge {
    position: absolute;
    right: 10px;
    z-index: 2;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.72);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.card-duration {
    bottom: 10px;
    padding: 4px 8px;
}

.rank-badge {
    top: 10px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    display: -webkit-box;
    min-height: 2.8em;
    margin: 0 0 9px;
    overflow: hidden;
    color: var(--slate-800);
    font-size: 17px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: var(--amber-600);
}

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

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #64748b;
    font-size: 12px;
}

.score {
    color: var(--amber-600);
    font-weight: 800;
}

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

.tag-row span,
.detail-tag {
    display: inline-flex;
    color: #1d4ed8;
    background: #eff6ff;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 700;
}

.panel {
    border-radius: 24px;
    padding: 28px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.page-hero {
    margin: 38px auto 34px;
    padding: 34px;
    border-radius: 26px;
    color: var(--slate-800);
    background: linear-gradient(135deg, #ffffff, #f8fafc 45%, #e2e8f0);
    box-shadow: var(--shadow-soft);
}

.page-hero p {
    max-width: 840px;
    margin: 14px 0 0;
}

.filter-panel {
    margin-bottom: 26px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.filter-title {
    margin-bottom: 14px;
    color: var(--slate-800);
    font-weight: 900;
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 12px;
}

.filter-grid label {
    display: grid;
    gap: 7px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.filter-grid input,
.filter-grid select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 0 12px;
    color: var(--slate-800);
    background: #f8fafc;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-grid input:focus,
.filter-grid select:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.empty-state {
    display: none;
    padding: 34px;
    color: #64748b;
    text-align: center;
    border-radius: 18px;
    background: #ffffff;
}

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

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

.category-tile {
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-tile figure {
    position: relative;
    aspect-ratio: 16 / 9;
    margin: 0;
    overflow: hidden;
    background: #cbd5e1;
}

.category-tile .tile-body {
    padding: 20px;
}

.category-tile h2 {
    margin: 0 0 10px;
    color: var(--slate-800);
    font-size: 22px;
}

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

.category-tagline {
    display: inline-flex;
    color: var(--amber-600);
    font-weight: 900;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 360px;
    gap: 28px;
    margin: 36px auto 64px;
}

.breadcrumb {
    margin: 30px auto 0;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--amber-600);
    font-weight: 800;
}

.player-shell,
.detail-copy,
.sidebar-panel {
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.player-shell {
    overflow: hidden;
}

.player-box {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000000;
}

.player-box video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.32));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    width: 74px;
    height: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
    box-shadow: 0 16px 34px rgba(234, 88, 12, 0.34);
    font-size: 28px;
}

.player-overlay strong {
    display: block;
    font-size: 20px;
}

.player-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), transparent);
    transition: opacity 0.2s ease;
}

.player-box:hover .player-controls,
.player-controls:focus-within {
    opacity: 1;
}

.player-controls button {
    min-width: 46px;
    min-height: 38px;
    border: 0;
    border-radius: 10px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.82);
    font-weight: 800;
}

.player-controls button:hover {
    background: var(--amber-600);
}

.player-error {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.78);
    text-align: center;
    padding: 24px;
}

.player-error.show {
    display: flex;
}

.detail-copy {
    margin-top: 22px;
    padding: 28px;
}

.detail-copy .lead {
    margin: 12px 0 20px;
    font-size: 17px;
}

.detail-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 24px;
}

.detail-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    color: #334155;
    background: #f1f5f9;
    font-size: 14px;
    font-weight: 800;
}

.detail-copy h2 {
    margin: 28px 0 12px;
    color: var(--slate-800);
    font-size: 22px;
}

.detail-copy p {
    margin: 0;
    color: #475569;
    line-height: 1.85;
}

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

.sidebar-panel {
    position: sticky;
    top: 104px;
    padding: 22px;
}

.sidebar-panel h2 {
    margin: 0 0 18px;
    color: var(--slate-800);
    font-size: 22px;
}

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

.side-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.side-card figure {
    position: relative;
    aspect-ratio: 16 / 10;
    margin: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #cbd5e1;
}

.side-card figure span {
    position: absolute;
    right: 6px;
    bottom: 6px;
    z-index: 2;
    padding: 2px 6px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
}

.side-card strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--slate-800);
    font-size: 14px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.side-card p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 12px;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 38px;
    padding: 48px 0;
}

.footer-grid h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 18px;
}

.footer-grid p {
    margin: 8px 0 0;
    color: #94a3b8;
}

.footer-grid a:hover {
    color: var(--amber-400);
}

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

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

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

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero {
        height: 560px;
    }

    .hero-copy {
        padding: 44px 0 56px;
    }

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

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

    .filter-grid .search-label {
        grid-column: 1 / -1;
    }

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

    .sidebar-panel {
        position: static;
    }

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

@media (max-width: 620px) {
    .container {
        width: min(100% - 24px, 1200px);
    }

    .header-inner {
        height: 66px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .brand-copy strong {
        font-size: 20px;
    }

    .brand-copy small {
        display: none;
    }

    .hero {
        height: 620px;
        margin-bottom: 44px;
    }

    .hero-control {
        display: none;
    }

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

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

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

    .horizontal-row .movie-card {
        width: 82vw;
        flex-basis: 82vw;
    }

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

    .page-hero,
    .panel,
    .detail-copy {
        padding: 22px;
    }

    .side-card {
        grid-template-columns: 104px minmax(0, 1fr);
    }
}
