:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --amber: #f59e0b;
    --orange: #ea580c;
    --red: #ef4444;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius: 22px;
}

* {
    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 top left, rgba(245, 158, 11, 0.14), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(234, 88, 12, 0.12), transparent 28rem),
        var(--bg);
    color: var(--text);
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

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

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

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

.brand-text {
    display: grid;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 21px;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
}

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

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

.nav-link {
    color: var(--soft);
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fbbf24;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.78);
    color: white;
    padding: 10px;
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    background: white;
    margin: 5px 0;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

.mobile-nav.is-open {
    display: grid;
}

.mobile-nav a {
    padding: 12px;
    color: var(--soft);
    border-radius: 12px;
}

.mobile-nav a:hover {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
}

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

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

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

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

.hero-overlay,
.hero-side-overlay,
.detail-bg-mask {
    position: absolute;
    inset: 0;
}

.hero-overlay {
    background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.78) 28%, rgba(2, 6, 23, 0.18) 72%);
}

.hero-side-overlay {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(15, 23, 42, 0.42) 42%, rgba(2, 6, 23, 0.06) 100%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 80px;
    transform: translateX(-50%);
    max-width: 1180px;
}

.hero-content h1 {
    max-width: 760px;
    margin: 16px 0;
    font-size: clamp(38px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 680px;
    margin: 0;
    color: #e2e8f0;
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.75;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.9);
    color: white;
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.25);
}

.hero-tags,
.tag-row,
.detail-meta,
.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-tags {
    margin-top: 18px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-meta-line span {
    display: inline-flex;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.62);
    color: #e2e8f0;
    padding: 6px 10px;
    font-size: 12px;
}

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

.primary-button,
.secondary-button,
.small-play,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    min-height: 48px;
    padding: 0 22px;
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.28);
}

.secondary-button {
    min-height: 48px;
    padding: 0 22px;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
}

.primary-button:hover,
.secondary-button:hover,
.small-play:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 10;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(15, 23, 42, 0.62);
    color: white;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
}

.quick-panel {
    position: relative;
    z-index: 20;
    margin-top: -34px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 18px;
}

.quick-search span {
    font-weight: 900;
    color: #fbbf24;
}

.quick-search form,
.search-panel,
.inline-filter {
    display: flex;
    gap: 12px;
}

.quick-search input,
.search-panel input,
.inline-filter input,
.inline-filter select,
.search-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.72);
    color: white;
    padding: 0 16px;
    outline: none;
}

.quick-search button {
    min-height: 48px;
    border: 0;
    border-radius: 14px;
    padding: 0 20px;
    color: white;
    font-weight: 800;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    cursor: pointer;
}

.quick-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.category-pill {
    min-height: 92px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.52);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-pill:hover,
.category-card:hover,
.category-overview-card:hover,
.movie-card:hover,
.story-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.42);
}

.category-pill strong {
    display: block;
    color: white;
    font-size: 17px;
}

.category-pill span,
.category-card p,
.category-overview-card p,
.footer-grid p {
    color: var(--muted);
    line-height: 1.7;
}

.section {
    padding: 72px 0 0;
}

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

.left-heading {
    align-items: start;
    flex-direction: column;
}

.section-heading span,
.inner-hero span {
    color: #fbbf24;
    font-weight: 900;
}

.section-heading h2,
.inner-hero h1,
.category-panel h2,
.story-card h2 {
    margin: 6px 0 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
}

.section-heading a,
.text-link {
    color: #fbbf24;
}

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

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

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

.movie-card:hover {
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

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

.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-shine {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.92), transparent);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    color: white;
}

.movie-card-body {
    padding: 16px;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 19px;
    line-height: 1.25;
}

.movie-card p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-card h3 {
    font-size: 16px;
}

.compact-card p {
    -webkit-line-clamp: 2;
}

.movie-meta-line {
    gap: 6px;
}

.movie-meta-line span {
    padding: 4px 8px;
    color: #cbd5e1;
}

.split-section {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    align-items: start;
}

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

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

.ranking-number {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    font-weight: 900;
}

.ranking-thumb {
    display: block;
    width: 72px;
    height: 92px;
    overflow: hidden;
    border-radius: 14px;
    background: #111827;
}

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

.ranking-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.ranking-info p {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.5;
}

.small-play {
    min-height: 38px;
    padding: 0 14px;
    color: white;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.category-panel,
.story-card,
.category-overview-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}

.category-panel {
    padding: 24px;
    position: sticky;
    top: 96px;
}

.category-card-grid {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.category-card {
    display: block;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.52);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card span {
    font-weight: 900;
    color: white;
}

.category-card p {
    margin: 6px 0 0;
    font-size: 14px;
}

.inner-hero {
    padding: 74px 0 30px;
}

.inner-hero p {
    max-width: 780px;
    color: var(--muted);
    line-height: 1.8;
    font-size: 18px;
}

.search-panel,
.inline-filter {
    max-width: 760px;
    margin-top: 22px;
}

.inline-filter select,
.search-panel select {
    max-width: 180px;
}

.category-overview-grid {
    display: grid;
    gap: 20px;
    padding-bottom: 40px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 22px;
    padding: 18px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.category-covers img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
    background: #111827;
}

.category-overview-card h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

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

.mini-links a {
    padding: 7px 10px;
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.1);
}

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

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(14px) saturate(1.15);
    transform: scale(1.08);
    opacity: 0.42;
}

.detail-bg-mask {
    background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.86) 42%, rgba(2, 6, 23, 0.46) 100%);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 44px 0 72px;
}

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

.breadcrumbs a {
    color: #fbbf24;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 34px;
    align-items: end;
}

.detail-poster {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #111827;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-info h1 {
    margin: 18px 0 14px;
    max-width: 860px;
    font-size: clamp(36px, 5vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.detail-one-line {
    max-width: 820px;
    color: #e2e8f0;
    line-height: 1.8;
    font-size: 19px;
}

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

.player-section {
    margin-top: -56px;
    position: relative;
    z-index: 8;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(245, 158, 11, 0.26);
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 18px;
    align-content: center;
    border: 0;
    color: white;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.82));
    cursor: pointer;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 20px 44px rgba(245, 158, 11, 0.32);
    font-size: 30px;
    padding-left: 5px;
}

.player-overlay strong {
    font-size: clamp(20px, 3vw, 34px);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.story-card {
    padding: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.story-card p {
    color: #dbeafe;
    line-height: 1.9;
    font-size: 17px;
}

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

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

.footer-grid h3 {
    margin: 0 0 14px;
    color: white;
}

.footer-brand {
    margin-bottom: 14px;
}

.footer-links {
    display: grid;
    gap: 10px;
}

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

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

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 18px;
    text-align: center;
    color: var(--muted);
}

.is-filter-hidden {
    display: none !important;
}

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

    .split-section,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .category-panel {
        position: static;
    }
}

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

    .mobile-menu-button {
        display: block;
    }

    .hero {
        min-height: 72vh;
    }

    .hero-content {
        bottom: 70px;
    }

    .hero-control {
        display: none;
    }

    .quick-search,
    .quick-search form,
    .search-panel,
    .inline-filter,
    .detail-layout,
    .category-overview-card,
    .ranking-row {
        grid-template-columns: 1fr;
    }

    .quick-search form,
    .search-panel,
    .inline-filter {
        flex-direction: column;
    }

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

    .category-overview-card {
        display: block;
    }

    .category-covers {
        margin-bottom: 18px;
    }

    .ranking-row {
        display: grid;
        grid-template-columns: 48px 72px 1fr;
    }

    .ranking-row .small-play {
        grid-column: 1 / -1;
    }

    .detail-layout {
        gap: 22px;
    }

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

    .player-section {
        margin-top: -28px;
    }
}

@media (max-width: 520px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .brand-text strong {
        font-size: 17px;
    }

    .brand-text small {
        display: none;
    }

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

    .section-heading {
        display: block;
    }

    .hero-content h1 {
        font-size: 36px;
    }
}
