:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --orange-600: #ea580c;
    --orange-500: #f97316;
    --orange-400: #fb923c;
    --blue-600: #2563eb;
    --white: #ffffff;
    --shadow: 0 20px 40px rgba(15, 23, 42, .12);
    --radius-xl: 24px;
    --radius-lg: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--slate-800);
    background: linear-gradient(135deg, var(--slate-50), var(--slate-100));
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, var(--slate-800), var(--slate-900));
    color: var(--white);
    box-shadow: 0 10px 30px rgba(2, 6, 23, .28);
}

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

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

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--orange-400), var(--orange-600));
    box-shadow: 0 10px 20px rgba(249, 115, 22, .32);
}

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

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 15px;
}

.nav-link {
    transition: color .2s ease, opacity .2s ease;
    opacity: .92;
}

.nav-link:hover,
.nav-link.active {
    color: var(--orange-400);
    opacity: 1;
}

.nav-toggle {
    display: none;
    border: 0;
    color: var(--white);
    background: transparent;
    font-size: 28px;
}

.hero {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    background: var(--slate-900);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: stretch;
}

.hero-slides {
    position: relative;
    min-height: 600px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 72px max(32px, calc((100vw - 1280px) / 2 + 24px));
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity .65s ease, transform .65s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.hero-copy {
    max-width: 760px;
    color: var(--white);
}

.hero-kicker {
    display: inline-flex;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(10px);
    color: #fed7aa;
    font-weight: 700;
}

.hero h1 {
    margin: 0 0 14px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -.04em;
}

.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.12;
}

.hero p {
    max-width: 650px;
    margin: 0 0 32px;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
    color: #e5e7eb;
}

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

.primary-btn,
.ghost-btn,
.home-search-form button,
.side-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 13px 24px;
    font-weight: 800;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.primary-btn,
.home-search-form button,
.side-more {
    color: var(--white);
    background: var(--orange-500);
    box-shadow: 0 14px 24px rgba(249, 115, 22, .28);
}

.primary-btn:hover,
.home-search-form button:hover,
.side-more:hover {
    background: var(--orange-600);
    transform: translateY(-2px);
}

.ghost-btn {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, .32);
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(10px);
}

.ghost-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, .18);
}

.hero-panel {
    position: relative;
    z-index: 4;
    margin: 72px 32px 72px 0;
    padding: 24px;
    align-self: center;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, .62);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
    color: var(--white);
}

.hero-panel h2 {
    margin: 0 0 18px;
    font-size: 22px;
}

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

.compact-card {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .08);
    transition: background .2s ease, transform .2s ease;
}

.compact-card:hover {
    background: rgba(249, 115, 22, .88);
    transform: translateX(2px);
}

.compact-poster {
    flex: 0 0 82px;
    height: 56px;
    overflow: hidden;
    border-radius: 12px;
}

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

.compact-info {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 5px;
}

.compact-info strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-info em {
    font-style: normal;
    color: #cbd5e1;
    font-size: 12px;
}

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

.hero-dots button {
    width: 32px;
    height: 8px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, .35);
}

.hero-dots button.active {
    background: var(--orange-500);
}

.home-search-band,
.section-wrap,
.category-band,
.detail-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px;
}

.home-search-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 28px;
    align-items: center;
}

.home-search-band h2,
.section-head h2,
.page-hero h1 {
    margin: 0;
}

.home-search-band p,
.page-hero p {
    color: var(--slate-600);
    line-height: 1.7;
}

.home-search-form,
.search-box {
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 999px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.home-search-form input,
.search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 16px 20px;
    background: transparent;
}

.home-search-form button {
    margin: 6px;
    border-radius: 999px;
}

.section-wrap.soft {
    max-width: none;
    background: var(--slate-50);
}

.section-wrap.soft > * {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

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

.section-head > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-head a {
    color: var(--orange-600);
    font-weight: 700;
}

.section-head.dark {
    color: var(--white);
}

.section-head.dark a {
    color: #fed7aa;
}

.section-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange-400), var(--orange-600));
    box-shadow: 0 12px 24px rgba(249, 115, 22, .2);
}

.movie-grid {
    display: grid;
    gap: 24px;
}

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .09);
    transition: transform .24s ease, box-shadow .24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 42px rgba(15, 23, 42, .16);
}

.poster-link {
    position: relative;
    display: block;
    height: 220px;
    overflow: hidden;
    background: var(--slate-900);
}

.featured-card .poster-link {
    height: 260px;
}

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

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(0, 0, 0, .62), transparent);
}

.badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
}

.badge-region {
    left: 14px;
    top: 14px;
    padding: 6px 10px;
    background: var(--orange-500);
}

.badge-time {
    right: 12px;
    bottom: 12px;
    padding: 5px 8px;
    background: rgba(0, 0, 0, .72);
}

.card-body {
    padding: 18px;
}

.card-body h2 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
}

.card-body h2 a:hover {
    color: var(--orange-500);
}

.card-body p {
    margin: 0 0 14px;
    color: var(--slate-600);
    line-height: 1.62;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-row,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    color: var(--slate-600);
    font-size: 14px;
}

.category-band {
    max-width: none;
    background: linear-gradient(90deg, var(--slate-800), var(--slate-900));
}

.category-band > * {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

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

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

.category-card {
    min-height: 160px;
    padding: 28px;
    display: grid;
    align-content: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--radius-lg);
    color: var(--white);
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(12px);
    transition: transform .24s ease, background .24s ease, box-shadow .24s ease;
}

.category-grid.overview .category-card {
    color: var(--slate-800);
    background: var(--white);
    box-shadow: var(--shadow);
}

.category-card:hover {
    transform: translateY(-5px) scale(1.01);
    background: var(--orange-500);
    color: var(--white);
    box-shadow: 0 20px 40px rgba(249, 115, 22, .28);
}

.category-card span {
    font-size: 38px;
}

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

.category-card em {
    font-style: normal;
    color: currentColor;
    opacity: .78;
    line-height: 1.55;
}

.page-hero {
    color: var(--white);
    background: linear-gradient(90deg, var(--slate-800), var(--slate-900));
}

.small-hero {
    padding: 72px 24px;
}

.small-hero > div {
    max-width: 1280px;
    margin: 0 auto;
}

.page-hero span {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(249, 115, 22, .2);
    color: #fed7aa;
    font-weight: 800;
}

.page-hero h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.page-hero p {
    max-width: 760px;
    color: #d1d5db;
    font-size: 18px;
}

.collection-toolbar {
    position: sticky;
    top: 76px;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 28px;
    padding: 14px;
    border-radius: var(--radius-lg);
    background: rgba(248, 250, 252, .88);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

.search-box {
    box-shadow: none;
    border: 1px solid var(--slate-200);
}

.search-box span {
    padding-left: 16px;
}

.collection-toolbar select {
    border: 1px solid var(--slate-200);
    border-radius: 999px;
    padding: 14px 16px;
    background: var(--white);
    outline: none;
}

.view-buttons {
    display: inline-flex;
    padding: 4px;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid var(--slate-200);
}

.view-buttons button {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    background: transparent;
    color: var(--slate-600);
}

.view-buttons button.active {
    color: var(--white);
    background: var(--orange-500);
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.pill {
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--white);
    color: var(--slate-700);
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}

.pill.active,
.pill:hover {
    color: var(--white);
    background: var(--orange-500);
}

.movie-grid.list-view {
    grid-template-columns: 1fr;
}

.movie-grid.list-view .movie-card {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
}

.movie-grid.list-view .poster-link {
    height: 100%;
    min-height: 170px;
}

.movie-card.is-hidden,
.rank-card.is-hidden {
    display: none !important;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 64px 150px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 16px;
}

.rank-card:hover {
    transform: translateY(-3px);
}

.rank-number {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange-400), var(--orange-600));
    color: var(--white);
    font-weight: 900;
}

.rank-poster {
    height: 92px;
    overflow: hidden;
    border-radius: 14px;
}

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

.rank-content h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-content p {
    margin: 0 0 10px;
    color: var(--slate-600);
    line-height: 1.6;
}

.detail-wrap {
    padding-top: 28px;
}

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

.breadcrumb a:hover {
    color: var(--orange-500);
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.detail-main {
    display: grid;
    gap: 22px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #000;
    box-shadow: 0 24px 60px rgba(2, 6, 23, .24);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    border: 0;
    padding: 0;
    color: var(--white);
    background: #000;
    transition: opacity .25s ease, visibility .25s ease;
}

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

.player-bg,
.player-shade {
    position: absolute;
    inset: 0;
}

.player-bg {
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
    transform: scale(1.02);
}

.player-shade {
    background: radial-gradient(circle, rgba(249, 115, 22, .22), rgba(2, 6, 23, .78));
}

.play-circle {
    position: relative;
    z-index: 5;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    margin: auto;
    border-radius: 999px;
    background: rgba(249, 115, 22, .92);
    box-shadow: 0 18px 36px rgba(249, 115, 22, .34);
    font-size: 34px;
    transform: translateX(2px);
}

.detail-card,
.side-card {
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow);
}

.detail-card {
    padding: 28px;
}

.detail-card h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

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

.detail-card p {
    margin: 0 0 16px;
    color: var(--slate-700);
    line-height: 1.85;
}

.lead-text {
    font-weight: 700;
    color: var(--slate-800) !important;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 8px;
}

.chip {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--orange-600);
    background: #ffedd5;
    font-size: 13px;
    font-weight: 700;
}

.genre-line {
    padding-top: 18px;
    border-top: 1px solid var(--slate-200);
    color: var(--slate-600) !important;
    font-size: 14px;
}

.detail-side {
    position: sticky;
    top: 92px;
}

.side-card {
    padding: 22px;
}

.side-card h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

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

.side-card .compact-card {
    color: var(--slate-800);
    background: var(--slate-50);
}

.side-card .compact-card:hover {
    color: var(--white);
    background: var(--orange-500);
}

.side-card .compact-info em {
    color: var(--slate-600);
}

.side-card .compact-card:hover .compact-info em {
    color: #ffedd5;
}

.side-more {
    width: 100%;
    margin-top: 18px;
    border-radius: 14px;
}

.site-footer {
    color: #cbd5e1;
    background: var(--slate-900);
    padding: 52px 24px 24px;
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-weight: 800;
    font-size: 20px;
}

.footer-logo span {
    color: var(--orange-400);
}

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

.site-footer p,
.site-footer li {
    line-height: 1.7;
}

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

.site-footer a:hover {
    color: var(--orange-400);
}

.footer-bottom {
    max-width: 1280px;
    margin: 34px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, .25);
    text-align: center;
    font-size: 14px;
}

@media (max-width: 1100px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        display: none;
    }

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

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

    .detail-side {
        position: static;
    }

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

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

    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 64px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 18px 18px;
        background: var(--slate-900);
        border-top: 1px solid rgba(148, 163, 184, .2);
    }

    .site-nav.is-open {
        display: flex;
    }

    .nav-link {
        padding: 12px 4px;
    }

    .hero,
    .hero-slides {
        min-height: 560px;
    }

    .hero-slide {
        padding: 54px 20px 76px;
    }

    .home-search-band {
        grid-template-columns: 1fr;
    }

    .collection-toolbar {
        position: static;
        grid-template-columns: 1fr;
    }

    .grid-3,
    .grid-4,
    .category-grid,
    .category-grid.overview {
        grid-template-columns: 1fr;
    }

    .movie-grid.list-view .movie-card,
    .rank-card {
        grid-template-columns: 1fr;
    }

    .rank-number {
        width: 42px;
        height: 42px;
    }

    .rank-poster {
        height: 190px;
    }

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