:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #38bdf8;
    --accent-strong: #0284c7;
    --accent-soft: rgba(56, 189, 248, 0.18);
    --radius: 22px;
    --shadow: 0 22px 65px rgba(2, 6, 23, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.18), transparent 34rem),
        radial-gradient(circle at 100% 15%, rgba(59, 130, 246, 0.12), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 34px rgba(2, 6, 23, 0.32);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
    font-size: 22px;
}

.brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    position: relative;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.52);
}

.brand-icon::after {
    content: "";
    position: absolute;
    top: 10px;
    left: 14px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid white;
}

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

.desktop-nav a,
.mobile-nav a {
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 700;
    position: relative;
    transition: color 0.2s ease;
}

.desktop-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -9px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    background: var(--accent);
    transition: transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #ffffff;
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
    transform: scaleX(1);
}

.mobile-toggle {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    color: white;
    background: rgba(15, 23, 42, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

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

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    flex-direction: column;
    gap: 12px;
}

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

.hero-slider {
    width: min(1180px, calc(100% - 32px));
    min-height: 620px;
    margin: 26px auto 0;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 32px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.hero-slide {
    min-height: 620px;
    position: relative;
    display: none;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 48px;
    padding: 72px;
    overflow: hidden;
}

.hero-slide.is-active {
    display: grid;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.82) 48%, rgba(15, 23, 42, 0.38) 100%),
        var(--hero-image) center / cover no-repeat;
    transform: scale(1.04);
    filter: saturate(1.05);
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 13px;
    font-weight: 900;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-summary {
    max-width: 720px;
    margin: 24px 0 0;
    color: #dbeafe;
    font-size: 19px;
}

.hero-tags,
.detail-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags,
.detail-tags {
    margin: 28px 0;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
    border: 1px solid rgba(125, 211, 252, 0.34);
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.13);
}

.hero-tags span,
.detail-tags span {
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
}

.card-tags span {
    padding: 3px 7px;
    font-size: 11px;
}

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

.btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

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

.btn.primary {
    color: white;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 16px 38px rgba(37, 99, 235, 0.35);
}

.btn.secondary {
    border: 1px solid rgba(203, 213, 225, 0.28);
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.64);
}

.hero-poster {
    display: block;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.52);
    transform: rotate(2deg);
}

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

.hero-controls {
    position: absolute;
    left: 72px;
    right: 72px;
    bottom: 34px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-controls button[data-hero-prev],
.hero-controls button[data-hero-next] {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(203, 213, 225, 0.25);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    position: relative;
}

.hero-controls button[data-hero-prev]::after,
.hero-controls button[data-hero-next]::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    border-top: 2px solid #e2e8f0;
    border-left: 2px solid #e2e8f0;
}

.hero-controls button[data-hero-prev]::after {
    transform: translate(-36%, -50%) rotate(-45deg);
}

.hero-controls button[data-hero-next]::after {
    transform: translate(-64%, -50%) rotate(135deg);
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 22px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.35);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
    width: 42px;
    background: #38bdf8;
}

.section-block {
    padding: 54px 0;
}

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

.section-head.single {
    align-items: center;
}

.section-head h2,
.search-strip h2,
.prose-grid h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.12;
}

.text-link {
    color: #7dd3fc;
    font-weight: 900;
}

.home-search {
    padding: 34px 0 0;
}

.search-strip,
.filter-box {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.25);
}

.search-strip {
    padding: 28px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 24px;
    align-items: center;
}

.search-form {
    display: flex;
    gap: 12px;
}

.search-form input,
.filter-box input,
.filter-box select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.2);
    outline: 0;
    border-radius: 16px;
    padding: 13px 15px;
    color: #e2e8f0;
    background: rgba(2, 6, 23, 0.62);
}

.search-form button {
    border: 0;
    border-radius: 16px;
    padding: 0 22px;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
}

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

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

.category-card {
    min-height: 178px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    background: var(--category-image) center / cover no-repeat;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.24);
}

.category-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.92));
}

.category-card strong,
.category-card em {
    position: relative;
    z-index: 2;
}

.category-card strong {
    font-size: 22px;
}

.category-card em {
    margin-top: 8px;
    color: #cbd5e1;
    font-style: normal;
    font-size: 14px;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    color: white;
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 15px 36px rgba(2, 6, 23, 0.3);
    transform: translateY(0);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(14, 165, 233, 0.22);
}

.poster-wrap {
    display: block;
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.92));
}

.card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    border-radius: 999px;
    transform: translate(-50%, -50%) scale(0.86);
    background: rgba(56, 189, 248, 0.84);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.card-play::after {
    content: "";
    position: absolute;
    top: 15px;
    left: 20px;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 15px solid white;
}

.movie-card:hover .card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.movie-info {
    min-height: 128px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 13px;
}

.movie-info strong {
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.card-tags {
    margin-top: auto;
}

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

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

.rank-item b {
    grid-row: span 2;
    color: #7dd3fc;
    font-size: 24px;
}

.rank-item span {
    font-weight: 900;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-item em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.page-hero {
    padding: 74px 0 42px;
    background:
        radial-gradient(circle at 20% 10%, rgba(56, 189, 248, 0.18), transparent 35rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.68));
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.compact-hero .container {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.page-hero p:not(.eyebrow) {
    margin: 18px auto 0;
    max-width: 780px;
    color: #cbd5e1;
    font-size: 18px;
}

.filter-panel {
    padding-top: 32px;
}

.filter-box {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 14px;
}

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

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

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

.rank-row {
    display: grid;
    grid-template-columns: 64px 76px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
    transform: translateX(5px);
    border-color: rgba(56, 189, 248, 0.42);
}

.rank-row b {
    color: #7dd3fc;
    font-size: 24px;
}

.rank-row img {
    width: 76px;
    height: 104px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-row strong {
    display: block;
    font-size: 20px;
}

.rank-row em {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-style: normal;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--detail-image) center / cover no-repeat;
}

.detail-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.78)),
        radial-gradient(circle at 75% 20%, rgba(56, 189, 248, 0.22), transparent 36rem);
    backdrop-filter: blur(4px);
}

.detail-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
    padding: 60px 0;
}

.detail-poster {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumb a {
    color: #7dd3fc;
}

.breadcrumb em {
    color: #e2e8f0;
    font-style: normal;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: black;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.video-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: black;
}

.player-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.68));
    cursor: pointer;
}

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

.play-symbol {
    width: 82px;
    height: 82px;
    border-radius: 999px;
    position: relative;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.45);
}

.play-symbol::after {
    content: "";
    position: absolute;
    top: 25px;
    left: 33px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid white;
}

.player-overlay strong {
    font-size: 20px;
}

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

.prose-grid article {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 26px;
    padding: 28px;
    background: rgba(15, 23, 42, 0.74);
}

.prose-grid p {
    margin: 16px 0 0;
    color: #cbd5e1;
    font-size: 16px;
}

.page-search {
    max-width: 720px;
    margin: 28px auto 0;
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    padding: 36px 0;
    color: #94a3b8;
    background: rgba(2, 6, 23, 0.78);
}

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

.footer-inner strong {
    color: white;
    font-size: 20px;
}

.footer-inner p {
    margin: 10px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    justify-content: flex-end;
}

.footer-links a {
    color: #cbd5e1;
}

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

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

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

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 260px;
        padding: 52px;
    }
}

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

    .mobile-toggle {
        display: flex;
    }

    .hero-slider,
    .hero-slide {
        min-height: auto;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 38px 24px 86px;
    }

    .hero-poster {
        max-width: 240px;
        transform: none;
    }

    .hero-controls {
        left: 24px;
        right: 24px;
        bottom: 24px;
    }

    .search-strip,
    .footer-inner,
    .detail-layout,
    .prose-grid {
        grid-template-columns: 1fr;
    }

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

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

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

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

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

@media (max-width: 540px) {
    .brand {
        font-size: 18px;
    }

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

    .search-form {
        flex-direction: column;
    }

    .rank-row {
        grid-template-columns: 44px 64px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-row img {
        width: 64px;
        height: 88px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 36px;
    }

    .section-block {
        padding: 38px 0;
    }
}
