* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #080b12;
    --panel: rgba(17, 24, 39, 0.82);
    --panel-strong: rgba(31, 41, 55, 0.9);
    --line: rgba(245, 158, 11, 0.26);
    --text: #f9fafb;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --sunset: #f59e0b;
    --twilight: #f97316;
    --danger: #ef4444;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(217, 119, 6, 0.2), transparent 34rem),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.16), transparent 30rem),
        linear-gradient(180deg, #090d16 0%, #111827 52%, #080b12 100%);
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 11, 18, 0.84);
    backdrop-filter: blur(14px);
}

.nav-wrap {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #111827;
    background: linear-gradient(135deg, var(--sunset), #fbbf24 52%, var(--twilight));
    box-shadow: 0 10px 34px rgba(249, 115, 22, 0.38);
}

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

.nav-link {
    padding: 10px 15px;
    border-radius: 999px;
    color: var(--muted);
    transition: color 0.2s ease, background 0.2s ease;
}

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

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    padding: 9px;
}

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

.hero-carousel {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
}

.hero-track {
    position: relative;
    min-height: 72vh;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    padding: 72px 0 88px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
    background-image:
        linear-gradient(90deg, rgba(8, 11, 18, 0.98) 0%, rgba(8, 11, 18, 0.84) 42%, rgba(8, 11, 18, 0.4) 100%),
        var(--hero-image);
    background-size: cover;
    background-position: center;
}

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

.hero-backdrop {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, transparent, var(--bg));
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 56px;
}

.hero-copy h1 {
    max-width: 780px;
    margin: 12px 0 18px;
    font-size: clamp(40px, 7vw, 74px);
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 760px;
    color: var(--muted);
    font-size: 18px;
}

.eyebrow,
.section-kicker {
    color: var(--sunset);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.hero-tags span,
.tag-row span {
    padding: 5px 10px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 999px;
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.1);
    font-size: 12px;
}

.tag-row.large span {
    font-size: 13px;
    padding: 7px 12px;
}

.hero-actions,
.detail-info .btn {
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn.primary {
    border-color: transparent;
    background: linear-gradient(135deg, #d97706, #f59e0b 48%, #f97316);
    box-shadow: 0 16px 40px rgba(249, 115, 22, 0.28);
}

.btn.secondary {
    margin-left: 10px;
    background: rgba(255, 255, 255, 0.09);
}

.btn.ghost {
    margin-left: 10px;
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.1);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

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

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

.hero-dot.is-active {
    width: 36px;
    background: linear-gradient(90deg, var(--sunset), var(--twilight));
}

.search-panel,
.section-block {
    margin-top: 58px;
}

.search-panel {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 28px;
    align-items: start;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.12), rgba(31, 41, 55, 0.74));
    box-shadow: var(--shadow);
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.content-card h2 {
    margin: 8px 0 0;
}

.search-box {
    position: relative;
}

.search-box input,
.filter-tools input,
.filter-tools select {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    outline: none;
    color: #fff;
    background: rgba(0, 0, 0, 0.28);
    padding: 14px 18px;
}

.search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 25;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: rgba(8, 11, 18, 0.98);
    box-shadow: var(--shadow);
    display: none;
}

.search-results.is-open {
    display: block;
}

.search-result-item {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.search-result-item:last-child {
    border-bottom: 0;
}

.search-result-item img {
    width: 58px;
    height: 74px;
    border-radius: 12px;
    object-fit: cover;
}

.search-result-item strong {
    display: block;
    margin-top: 4px;
}

.search-result-item span {
    color: var(--soft);
    font-size: 12px;
}

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

.section-heading h2,
.search-panel h2,
.page-hero h1 {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.08;
}

.section-heading.slim h2 {
    font-size: 30px;
}

.section-more {
    color: #fcd34d;
    font-weight: 700;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius);
    background: rgba(17, 24, 39, 0.74);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.36);
    background: rgba(31, 41, 55, 0.86);
}

.poster {
    position: relative;
    overflow: hidden;
    display: block;
}

.poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.movie-card:hover .poster img,
.category-card:hover img,
.category-overview-card:hover img {
    transform: scale(1.05);
}

.poster-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #111827;
    background: #fbbf24;
    font-size: 12px;
    font-weight: 800;
}

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

.card-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--soft);
    font-size: 12px;
}

.movie-card h3 {
    margin: 8px 0;
    font-size: 18px;
    line-height: 1.28;
}

.movie-card p,
.rank-item p,
.page-hero p,
.content-card p,
.site-footer p,
.detail-one-line {
    color: var(--muted);
}

.movie-card p {
    min-height: 48px;
    font-size: 14px;
}

.movie-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(210px, 1fr);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: none;
}

.movie-row::-webkit-scrollbar {
    display: none;
}

.movie-card.compact .movie-card-body {
    padding: 14px;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 16px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 20px;
    background: rgba(17, 24, 39, 0.72);
}

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

.rank-cover {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.rank-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.rank-cover span {
    position: absolute;
    left: 8px;
    top: 8px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #111827;
    background: linear-gradient(135deg, #fcd34d, #f97316);
    font-weight: 900;
}

.rank-item h3 {
    margin: 6px 0;
    font-size: 20px;
}

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

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 16px;
    border-radius: 20px;
    background: rgba(17, 24, 39, 0.7);
}

.category-card::after,
.category-overview-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(8, 11, 18, 0.88) 100%);
}

.category-card img,
.category-overview-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card span,
.category-card strong {
    position: relative;
    z-index: 1;
}

.category-card span {
    color: #fcd34d;
    font-weight: 800;
}

.category-card strong {
    margin-top: 4px;
    font-size: 14px;
}

.page-main {
    padding: 48px 0 80px;
}

.page-hero {
    padding: 48px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    background:
        radial-gradient(circle at right, rgba(249, 115, 22, 0.24), transparent 30rem),
        linear-gradient(135deg, rgba(31, 41, 55, 0.9), rgba(17, 24, 39, 0.68));
    box-shadow: var(--shadow);
}

.page-hero p {
    max-width: 760px;
    margin-top: 14px;
    font-size: 17px;
}

.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.category-overview-card {
    position: relative;
    overflow: hidden;
    min-height: 230px;
    display: flex;
    align-items: end;
    border-radius: 24px;
    background: rgba(17, 24, 39, 0.7);
}

.category-overview-card div {
    position: relative;
    z-index: 1;
    padding: 20px;
}

.category-overview-card span {
    color: #fcd34d;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.category-overview-card h2 {
    margin: 6px 0;
}

.category-overview-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.filter-tools {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 12px;
    margin-top: 24px;
}

.filter-tools select {
    appearance: none;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: var(--soft);
    margin-bottom: 24px;
}

.breadcrumb a {
    color: #fcd34d;
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 34px;
    align-items: center;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.9), rgba(8, 11, 18, 0.72));
    box-shadow: var(--shadow);
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
}

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

.detail-info h1 {
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.02;
}

.detail-one-line {
    max-width: 760px;
    font-size: 18px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.detail-meta-grid div,
.content-card {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    background: rgba(17, 24, 39, 0.72);
}

.detail-meta-grid span {
    display: block;
    color: var(--soft);
    font-size: 12px;
}

.detail-meta-grid strong {
    display: block;
    margin-top: 4px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.72));
    transition: opacity 0.2s ease;
}

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

.play-circle {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    padding-left: 5px;
    color: #111827;
    background: linear-gradient(135deg, #fcd34d, #f97316);
    font-size: 30px;
    box-shadow: 0 20px 55px rgba(249, 115, 22, 0.38);
}

.detail-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 22px;
    margin-top: 32px;
}

.content-card h2 {
    color: #fcd34d;
}

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

.site-footer {
    margin-top: 80px;
    padding: 44px 0 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 11, 18, 0.72);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: start;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 10px 24px;
    color: var(--muted);
}

.copyright {
    margin-top: 22px;
    color: var(--soft);
    font-size: 13px;
}

.is-hidden-card {
    display: none;
}

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

    .hero-inner,
    .detail-hero,
    .split-layout,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        width: min(320px, 72vw);
        margin: 0 auto;
    }
}

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

    .mobile-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 12px;
        right: 12px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        background: rgba(8, 11, 18, 0.98);
    }

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

    .hero-carousel,
    .hero-track {
        min-height: 760px;
    }

    .hero-slide {
        padding: 44px 0 80px;
    }

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

    .btn.secondary,
    .btn.ghost {
        margin-left: 0;
        margin-top: 10px;
    }

    .hero-actions {
        display: grid;
        gap: 10px;
    }

    .search-panel,
    .filter-tools,
    .footer-grid,
    .detail-meta-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    .movie-card p {
        min-height: auto;
    }

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

    .rank-item,
    .compact-rank .rank-item {
        grid-template-columns: 78px 1fr;
    }

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

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

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