:root {
    color-scheme: dark;
    --bg: #080b14;
    --bg-soft: #0f172a;
    --card: rgba(15, 23, 42, 0.82);
    --card-strong: rgba(17, 24, 39, 0.96);
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #a6b3c6;
    --muted-2: #748198;
    --brand: #60a5fa;
    --brand-2: #a78bfa;
    --brand-3: #f472b6;
    --gold: #fbbf24;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
    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", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(96, 165, 250, 0.18), transparent 32rem),
        radial-gradient(circle at 88% 12%, rgba(167, 139, 250, 0.16), transparent 30rem),
        linear-gradient(180deg, #070a13 0%, #0a0f1e 44%, #060914 100%);
    color: var(--text);
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

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

.header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.04em;
    font-size: 22px;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2), var(--brand-3));
    color: #fff;
    box-shadow: 0 12px 38px rgba(96, 165, 250, 0.38);
}

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

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

.nav-link:hover,
.nav-link.is-active {
    color: #fff;
    background: rgba(96, 165, 250, 0.16);
    transform: translateY(-1px);
}

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

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: #fff;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.75s ease, transform 0.75s ease;
    transform: scale(1.02);
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-position: center;
    background-size: cover;
    filter: blur(20px) saturate(1.14);
    transform: scale(1.08);
    opacity: 0.48;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 18%, rgba(96, 165, 250, 0.28), transparent 26rem),
        linear-gradient(90deg, rgba(8, 11, 20, 0.98), rgba(8, 11, 20, 0.68), rgba(8, 11, 20, 0.96));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 104px 0 84px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: center;
    gap: 64px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 18px;
    padding: 8px 12px;
    border: 1px solid rgba(96, 165, 250, 0.28);
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.12);
    color: #bfdbfe;
    font-size: 14px;
    font-weight: 800;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.08em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.9;
}

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

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: #dbeafe;
    font-size: 13px;
    font-weight: 700;
}

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

.tag-row span {
    padding: 5px 9px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    box-shadow: 0 16px 44px rgba(96, 165, 250, 0.34);
}

.btn.ghost {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.62);
    color: #e2e8f0;
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 34px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    box-shadow: var(--shadow);
    transform: rotate(2.5deg);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.58));
}

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

.hero-poster:hover img {
    transform: scale(1.06);
}

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

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

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

.quick-search {
    margin-top: -34px;
    position: relative;
    z-index: 5;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px 170px;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.search-field,
.select-field {
    display: grid;
    gap: 6px;
}

.search-field span,
.select-field span {
    padding-left: 2px;
    color: var(--muted-2);
    font-size: 12px;
    font-weight: 800;
}

.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    outline: none;
    background: rgba(2, 6, 23, 0.66);
    color: #fff;
    padding: 0 14px;
}

.search-panel input:focus,
.search-panel select:focus {
    border-color: rgba(96, 165, 250, 0.72);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.13);
}

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

.page-hero {
    padding: 64px 0 34px;
}

.page-hero h1 {
    max-width: 900px;
}

.page-hero p {
    max-width: 780px;
}

.category-section,
.movie-section,
.ranking-section,
.category-overview {
    margin-top: 72px;
}

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

.section-heading h2,
.category-block-head h2,
.story-card h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.06em;
}

.section-heading p,
.category-block-head p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-more {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #dbeafe;
    font-weight: 800;
    background: rgba(15, 23, 42, 0.62);
}

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

.category-tile {
    min-height: 180px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 80% 10%, rgba(96, 165, 250, 0.28), transparent 9rem),
        linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.72));
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(96, 165, 250, 0.42);
}

.category-tile span {
    display: block;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.category-tile strong {
    display: block;
    margin-top: 14px;
    color: #bfdbfe;
    line-height: 1.6;
    font-size: 14px;
}

.category-tile em {
    display: block;
    margin-top: 12px;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
    line-height: 1.7;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(96, 165, 250, 0.48);
    background: var(--card-strong);
}

.movie-card.is-hidden,
.ranking-item.is-hidden {
    display: none;
}

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

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

.movie-card:hover .movie-poster {
    transform: scale(1.07);
}

.year-badge,
.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.76);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    backdrop-filter: blur(12px);
}

.rank-badge {
    background: linear-gradient(135deg, var(--gold), #fb7185);
    color: #111827;
}

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

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted-2);
    font-size: 12px;
    font-weight: 800;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.32;
    letter-spacing: -0.04em;
}

.movie-card h3 a:hover {
    color: #bfdbfe;
}

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

.category-block {
    margin-bottom: 54px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.54);
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 52px 74px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-height: 104px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-item:hover {
    transform: translateY(-3px);
    border-color: rgba(96, 165, 250, 0.45);
}

.ranking-index {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    font-weight: 900;
}

.ranking-item img {
    width: 74px;
    height: 82px;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-info {
    min-width: 0;
}

.ranking-info strong,
.ranking-info em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-info strong {
    font-size: 17px;
}

.ranking-info em {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-main {
    padding-bottom: 84px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: saturate(1.15);
}

.detail-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 46px;
    align-items: center;
    padding: 72px 0;
}

.detail-poster-wrap {
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.detail-copy h1 {
    max-width: 880px;
    font-size: clamp(38px, 5vw, 68px);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.detail-meta span {
    padding: 9px 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.52);
    color: #e2e8f0;
    font-size: 14px;
}

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

.player-section,
.detail-content,
.related-section {
    margin-top: 60px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(96, 165, 250, 0.28);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    background:
        radial-gradient(circle at center, rgba(96, 165, 250, 0.18), transparent 22rem),
        rgba(0, 0, 0, 0.28);
    color: #fff;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 20px 62px rgba(96, 165, 250, 0.5);
    font-size: 34px;
    padding-left: 5px;
}

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

.story-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
}

.story-card p {
    margin: 18px 0 0;
    color: #d1d5db;
    line-height: 2;
    font-size: 16px;
}

.site-footer {
    margin-top: 90px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.46);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: flex;
    justify-content: space-between;
    gap: 32px;
}

.footer-inner p {
    max-width: 520px;
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    max-width: 420px;
}

.footer-links a {
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.1);
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 700;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 30px;
    color: var(--muted-2);
    font-size: 14px;
}

@media (max-width: 1100px) {
    .hero-content {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 36px;
    }

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

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

@media (max-width: 820px) {
    .menu-toggle {
        display: block;
    }

    .site-nav {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 78px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(15, 23, 42, 0.96);
        box-shadow: var(--shadow);
    }

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

    .nav-link {
        text-align: center;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        padding-top: 74px;
        gap: 26px;
    }

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

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

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

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

    .detail-poster-wrap {
        width: min(260px, 70vw);
    }

    .footer-inner {
        flex-direction: column;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .container,
    .header-inner,
    .footer-inner,
    .footer-bottom,
    .hero-content {
        width: min(100% - 24px, 1180px);
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        letter-spacing: -0.05em;
    }

    .section-heading,
    .category-block-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .ranking-item {
        grid-template-columns: 42px 66px minmax(0, 1fr);
    }

    .category-block {
        padding: 18px;
    }

    .detail-grid {
        padding: 42px 0;
    }

    .player-shell {
        border-radius: 18px;
    }
}
