:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --bg-card-solid: #111827;
    --border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --violet: #8b5cf6;
    --orange: #f97316;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    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(34, 211, 238, 0.14), transparent 32rem),
        radial-gradient(circle at top right, rgba(139, 92, 246, 0.16), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    color: var(--text);
}

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

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

.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);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
}

.nav-shell {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 190px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    box-shadow: 0 16px 35px rgba(34, 211, 238, 0.22);
    color: #00111a;
    font-size: 15px;
}

.brand-text strong,
.footer-logo {
    display: block;
    font-size: 20px;
    line-height: 1.05;
    letter-spacing: 0.02em;
}

.brand-text small {
    color: var(--cyan);
    font-size: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.nav-link {
    font-size: 15px;
    color: var(--muted);
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}

.nav-search input,
.wide-search input,
.filter-bar input,
.filter-bar select {
    border: 1px solid var(--border);
    color: var(--text);
    background: rgba(15, 23, 42, 0.84);
    border-radius: 999px;
    padding: 11px 16px;
    outline: none;
    min-width: 0;
}

.nav-search input {
    width: 220px;
}

.nav-search input:focus,
.wide-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(34, 211, 238, 0.8);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.nav-search button,
.wide-search button,
.btn,
.nav-toggle {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.wide-search button:hover,
.btn:hover,
.nav-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 35px rgba(34, 211, 238, 0.18);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    color: var(--text);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border);
}

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

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(15, 23, 42, 0.36) 100%),
        radial-gradient(circle at 28% 22%, rgba(34, 211, 238, 0.18), transparent 24rem);
}

.hero-content {
    position: relative;
    min-height: 660px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 360px;
    gap: 54px;
    align-items: center;
    padding: 90px 0 74px;
}

.eyebrow {
    color: var(--cyan);
    margin: 0 0 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    max-width: 820px;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-line {
    margin: 22px 0 0;
    color: #e0f2fe;
    font-size: clamp(18px, 2.1vw, 24px);
    line-height: 1.5;
    max-width: 780px;
}

.hero-desc {
    margin: 16px 0 0;
    color: var(--muted);
    line-height: 1.8;
    max-width: 760px;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.hero-tags span,
.tag-row span {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.2);
    color: #a5f3fc;
    font-size: 12px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

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

.btn.text {
    color: var(--cyan);
    background: transparent;
    padding-left: 4px;
}

.hero-poster {
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 500px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(139, 92, 246, 0.14));
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

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

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

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

.search-panel,
.page-hero,
.detail-hero,
.player-section,
.detail-content,
.filter-bar,
.category-overview-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.18);
}

.search-panel {
    margin-top: -42px;
    position: relative;
    z-index: 8;
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 24px;
    align-items: center;
    padding: 26px;
    backdrop-filter: blur(18px);
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.player-section h2,
.detail-content h2 {
    margin: 0;
}

.search-panel p,
.section-heading p,
.page-hero p,
.detail-content p,
.category-overview-card p,
.footer-grid p {
    color: var(--muted);
    line-height: 1.75;
}

.wide-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.content-section {
    padding: 74px 0 0;
}

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

.section-heading p {
    margin: 0 0 6px;
    color: var(--cyan);
    font-weight: 700;
}

.section-heading h2 {
    font-size: clamp(26px, 3vw, 42px);
    letter-spacing: -0.04em;
}

.section-more {
    color: var(--cyan);
    font-weight: 700;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.32);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.28), rgba(139, 92, 246, 0.18)),
        var(--bg-soft);
    overflow: hidden;
}

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

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

.poster-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 6px 9px;
    border-radius: 999px;
    color: #00111a;
    background: rgba(103, 232, 249, 0.92);
    font-size: 12px;
    font-weight: 800;
}

.movie-card-body {
    padding: 15px;
}

.movie-title,
.rank-title {
    display: block;
    color: var(--text);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
}

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

.movie-meta,
.movie-desc {
    margin: 9px 0 0;
    color: var(--subtle);
    font-size: 13px;
    line-height: 1.6;
}

.movie-desc {
    color: var(--muted);
}

.rank-strip,
.rank-list {
    display: grid;
    gap: 16px;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 58px 82px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.65);
}

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

.rank-cover {
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-soft);
}

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

.rank-info p {
    margin: 8px 0;
    color: var(--muted);
    line-height: 1.6;
}

.rank-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rank-meta span,
.detail-meta span {
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--muted);
    font-size: 12px;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.26;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-tile:hover img {
    opacity: 0.38;
    transform: scale(1.08);
}

.category-tile span,
.category-tile small,
.category-tile em {
    position: relative;
    z-index: 2;
}

.category-tile span {
    font-size: 20px;
    font-weight: 900;
}

.category-tile small {
    color: var(--cyan);
    margin-top: 4px;
}

.category-tile em {
    margin-top: 10px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    line-height: 1.55;
}

.page-main {
    padding: 34px 0 80px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--subtle);
    font-size: 14px;
    margin: 6px 0 18px;
}

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

.breadcrumb span::before,
.breadcrumb a + a::before {
    content: "/";
    color: var(--subtle);
    margin-right: 10px;
}

.page-hero.compact {
    padding: 34px;
    margin-bottom: 24px;
}

.page-hero.compact h1 {
    font-size: clamp(32px, 4vw, 54px);
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 18px;
    margin-bottom: 24px;
}

.filter-bar input {
    width: 100%;
}

.filter-bar select {
    min-width: 170px;
}

.result-count {
    color: var(--cyan);
    margin: 0 0 16px;
    font-weight: 700;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 172px 1fr;
    gap: 18px;
    padding: 16px;
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    overflow: hidden;
    border-radius: 16px;
}

.category-covers img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: var(--bg-soft);
}

.category-overview-card h2 {
    margin: 4px 0 8px;
}

.category-overview-card span {
    display: inline-block;
    color: var(--cyan);
    font-weight: 800;
}

.detail-main {
    max-width: 1180px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 34px;
    padding: 26px;
    align-items: center;
}

.detail-cover {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-soft);
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    font-size: clamp(34px, 5vw, 64px);
}

.detail-one-line {
    color: #e0f2fe;
    font-size: 19px;
    line-height: 1.65;
}

.detail-meta {
    margin-top: 16px;
}

.detail-info .btn {
    display: inline-flex;
    margin-top: 24px;
}

.player-section,
.detail-content {
    margin-top: 24px;
    padding: 26px;
}

.watch-player {
    position: relative;
    margin-top: 18px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #000;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--border);
}

.main-video,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.main-video {
    z-index: 1;
    background: #000;
}

.player-cover {
    z-index: 2;
    border: 0;
    padding: 0;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: var(--text);
    background: #000;
}

.player-cover[hidden] {
    display: none;
}

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

.play-mark {
    position: relative;
    z-index: 3;
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    color: #00111a;
    font-size: 30px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
}

.player-cover strong {
    position: absolute;
    z-index: 3;
    top: calc(50% + 58px);
    font-size: 18px;
}

.detail-content p {
    font-size: 17px;
}

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

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 34px;
    padding: 44px 0;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-logo {
    color: var(--text);
    font-weight: 900;
}

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

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

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

[data-card].is-hidden {
    display: none;
}

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

    .hero-content {
        grid-template-columns: 1fr 280px;
    }

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

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

@media (max-width: 820px) {
    .nav-shell {
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 0;
    }

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

    .nav-link {
        padding: 12px 0;
        border-top: 1px solid var(--border);
    }

    .nav-toggle {
        display: inline-flex;
    }

    .hero-carousel,
    .hero-content {
        min-height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding: 72px 0 82px;
    }

    .hero-poster {
        display: none;
    }

    .search-panel,
    .wide-search,
    .filter-bar,
    .detail-hero,
    .category-overview-card,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    .brand {
        min-width: 0;
    }

    .brand-text strong {
        font-size: 17px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 34px;
        letter-spacing: -0.04em;
    }

    .movie-grid,
    .large-grid,
    .related-grid,
    .category-grid,
    .category-overview-grid,
    .rank-strip {
        grid-template-columns: 1fr;
    }

    .rank-card {
        grid-template-columns: 46px 70px 1fr;
        gap: 10px;
    }

    .page-hero.compact,
    .detail-hero,
    .player-section,
    .detail-content {
        padding: 20px;
    }
}
