:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: #0f172a;
    --panel-soft: rgba(30, 41, 59, 0.62);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(34, 211, 238, 0.35);
    --text: #ffffff;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --blue: #2563eb;
    --pink: #f472b6;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    --radius: 24px;
    --shell: 1180px;
}

* {
    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(6, 182, 212, 0.16), transparent 34rem), radial-gradient(circle at 82% 8%, rgba(37, 99, 235, 0.18), transparent 28rem), var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-shell {
    width: min(100% - 32px, var(--shell));
    margin-inline: auto;
}

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

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
    box-shadow: 0 16px 40px rgba(34, 211, 238, 0.2);
}

.brand-text {
    font-size: 20px;
    background: linear-gradient(135deg, #ffffff, var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.66);
}

.nav-links a,
.mobile-nav a {
    color: var(--muted-strong);
    padding: 10px 16px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: #ffffff;
    background: rgba(34, 211, 238, 0.16);
}

.nav-cta,
.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-cta,
.primary-btn {
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), #7dd3fc);
    box-shadow: 0 18px 45px rgba(34, 211, 238, 0.22);
}

.secondary-btn {
    color: #ffffff;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

.nav-cta:hover,
.primary-btn:hover,
.secondary-btn:hover {
    transform: translateY(-2px);
}

.nav-toggle {
    width: 44px;
    height: 44px;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    margin-inline: auto;
    border-radius: 999px;
    background: #ffffff;
}

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

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

.hero-section {
    padding: 32px 0 64px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--cyan);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

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

.hero-heading p,
.page-hero p {
    max-width: 650px;
    margin: 14px 0 0;
    color: var(--muted-strong);
    line-height: 1.8;
}

.hero-carousel {
    position: relative;
    min-height: clamp(480px, 60vw, 620px);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-strong);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 5s ease;
}

.hero-slide.is-active img {
    transform: scale(1.1);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.22) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent 58%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    align-self: end;
    padding: clamp(28px, 6vw, 64px);
}

.hero-content h2 {
    margin: 0 0 14px;
    font-size: clamp(32px, 5.5vw, 70px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-content p {
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.8;
    font-size: 17px;
}

.hero-tags,
.tag-list,
.detail-meta,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.hero-tags span,
.tag-list span,
.detail-meta span,
.card-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
    font-size: 13px;
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    transform: translateY(-50%);
    backdrop-filter: blur(12px);
}

.hero-arrow:hover {
    background: rgba(34, 211, 238, 0.2);
}

.hero-arrow.prev {
    left: 18px;
}

.hero-arrow.next {
    right: 18px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: var(--cyan);
}

.section {
    padding: 34px 0;
}

.section.alt {
    background: rgba(15, 23, 42, 0.28);
    border-block: 1px solid var(--line);
}

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

.section-head h2,
.page-hero h2,
.detail-section h2,
.player-card h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.03em;
}

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

.text-link {
    color: var(--cyan);
    font-weight: 700;
}

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

.movie-card {
    display: block;
    min-width: 0;
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel-strong);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

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

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

.card-region,
.rank-badge {
    position: absolute;
    top: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 700;
}

.card-region {
    right: 10px;
}

.rank-badge {
    left: 10px;
    background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
}

.play-hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 26px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.play-hover::before {
    content: "";
    position: absolute;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.88);
    box-shadow: 0 14px 40px rgba(34, 211, 238, 0.32);
}

.play-hover {
    isolation: isolate;
}

.play-hover::after {
    content: "▶";
    position: relative;
    z-index: 1;
    margin-left: 4px;
    font-size: 22px;
}

.movie-card:hover .play-hover {
    opacity: 1;
}

.card-title {
    display: -webkit-box;
    min-height: 48px;
    margin-top: 12px;
    overflow: hidden;
    color: #ffffff;
    font-weight: 700;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    transition: color 0.2s ease;
}

.movie-card:hover .card-title {
    color: var(--cyan);
}

.card-meta {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.horizontal-scroll {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 14px;
    scrollbar-width: thin;
}

.movie-card.horizontal {
    flex: 0 0 180px;
}

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

.category-card {
    position: relative;
    min-height: 170px;
    overflow: hidden;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.48));
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -28px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
}

.category-card strong {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.7;
    font-size: 14px;
}

.category-card span {
    position: relative;
    z-index: 1;
    display: inline-flex;
    margin-top: 18px;
    color: var(--cyan);
    font-weight: 800;
}

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

.rank-panel,
.filter-panel,
.detail-panel,
.player-card,
.detail-section,
.page-hero {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.rank-panel {
    padding: 20px;
}

.rank-panel h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 42px 56px 1fr;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.46);
    transition: border 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    border-color: var(--line-strong);
    background: rgba(14, 116, 144, 0.14);
    transform: translateY(-2px);
}

.rank-num {
    color: var(--cyan);
    font-size: 22px;
    font-weight: 900;
}

.rank-row img {
    width: 56px;
    height: 78px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--panel-strong);
}

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

.rank-copy strong {
    display: -webkit-box;
    overflow: hidden;
    color: #ffffff;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.rank-copy em {
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.page-main {
    padding: 36px 0 70px;
}

.page-hero {
    padding: clamp(26px, 5vw, 48px);
    margin-bottom: 28px;
    background: radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.16), transparent 30rem), var(--panel);
}

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

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

.filter-panel {
    padding: 20px;
    margin-bottom: 26px;
}

.filter-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 12px;
}

.filter-row input,
.filter-row select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #ffffff;
    outline: none;
    background: rgba(2, 6, 23, 0.64);
}

.filter-row input:focus,
.filter-row select:focus {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.no-results {
    display: none;
    padding: 36px;
    border: 1px solid var(--line);
    border-radius: 22px;
    color: var(--muted-strong);
    text-align: center;
    background: var(--panel);
}

.no-results.is-visible {
    display: block;
}

.detail-page {
    padding: 32px 0 72px;
}

.detail-panel {
    display: grid;
    grid-template-columns: minmax(240px, 340px) 1fr;
    gap: clamp(24px, 5vw, 48px);
    padding: clamp(22px, 4vw, 42px);
    margin-bottom: 28px;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-strong);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
}

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

.detail-copy h1 {
    margin-bottom: 18px;
}

.detail-copy p {
    color: var(--muted-strong);
    line-height: 1.9;
    font-size: 16px;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.player-card,
.detail-section {
    padding: clamp(20px, 4vw, 34px);
    margin-bottom: 28px;
}

.player-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.player-top span {
    color: var(--muted);
}

.player-stage {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    background: #000000;
}

.player-stage video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
    cursor: pointer;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.74));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-icon-large {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.92);
    box-shadow: 0 20px 60px rgba(34, 211, 238, 0.32);
    font-size: 30px;
}

.detail-section p {
    color: var(--muted-strong);
    line-height: 1.9;
}

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

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
    padding: 42px 0 26px;
}

.footer-brand-block p,
.footer-bottom p {
    color: var(--muted);
    line-height: 1.7;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

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

.footer-links a {
    color: var(--muted-strong);
    transition: color 0.2s ease;
}

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

.footer-bottom {
    padding: 18px 0 32px;
    border-top: 1px solid var(--line);
}

.footer-bottom p {
    margin: 0;
}

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

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

@media (max-width: 820px) {
    .nav-links,
    .nav-cta {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-heading,
    .section-head,
    .player-top {
        align-items: start;
        flex-direction: column;
    }

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

    .hero-content {
        padding: 28px;
    }

    .hero-arrow {
        top: auto;
        bottom: 18px;
        transform: none;
    }

    .hero-arrow.prev {
        left: 18px;
    }

    .hero-arrow.next {
        left: 74px;
        right: auto;
    }

    .hero-dots {
        right: 18px;
        left: auto;
        transform: none;
    }

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

    .rank-grid,
    .detail-panel,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .filter-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 580px) {
    .site-shell {
        width: min(100% - 24px, var(--shell));
    }

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

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

    .hero-content h2 {
        font-size: 34px;
    }

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

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

    .filter-row {
        grid-template-columns: 1fr;
    }

    .card-title {
        min-height: 42px;
        font-size: 14px;
    }

    .rank-row {
        grid-template-columns: 34px 52px 1fr;
        gap: 10px;
    }
}
