:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --pink: #ec4899;
    --yellow: #facc15;
    --shadow: 0 20px 50px rgba(2, 6, 23, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 32rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.13), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

img {
    max-width: 100%;
}

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

button,
input,
select {
    font: inherit;
}

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

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

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.42rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #020617;
    box-shadow: 0 12px 28px rgba(34, 211, 238, 0.2);
}

.logo-text {
    background: linear-gradient(90deg, var(--cyan), #60a5fa 52%, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #cbd5e1;
    font-size: 0.96rem;
    font-weight: 650;
}

.nav-menu a {
    transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.is-active {
    color: var(--cyan);
}

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

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

.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::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.82) 38%, rgba(2, 6, 23, 0.38) 100%),
        linear-gradient(0deg, #020617 0%, transparent 35%),
        var(--cover) center / cover no-repeat;
    transform: scale(1.04);
    filter: saturate(1.12);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
    align-items: center;
    gap: 46px;
    padding: 90px 0 86px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 999px;
    background: rgba(8, 145, 178, 0.12);
    color: #a5f3fc;
    font-size: 0.86rem;
    font-weight: 700;
}

.hero-title {
    margin: 22px 0 18px;
    font-size: clamp(2.4rem, 6vw, 5.2rem);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.08em;
}

.hero-text {
    max-width: 660px;
    color: #dbeafe;
    font-size: clamp(1rem, 2vw, 1.18rem);
}

.hero-actions,
.card-actions,
.detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 211, 238, 0.55);
    color: #ffffff;
}

.btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #020617;
    box-shadow: 0 14px 35px rgba(34, 211, 238, 0.22);
}

.btn-primary:hover {
    color: #020617;
}

.hero-poster {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.18);
    box-shadow: var(--shadow);
    background: rgba(15, 23, 42, 0.65);
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent);
}

.hero-meta-card {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 3;
    padding: 16px;
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(226, 232, 240, 0.16);
    backdrop-filter: blur(16px);
}

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

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

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

.section {
    padding: 54px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-desc {
    margin-top: 8px;
    max-width: 760px;
    color: var(--muted);
}

.filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(120px, 180px));
    gap: 12px;
    margin-bottom: 22px;
}

.search-input,
.select-input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    outline: none;
    background: rgba(15, 23, 42, 0.82);
    color: #f8fafc;
}

.search-input:focus,
.select-input:focus {
    border-color: rgba(34, 211, 238, 0.58);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.09);
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 16px 36px rgba(2, 6, 23, 0.2);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
    background: rgba(15, 23, 42, 0.96);
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.74);
}

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

.movie-card:hover .movie-cover img {
    transform: scale(1.05);
}

.rating-badge,
.year-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.78);
    color: var(--yellow);
    font-size: 0.78rem;
    font-weight: 850;
    backdrop-filter: blur(12px);
}

.rating-badge {
    left: 12px;
}

.year-badge {
    right: 12px;
    color: #bae6fd;
}

.movie-info {
    padding: 15px 16px 18px;
}

.movie-title {
    margin: 0 0 8px;
    font-size: 1.02rem;
    line-height: 1.25;
    font-weight: 850;
    color: #ffffff;
}

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

.movie-meta,
.breadcrumb,
.small-meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.movie-one-line {
    margin-top: 9px;
    color: #cbd5e1;
    font-size: 0.92rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.1);
    color: #a5f3fc;
    font-size: 0.78rem;
    font-weight: 700;
}

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

.category-card {
    display: block;
    min-height: 176px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.16), transparent),
        rgba(15, 23, 42, 0.76);
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.42);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 1.3rem;
    font-weight: 900;
}

.category-card p {
    margin: 0;
    color: #cbd5e1;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 88px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.76);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 15px;
    background: rgba(34, 211, 238, 0.12);
    color: var(--cyan);
    font-weight: 900;
}

.rank-thumb {
    width: 88px;
    height: 118px;
    border-radius: 14px;
    object-fit: cover;
}

.page-hero {
    padding: 64px 0 34px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 26rem),
        rgba(2, 6, 23, 0.2);
}

.page-title {
    margin: 10px 0 12px;
    font-size: clamp(2.1rem, 5vw, 4.2rem);
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.07em;
}

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

.player-box {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    width: 100%;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
    cursor: pointer;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #020617;
    font-size: 2rem;
    box-shadow: 0 18px 36px rgba(34, 211, 238, 0.28);
}

.player-overlay strong {
    font-size: 1.1rem;
    font-weight: 900;
}

.player-overlay.is-hidden {
    display: none;
}

.content-card,
.side-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.76);
    padding: 24px;
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.16);
}

.content-card + .content-card,
.side-card + .side-card {
    margin-top: 18px;
}

.content-card h2,
.side-card h2,
.side-card h3 {
    margin: 0 0 12px;
    font-size: 1.35rem;
    font-weight: 900;
}

.content-card p {
    margin: 0;
    color: #dbeafe;
}

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

.detail-cover {
    width: 100%;
    border-radius: 22px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.meta-table {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
}

.meta-row span:first-child {
    color: var(--muted);
}

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

.related-item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: center;
}

.related-item img {
    width: 64px;
    height: 86px;
    border-radius: 12px;
    object-fit: cover;
}

.related-item strong {
    display: block;
    line-height: 1.25;
}

.related-item small {
    color: var(--muted);
}

.footer {
    margin-top: 34px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.68);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 30px;
    padding: 36px 0;
    color: #cbd5e1;
}

.footer h2,
.footer h3 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 900;
}

.footer p {
    margin: 0;
    color: var(--muted);
}

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

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

.is-hidden {
    display: none !important;
}

@media (max-width: 980px) {
    .hero-content,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding-top: 64px;
    }

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

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

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

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

@media (max-width: 720px) {
    .header-inner {
        min-height: 62px;
    }

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

    .nav-menu {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 70px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        border: 1px solid rgba(148, 163, 184, 0.16);
        border-radius: 20px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

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

    .nav-menu a {
        padding: 11px 12px;
        border-radius: 12px;
    }

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

    .hero-content {
        gap: 28px;
        padding: 46px 0 78px;
    }

    .hero-controls {
        bottom: 18px;
    }

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

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

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

    .rank-item {
        grid-template-columns: 42px 70px 1fr;
    }

    .rank-item .btn {
        grid-column: 2 / 4;
    }

    .rank-thumb {
        width: 70px;
        height: 96px;
    }
}

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

    .hero-title,
    .page-title {
        letter-spacing: -0.05em;
    }

    .content-card,
    .side-card {
        padding: 18px;
    }
}
