:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: #111827;
    --bg-card-light: #1e293b;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --sky: #0ea5e9;
    --sky-strong: #0284c7;
    --blue: #2563eb;
    --orange: #f97316;
    --radius: 20px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.16), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.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-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.32);
}

.brand-text {
    font-size: 24px;
    background: linear-gradient(90deg, #38bdf8, #60a5fa);
    -webkit-background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: #cbd5e1;
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
    color: #38bdf8;
}

.nav-link:hover {
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.85);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 10px;
    background: #e2e8f0;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.98);
    padding: 12px 24px 18px;
}

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

.mobile-link {
    padding: 11px 4px;
    color: #cbd5e1;
    font-weight: 650;
}

.hero-carousel {
    position: relative;
    min-height: 76vh;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    min-height: 76vh;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, #020617 0%, transparent 36%);
}

.hero-content {
    position: absolute;
    inset: 0;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: center;
    flex-direction: column;
    max-width: 1180px;
}

.hero-kicker,
.detail-tags,
.card-tags,
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-kicker span,
.detail-tags span,
.card-tags span,
.category-pills span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(14, 165, 233, 0.92);
    color: #ffffff;
    font-size: 13px;
    font-weight: 760;
}

.hero-content h1 {
    margin: 18px 0 18px;
    width: min(720px, 100%);
    font-size: clamp(42px, 7vw, 80px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-content p {
    width: min(650px, 100%);
    color: #cbd5e1;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
    margin: 0 0 28px;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    padding: 13px 22px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--sky), var(--blue));
    color: #ffffff;
    box-shadow: 0 16px 36px rgba(14, 165, 233, 0.34);
}

.btn-ghost {
    border-color: rgba(226, 232, 240, 0.22);
    background: rgba(15, 23, 42, 0.46);
    color: #e2e8f0;
}

.btn-soft {
    background: rgba(14, 165, 233, 0.12);
    color: #7dd3fc;
    border-color: rgba(14, 165, 233, 0.25);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 6;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.48);
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(14, 165, 233, 0.82);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 24px;
    transform: translateY(-50%);
}

.hero-next {
    right: 24px;
    transform: translateY(-50%);
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

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

.home-main {
    padding: 54px 0 0;
}

.section-block {
    margin: 0 0 72px;
}

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

.section-kicker {
    color: #38bdf8;
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-head h2,
.page-title h1,
.detail-info h1,
.player-section h2,
.story-section h2,
.related-section h2 {
    margin: 6px 0 0;
    color: #ffffff;
    line-height: 1.15;
}

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

.section-more {
    color: #38bdf8;
    font-weight: 780;
}

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

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

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

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

.card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.22);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.card-link:hover {
    transform: translateY(-8px);
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 26px 60px rgba(2, 6, 23, 0.38);
}

.card-poster {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

.card-link:hover .card-poster img {
    transform: scale(1.08);
    filter: brightness(0.82);
}

.card-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 62%);
}

.card-type,
.card-year,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.card-type {
    left: 12px;
    bottom: 12px;
    background: rgba(14, 165, 233, 0.9);
    color: #ffffff;
}

.card-year {
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.65);
    color: #e2e8f0;
}

.rank-badge {
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: #ffffff;
}

.card-play {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 34px;
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.card-link:hover .card-play {
    opacity: 1;
    transform: scale(1);
}

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0 0 9px;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.card-link:hover .card-body h3 {
    color: #38bdf8;
}

.card-body p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    min-height: 48px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #64748b;
    font-size: 13px;
}

.card-meta span:last-child {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.feature-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.92));
    box-shadow: var(--shadow);
}

.feature-image {
    position: relative;
    min-height: 370px;
}

.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(15, 23, 42, 0.8));
}

.feature-content {
    padding: clamp(28px, 5vw, 54px);
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.feature-content h2 {
    margin: 14px 0;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.05;
}

.feature-content p {
    color: #cbd5e1;
    line-height: 1.85;
    margin: 0 0 22px;
}

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

.category-card {
    overflow: hidden;
    min-height: 170px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    position: relative;
}

.category-card:hover {
    transform: translateY(-6px);
    border-color: rgba(14, 165, 233, 0.55);
    background: linear-gradient(135deg, rgba(3, 105, 161, 0.88), rgba(37, 99, 235, 0.82));
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.22;
}

.category-card div {
    position: relative;
    z-index: 2;
    padding: 22px;
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
}

.category-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.65;
    font-size: 14px;
}

.page-hero {
    padding: 58px 0 32px;
}

.page-title {
    width: min(820px, 100%);
}

.page-title h1 {
    font-size: clamp(36px, 6vw, 64px);
}

.page-title p {
    margin: 16px 0 0;
    color: #cbd5e1;
    line-height: 1.85;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin: 28px 0 24px;
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumb a {
    color: #38bdf8;
}

.filter-panel {
    margin: 8px 0 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.82);
    display: grid;
    gap: 14px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #cbd5e1;
    font-weight: 750;
}

.filter-search input,
.filter-panel select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.55);
    padding: 13px 14px;
    outline: 0;
}

.filter-search input:focus,
.filter-panel select:focus {
    border-color: rgba(56, 189, 248, 0.72);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

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

.no-results {
    display: none;
    padding: 24px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    color: #cbd5e1;
    text-align: center;
}

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

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

.detail-hero {
    display: grid;
    grid-template-columns: 430px 1fr;
    gap: 36px;
    align-items: center;
    padding: 18px 0 38px;
}

.detail-cover {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background: #0f172a;
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.detail-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.64), transparent 58%);
}

.detail-info h1 {
    font-size: clamp(34px, 6vw, 64px);
    letter-spacing: -0.04em;
}

.detail-intro {
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.85;
    margin: 18px 0 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 22px 0;
}

.detail-meta span {
    padding: 9px 12px;
    border-radius: 13px;
    background: rgba(15, 23, 42, 0.92);
    color: #cbd5e1;
    border: 1px solid var(--line);
    font-weight: 700;
}

.player-section,
.story-section,
.related-section {
    margin: 0 0 50px;
}

.player-section h2,
.story-section h2,
.related-section h2 {
    font-size: clamp(26px, 4vw, 38px);
    margin-bottom: 18px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: #000000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
    cursor: pointer;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.52;
}

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle, rgba(14, 165, 233, 0.32), transparent 32%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.35));
}

.play-button {
    position: relative;
    z-index: 6;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    color: #ffffff;
    font-size: 34px;
    cursor: pointer;
    box-shadow: 0 20px 55px rgba(14, 165, 233, 0.35);
    transition: transform 0.22s ease;
}

.play-button:hover {
    transform: scale(1.08);
}

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

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

.story-card h3 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 22px;
}

.story-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.9;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.tag-cloud span {
    border-radius: 999px;
    padding: 8px 12px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.22);
    font-weight: 700;
    font-size: 13px;
}

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

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

.footer-brand {
    font-size: 24px;
    color: #38bdf8;
}

.footer-shell p {
    color: #94a3b8;
    margin: 12px 0 0;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px 22px;
    color: #cbd5e1;
}

.footer-links a:hover {
    color: #38bdf8;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 28px;
    color: #64748b;
    font-size: 14px;
}

.hidden-card {
    display: none;
}

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

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

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

    .detail-cover {
        max-width: 620px;
    }
}

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

    .mobile-toggle {
        display: flex;
    }

    .hero-carousel,
    .hero-image {
        min-height: 72vh;
    }

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

    .hero-arrow {
        display: none;
    }

    .movie-grid,
    .movie-grid.three,
    .movie-grid.two,
    .category-grid,
    .story-grid,
    .feature-panel {
        grid-template-columns: 1fr;
    }

    .feature-image {
        min-height: 250px;
    }

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

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

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

@media (max-width: 560px) {
    .nav-shell,
    .page-main,
    .home-main,
    .detail-main,
    .footer-shell,
    .footer-bottom {
        width: min(100% - 24px, 1180px);
    }

    .brand-text {
        font-size: 20px;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-actions,
    .detail-actions {
        display: grid;
    }

    .btn {
        width: 100%;
    }

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

    .card-body p {
        min-height: auto;
    }

    .detail-meta {
        gap: 8px;
    }

    .detail-meta span {
        font-size: 13px;
    }
}
