:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.82);
    --bg-card-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(34, 211, 238, 0.36);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --blue: #2563eb;
    --amber: #f59e0b;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(2, 8, 23, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.18), transparent 30rem),
        radial-gradient(circle at 90% 4rem, rgba(37, 99, 235, 0.18), transparent 34rem),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
}

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

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: 50;
    background: rgba(2, 6, 23, 0.78);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

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

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

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

.brand-text {
    font-size: 1.15rem;
}

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

.nav-link,
.nav-button {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--soft);
    background: transparent;
    border: 0;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active,
.nav-button:hover {
    color: white;
    background: rgba(34, 211, 238, 0.14);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    width: 250px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.dropdown-panel a {
    padding: 9px 10px;
    border-radius: 12px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.68);
}

.dropdown-panel a:hover {
    color: white;
    background: rgba(34, 211, 238, 0.15);
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

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

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: var(--text);
}

.mobile-nav {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 0 16px 16px;
}

.mobile-nav a {
    text-align: center;
    padding: 10px 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.72);
}

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

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

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;
    filter: saturate(1.08);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.36) 100%),
        linear-gradient(0deg, var(--bg) 0%, transparent 42%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    min-height: min(720px, calc(100vh - 72px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 48px;
    padding: 80px 0 72px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 13px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.12);
    font-size: 0.9rem;
}

.hero h1,
.page-hero h1,
.detail-title {
    margin: 18px 0 0;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-feature {
    display: block;
    margin-top: 18px;
    font-size: clamp(1.5rem, 3vw, 3.25rem);
    line-height: 1.08;
    color: white;
}

.hero-desc,
.page-desc,
.detail-intro {
    max-width: 720px;
    margin: 22px 0 0;
    color: var(--soft);
    font-size: clamp(1rem, 1.3vw, 1.18rem);
    line-height: 1.85;
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--cyan-dark), var(--blue));
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.24);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 42px rgba(34, 211, 238, 0.28);
}

.btn-ghost {
    color: var(--text);
    border-color: var(--line);
    background: rgba(15, 23, 42, 0.62);
}

.btn-ghost:hover {
    border-color: var(--line-strong);
    background: rgba(34, 211, 238, 0.12);
}

.hero-poster {
    position: relative;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 34px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.55);
    box-shadow: var(--shadow);
}

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

.hero-poster-info {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(16px);
}

.hero-poster-info strong {
    display: block;
    font-size: 1.05rem;
}

.hero-poster-info span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.92rem;
}

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

.hero-dot {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.28);
    cursor: pointer;
}

.hero-dot.active {
    background: var(--cyan);
}

.section {
    padding: 74px 0;
}

.section.tight {
    padding-top: 36px;
}

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

.section-kicker {
    margin: 0 0 8px;
    color: var(--cyan);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-title {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.6rem);
    letter-spacing: -0.04em;
}

.section-subtitle {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 20px 48px rgba(2, 8, 23, 0.24);
    transition: 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: var(--line-strong);
    box-shadow: 0 28px 58px rgba(6, 182, 212, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(8, 145, 178, 0.20));
}

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

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

.poster-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: white;
    background: rgba(34, 211, 238, 0.9);
    box-shadow: 0 14px 30px rgba(34, 211, 238, 0.26);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.92);
    color: #111827;
    font-size: 0.78rem;
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

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

.card-title {
    margin: 10px 0 0;
    font-size: 1.08rem;
    line-height: 1.35;
}

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

.card-summary {
    margin: 10px 0 0;
    min-height: 3.25rem;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.15);
    font-size: 0.76rem;
}

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

.category-card {
    position: relative;
    min-height: 170px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.16), transparent 42%),
        rgba(15, 23, 42, 0.86);
    box-shadow: 0 20px 46px rgba(2, 8, 23, 0.24);
}

.category-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-4px);
}

.category-card h3 {
    margin: 0;
    font-size: 1.25rem;
}

.category-card p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

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

.page-hero {
    position: relative;
    padding: 72px 0 42px;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: auto -10% -35% -10%;
    height: 280px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 64%);
}

.page-hero .container {
    position: relative;
}

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

.breadcrumb a {
    color: #a5f3fc;
}

.crumb-sep {
    color: rgba(148, 163, 184, 0.5);
}

.filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 190px));
    gap: 12px;
    padding: 16px;
    margin-bottom: 28px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.68);
}

.filters input,
.filters select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.7);
    outline: none;
}

.filters input:focus,
.filters select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.empty-state {
    display: none;
    padding: 34px;
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--muted);
}

.empty-state.show {
    display: block;
}

.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

.ranking-list {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.66);
}

.mini-movie {
    display: grid;
    grid-template-columns: auto 58px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
}

.mini-movie:hover {
    background: rgba(34, 211, 238, 0.12);
}

.mini-movie img {
    width: 58px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

.mini-movie strong,
.mini-movie em {
    display: block;
}

.mini-movie strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-movie em {
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
    font-size: 0.82rem;
}

.mini-rank {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, var(--cyan-dark), var(--blue));
    font-weight: 900;
}

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

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.18;
    filter: blur(2px) saturate(1.1);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 70px 0 58px;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 32px;
    box-shadow: var(--shadow);
}

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

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
}

.player-wrap {
    display: grid;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.10), transparent 32%),
        rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.video-box {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
}

.video-box video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background:
        linear-gradient(0deg, rgba(2, 6, 23, 0.64), rgba(2, 6, 23, 0.22)),
        rgba(2, 6, 23, 0.2);
}

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

.play-button {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, var(--cyan-dark), var(--blue));
    box-shadow: 0 22px 55px rgba(34, 211, 238, 0.26);
    font-size: 2.2rem;
    line-height: 1;
}

.content-card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.74);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 1.5rem;
}

.content-card p {
    margin: 0;
    color: var(--soft);
    line-height: 1.95;
}

.content-card p + p {
    margin-top: 16px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 1.1fr;
    gap: 28px;
}

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

.footer-grid p {
    max-width: 560px;
    color: var(--muted);
    line-height: 1.8;
}

.footer-links,
.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: start;
}

.footer-links a,
.footer-tags a {
    padding: 8px 11px;
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
}

.footer-links a:hover,
.footer-tags a:hover {
    color: white;
    border-color: var(--line-strong);
}

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

    .menu-toggle {
        display: block;
    }

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

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

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

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

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

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

    .header-inner {
        min-height: 64px;
    }

    .hero,
    .hero-inner {
        min-height: auto;
    }

    .hero-slide {
        position: relative;
        display: none;
    }

    .hero-slide.active {
        display: block;
    }

    .hero-inner {
        padding: 48px 0 76px;
        gap: 28px;
    }

    .hero h1,
    .page-hero h1,
    .detail-title {
        font-size: clamp(2rem, 12vw, 3.4rem);
    }

    .section {
        padding: 52px 0;
    }

    .section-header {
        align-items: start;
        flex-direction: column;
    }

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

    .card-body {
        padding: 13px;
    }

    .card-summary {
        display: none;
    }

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

    .detail-hero-inner {
        padding: 42px 0;
    }

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

    .content-card {
        padding: 20px;
    }
}

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

    .hero-actions,
    .section-actions,
    .detail-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

.hero-title-spacer {
    margin: 18px 0 0;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
    font-weight: 800;
}
