:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: #0f172a;
    --line: rgba(34, 211, 238, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --pink: #f472b6;
    --green: #34d399;
    --shadow: 0 24px 80px rgba(8, 47, 73, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 30rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 32rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-nav {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.25);
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #cbd5e1;
    font-size: 14px;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(34, 211, 238, 0.12);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.9);
    color: white;
    font-size: 20px;
}

main {
    padding-top: 68px;
}

.hero {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
    align-items: center;
    gap: 42px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 90px 0 110px;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    filter: saturate(1.15);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.38), rgba(2, 6, 23, 0.92)),
        radial-gradient(circle at 65% 35%, rgba(34, 211, 238, 0.22), transparent 22rem);
}

.hero-copy {
    position: relative;
    z-index: 1;
}

.hero-kicker,
.sub-hero span,
.section-head span,
.quick-search-panel span,
.ranking-head span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 7px 12px;
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 999px;
    background: rgba(8, 47, 73, 0.32);
    color: var(--cyan);
    font-size: 13px;
    font-weight: 700;
}

.hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(42px, 7vw, 88px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 640px;
    margin: 24px 0 0;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: #dbeafe;
    font-size: 12px;
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.primary-btn {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    box-shadow: 0 16px 40px rgba(34, 211, 238, 0.28);
}

.ghost-btn {
    border: 1px solid rgba(34, 211, 238, 0.32);
    background: rgba(15, 23, 42, 0.72);
    color: #e0f2fe;
}

.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 48px rgba(34, 211, 238, 0.24);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.55);
    box-shadow: var(--shadow);
    aspect-ratio: 3 / 4;
}

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

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

.hero-dots {
    position: absolute;
    right: calc((100% - min(1180px, calc(100% - 32px))) / 2);
    bottom: 48px;
    display: flex;
    gap: 10px;
    z-index: 5;
}

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

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

.quick-search-panel,
.page-section,
.split-section,
.search-panel {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.quick-search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    margin-top: -52px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 8;
}

.quick-search-panel h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 36px);
}

.home-search,
.filter-bar {
    display: flex;
    gap: 12px;
}

.home-search input,
.filter-bar input,
.filter-bar select {
    min-width: 0;
    min-height: 48px;
    flex: 1;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.72);
    color: white;
    padding: 0 16px;
    outline: none;
}

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

.page-section,
.split-section,
.search-panel {
    padding: 72px 0 0;
}

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

.section-row-head .section-head {
    margin-bottom: 0;
}

.section-row-head > a,
.ranking-head a {
    color: var(--cyan);
    font-weight: 700;
}

.section-head {
    margin-bottom: 26px;
}

.section-head h2,
.sub-hero h1,
.detail-copy h1,
.detail-article h2,
.related-panel h2 {
    margin: 0;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 44px);
}

.section-head p,
.sub-hero p {
    max-width: 760px;
    color: var(--muted);
    line-height: 1.8;
}

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

.category-pill,
.category-card,
.movie-card,
.ranking-box,
.related-panel,
.detail-article,
.player-shell,
.rank-row a {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 18px 60px rgba(2, 6, 23, 0.26);
}

.category-pill,
.category-card {
    display: block;
    padding: 20px;
    border-radius: 20px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-pill:hover,
.category-card:hover,
.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.52);
}

.category-pill strong,
.category-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
}

.category-pill span,
.category-card em,
.card-content em,
.compact-card em,
.rank-row em {
    color: var(--muted);
    font-style: normal;
    line-height: 1.65;
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: rgba(2, 6, 23, 0.7);
}

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

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

.play-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: white;
    font-size: 12px;
    backdrop-filter: blur(10px);
}

.card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

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

.card-content strong {
    color: white;
    font-size: 18px;
    line-height: 1.35;
}

.card-content em {
    display: -webkit-box;
    overflow: hidden;
    min-height: 48px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
}

.tag-row {
    margin-top: auto;
}

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

.ranking-box {
    position: sticky;
    top: 92px;
    border-radius: 24px;
    padding: 20px;
}

.ranking-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ranking-list,
.big-ranking-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ranking-list li + li {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.ranking-list a {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
}

.ranking-list b,
.rank-row b {
    color: var(--cyan);
}

.ranking-list span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ranking-list em {
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

.sub-page {
    padding-bottom: 72px;
}

.sub-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 90px 0 36px;
}

.sub-hero h1 {
    max-width: 880px;
    font-size: clamp(38px, 6vw, 72px);
}

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

.category-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 18px;
}

.category-preview img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(2, 6, 23, 0.8);
}

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

.rank-row a {
    display: grid;
    grid-template-columns: 42px 84px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 18px;
}

.rank-row img {
    width: 84px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-row strong,
.rank-row em {
    display: block;
}

.rank-row i {
    color: var(--muted);
    font-style: normal;
}

.search-panel {
    padding-top: 24px;
}

.filter-bar {
    position: sticky;
    top: 80px;
    z-index: 20;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(16px);
}

.detail-page {
    padding-bottom: 72px;
}

.detail-hero,
.detail-layout {
    display: grid;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    gap: 32px;
}

.detail-hero {
    grid-template-columns: 340px minmax(0, 1fr);
    align-items: center;
    padding: 96px 0 36px;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: var(--shadow);
    aspect-ratio: 3 / 4;
}

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

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

.breadcrumb a {
    color: var(--cyan);
}

.breadcrumb em {
    font-style: normal;
}

.detail-copy h1 {
    font-size: clamp(38px, 6vw, 72px);
}

.detail-copy p {
    max-width: 760px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.85;
}

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

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 16 / 9;
    background: black;
}

.player-shell video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.76));
    color: white;
    cursor: pointer;
}

.player-cover span {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 20px 48px rgba(34, 211, 238, 0.36);
    font-size: 28px;
}

.player-cover strong {
    max-width: min(720px, 88%);
    font-size: clamp(22px, 4vw, 38px);
}

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

.detail-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
}

.detail-article,
.related-panel {
    border-radius: 24px;
    padding: 24px;
}

.detail-article h2,
.related-panel h2 {
    margin-bottom: 14px;
    font-size: 26px;
}

.detail-article p {
    color: #cbd5e1;
    line-height: 2;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.info-list dt {
    color: var(--cyan);
    font-weight: 800;
}

.info-list dd {
    margin: 0;
    color: #dbeafe;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.34);
}

.compact-card img {
    width: 82px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
}

.compact-card strong,
.compact-card em {
    display: block;
}

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

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

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 32px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
}

.footer-inner p,
.copyright {
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

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

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 28px;
    font-size: 13px;
}

@media (max-width: 1080px) {
    .movie-grid,
    .dense-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .ranking-box {
        position: static;
    }
}

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

    .nav-links {
        position: absolute;
        top: 68px;
        right: 16px;
        left: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.96);
    }

    .nav-links.open {
        display: flex;
    }

    .hero {
        min-height: 760px;
    }

    .hero-slide,
    .detail-hero,
    .quick-search-panel {
        grid-template-columns: 1fr;
    }

    .hero-slide {
        padding-top: 54px;
        gap: 26px;
    }

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

    .home-search,
    .filter-bar {
        flex-direction: column;
    }

    .detail-hero {
        padding-top: 52px;
    }

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

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

@media (max-width: 560px) {
    .movie-grid,
    .dense-grid,
    .category-grid,
    .category-pill-grid {
        grid-template-columns: 1fr;
    }

    .rank-row a {
        grid-template-columns: 32px 68px minmax(0, 1fr);
    }

    .rank-row i {
        display: none;
    }

    .hero-dots {
        right: 16px;
        bottom: 26px;
    }

    .quick-search-panel {
        margin-top: -28px;
    }
}
