:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #f59e0b;
    --accent-2: #ea580c;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: radial-gradient(circle at 12% 8%, rgba(245, 158, 11, 0.18), transparent 28%), radial-gradient(circle at 88% 18%, rgba(234, 88, 12, 0.16), transparent 30%), var(--bg);
    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 {
    display: block;
    max-width: 100%;
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 16px 40px rgba(245, 158, 11, 0.28);
}

.brand-text {
    display: grid;
    gap: 1px;
}

.brand-text strong {
    font-size: 19px;
    line-height: 1.1;
}

.brand-text small {
    color: var(--muted);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--soft);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(245, 158, 11, 0.14);
}

.nav-link.subtle {
    color: var(--muted);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(15, 23, 42, 0.8);
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 999px;
    background: #fff;
}

.mobile-nav {
    display: none;
    padding: 0 18px 18px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.96);
}

.mobile-nav.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

main {
    min-height: 60vh;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.58fr);
    gap: 46px;
    align-items: center;
    padding: 88px max(24px, calc((100vw - 1440px) / 2 + 24px)) 96px;
    opacity: 0;
    transform: scale(1.02);
    background-position: center;
    background-size: cover;
    transition: opacity 0.72s ease, transform 0.72s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 7px 14px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 999px;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.11);
    font-size: 14px;
    font-weight: 700;
}

.hero-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-copy h2 {
    margin: 0 0 14px;
    color: #fde68a;
    font-size: clamp(26px, 3.4vw, 48px);
    line-height: 1.1;
}

.hero-copy p {
    max-width: 680px;
    margin: 0;
    color: #d1d5db;
    font-size: clamp(16px, 1.35vw, 21px);
}

.hero-tags,
.card-tags,
.detail-meta,
.inline-meta,
.tag-links,
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin: 28px 0;
}

.hero-tags span,
.card-tags span,
.detail-meta span,
.inline-meta span,
.tag-links a,
.filter-chip {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.68);
}

.hero-tags span {
    padding: 8px 13px;
}

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

.primary-button,
.ghost-button,
.section-more,
.search-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-form button {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 16px 40px rgba(245, 158, 11, 0.24);
}

.ghost-button,
.section-more {
    border: 1px solid var(--line);
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.search-form button:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    box-shadow: var(--shadow);
    aspect-ratio: 2 / 3;
    background: rgba(15, 23, 42, 0.6);
}

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

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #fff;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 30px;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

.hero-dot.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.content-section {
    max-width: 1440px;
    margin: 0 auto;
    padding: 54px 24px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.1;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

.search-band {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 560px);
    gap: 22px;
    align-items: center;
    margin-top: -42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
}

.search-band h2 {
    margin: 0 0 6px;
}

.search-band p {
    margin: 0;
    color: var(--muted);
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #fff;
    background: rgba(2, 6, 23, 0.76);
    padding: 0 18px;
    outline: none;
}

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

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

.category-tile {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background-position: center;
    background-size: cover;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-tile span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    color: #fbbf24;
    font-size: 30px;
    line-height: 1;
}

.category-tile small {
    color: var(--soft);
}

.category-tile.plain {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.92));
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.48);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.8), transparent 54%);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 7px 11px;
    background: rgba(245, 158, 11, 0.86);
}

.rank-badge {
    left: 12px;
    top: 12px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.card-body {
    padding: 14px;
}

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

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

.movie-card h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.28;
}

.movie-card p {
    min-height: 46px;
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 13px;
}

.card-meta strong {
    color: #fbbf24;
}

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

.movie-card.compact h2 {
    font-size: 15px;
}

.movie-card.compact p {
    display: none;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.7fr);
    gap: 22px;
}

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

.list-card {
    display: grid;
    grid-template-columns: auto 82px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
}

.list-rank {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    font-weight: 900;
    background: rgba(245, 158, 11, 0.88);
}

.list-cover {
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 2 / 3;
    background: #0f172a;
}

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

.list-card h2 {
    margin: 0 0 6px;
    font-size: 18px;
}

.list-card p {
    margin: 0 0 10px;
    color: var(--muted);
}

.inline-meta span {
    padding: 3px 9px;
    font-size: 12px;
}

.large-list .list-card {
    grid-template-columns: auto 96px minmax(0, 1fr);
}

.spotlight-card,
.text-panel,
.category-block,
.player-section,
.list-tools {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.2);
}

.spotlight-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
}

.spotlight-card span {
    color: #fbbf24;
    font-weight: 800;
}

.spotlight-card h2 {
    margin: 12px 0;
    font-size: 32px;
}

.spotlight-card p {
    color: var(--soft);
}

.rail-section {
    padding-top: 22px;
}

.rail-wrap {
    position: relative;
}

.movie-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 190px;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 12px;
}

.movie-rail .movie-card {
    scroll-snap-align: start;
}

.rail-button {
    position: absolute;
    top: 38%;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #fff;
    background: rgba(2, 6, 23, 0.82);
    cursor: pointer;
}

.rail-button.left {
    left: -14px;
}

.rail-button.right {
    right: -14px;
}

.inner-hero {
    min-height: 360px;
    padding: 86px max(24px, calc((100vw - 1440px) / 2 + 24px)) 64px;
    background-position: center;
    background-size: cover;
}

.small-hero {
    background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.18), transparent 30%), linear-gradient(135deg, #020617, #0f172a);
}

.inner-hero h1 {
    max-width: 900px;
    margin: 0 0 14px;
    font-size: clamp(34px, 4.5vw, 60px);
    line-height: 1.08;
}

.inner-hero p {
    max-width: 760px;
    margin: 0 0 24px;
    color: var(--soft);
    font-size: 18px;
}

.list-tools {
    display: grid;
    gap: 16px;
    margin-top: 24px;
    padding: 22px 24px;
}

.inline-search {
    max-width: 760px;
}

.wide-search {
    max-width: none;
}

.filter-chip {
    min-height: 38px;
    padding: 0 14px;
    cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
    color: #fff;
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.18);
}

.empty-state {
    display: none;
    margin: 24px 0 0;
    color: var(--muted);
}

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

.search-summary {
    margin-bottom: 16px;
    color: var(--muted);
}

.detail-hero {
    padding: 34px max(24px, calc((100vw - 1440px) / 2 + 24px)) 70px;
    background-position: center;
    background-size: cover;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 32px;
    color: var(--muted);
}

.breadcrumb a:hover {
    color: #fff;
}

.detail-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 26px;
    box-shadow: var(--shadow);
    aspect-ratio: 2 / 3;
    background: #0f172a;
}

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

.detail-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
}

.detail-copy p {
    max-width: 860px;
    color: var(--soft);
    font-size: 19px;
}

.detail-meta {
    margin: 20px 0;
}

.detail-meta span,
.tag-links a {
    padding: 7px 12px;
}

.tag-links {
    margin: 0 0 24px;
}

.player-section {
    padding: 24px;
}

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

.movie-video {
    width: 100%;
    height: 100%;
    background: #000;
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 0;
    color: #fff;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.26));
    cursor: pointer;
}

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

.video-play-icon {
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 20px 50px rgba(245, 158, 11, 0.36);
    font-size: 28px;
}

.video-overlay strong {
    font-size: 24px;
}

.video-overlay small {
    color: var(--soft);
}

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

.text-panel {
    padding: 26px;
}

.text-panel h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.text-panel p {
    margin: 0;
    color: var(--soft);
}

.prev-next {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-top: 0;
    padding-bottom: 0;
}

.prev-next a {
    flex: 1;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
}

.category-block {
    max-width: 1440px;
    margin: 0 auto 24px;
    padding: 24px;
}

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

.category-block h2 {
    margin: 0 0 6px;
    font-size: 28px;
}

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

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 30px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 42px 24px;
}

.footer-grid p,
.footer-bottom {
    color: var(--muted);
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.footer-links a {
    color: var(--soft);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 18px 24px 32px;
    border-top: 1px solid var(--line);
}

.back-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.9);
    cursor: pointer;
}

.back-top.show {
    display: block;
}

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

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

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

    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }
}

@media (max-width: 860px) {
    .hero-carousel {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: 70px;
    }

    .hero-poster {
        max-width: 240px;
    }

    .search-band,
    .two-column-section,
    .detail-layout,
    .detail-text-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

    .detail-poster {
        max-width: 220px;
    }

    .prev-next,
    .footer-bottom,
    .section-heading,
    .category-block-head {
        flex-direction: column;
        align-items: stretch;
    }
}

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

    .brand-text small {
        display: none;
    }

    .content-section,
    .player-section {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .list-card,
    .large-list .list-card {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .list-card .list-rank {
        display: none;
    }

    .list-cover {
        width: 64px;
    }

    .mobile-nav.open {
        grid-template-columns: 1fr;
    }
}
