:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: #1e293b;
    --bg-card-2: #111827;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: #334155;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --yellow: #facc15;
    --radius: 18px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 34rem), linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid rgba(51, 65, 85, 0.86);
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand:hover {
    color: var(--cyan);
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), #2563eb);
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.36);
    font-size: 14px;
}

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

.nav-link,
.mobile-link {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

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

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 12px;
    color: #ffffff;
    background: #111827;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 10px 16px 18px;
    border-top: 1px solid rgba(51, 65, 85, 0.78);
}

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

.mobile-link {
    padding: 11px 12px;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.82);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.65s ease, visibility 0.65s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 38%, rgba(2, 6, 23, 0.42) 100%), var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    filter: saturate(1.08);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), #020617 96%);
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 56px;
    width: min(1180px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    padding: 84px 0 96px;
}

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid rgba(34, 211, 238, 0.34);
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(8, 145, 178, 0.12);
    font-size: 13px;
    font-weight: 800;
}

.hero-copy h1,
.page-hero h1 {
    margin: 20px 0 18px;
    color: #ffffff;
    font-size: clamp(36px, 6vw, 66px);
    line-height: 1.06;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p {
    max-width: 760px;
    color: #cbd5e1;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.detail-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(51, 65, 85, 0.78);
    font-size: 12px;
    font-weight: 700;
}

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

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

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

.btn.primary {
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
    box-shadow: 0 14px 30px rgba(34, 211, 238, 0.24);
}

.btn.ghost {
    color: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.42);
    background: rgba(15, 23, 42, 0.48);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 28px;
    background: #0f172a;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

.hero-poster:hover img {
    transform: scale(1.08);
}

.hero-poster span {
    position: absolute;
    inset: auto 24px 24px auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--cyan-strong);
    box-shadow: 0 16px 32px rgba(6, 182, 212, 0.32);
}

.hero-controls {
    position: absolute;
    right: max(16px, calc((100vw - 1180px) / 2));
    bottom: 34px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 3;
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(30, 41, 59, 0.8);
    font-size: 30px;
    line-height: 1;
}

.hero-arrow:hover {
    background: var(--cyan-strong);
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.72);
}

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

.search-band {
    border-block: 1px solid rgba(51, 65, 85, 0.78);
    background: rgba(15, 23, 42, 0.82);
}

.search-band-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    align-items: center;
    gap: 26px;
    padding: 30px 0;
}

.search-band h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 900;
}

.search-band p,
.section-heading p,
.site-footer p,
.movie-line,
.detail-panel p {
    color: var(--muted);
}

.top-search,
.main-filter-row {
    display: flex;
    gap: 10px;
}

.top-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(51, 65, 85, 0.94);
    border-radius: 14px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.62);
    padding: 0 14px;
    outline: none;
}

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

.top-search button {
    min-width: 88px;
    border: 0;
    border-radius: 14px;
    color: #001018;
    background: var(--cyan);
    font-weight: 900;
    cursor: pointer;
}

.page-stack {
    display: grid;
    gap: 46px;
    padding: 48px 0 68px;
}

.content-section {
    display: grid;
    gap: 22px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.section-heading h2 {
    margin: 0 0 6px;
    color: #ffffff;
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 0;
}

.section-more {
    flex: 0 0 auto;
    color: var(--cyan);
    font-weight: 800;
}

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

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

.movie-card {
    position: relative;
    display: grid;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.78);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.88);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(34, 211, 238, 0.7);
    box-shadow: 0 24px 50px rgba(8, 145, 178, 0.18);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #0f172a;
}

.compact-card .poster-wrap {
    aspect-ratio: 16 / 10;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.82) 100%);
    opacity: 0.72;
}

.play-mark,
.play-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--cyan-strong);
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.78);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.duration-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.duration-badge {
    right: 10px;
    top: 10px;
    padding: 5px 8px;
    background: rgba(0, 0, 0, 0.68);
}

.rank-badge {
    left: 10px;
    top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.movie-info {
    display: grid;
    gap: 10px;
    padding: 15px;
}

.movie-info strong {
    color: #ffffff;
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.movie-line {
    min-height: 38px;
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.compact-card .movie-line {
    display: none;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: #cbd5e1;
    font-size: 12px;
}

.tag-row {
    gap: 5px;
}

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

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

.category-tile {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.78);
    border-radius: 24px;
    background: #111827;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.tile-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(135deg, rgba(2, 6, 23, 0.92), rgba(8, 145, 178, 0.38)), var(--tile-image);
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.category-tile:hover .tile-bg {
    transform: scale(1.08);
}

.tile-content {
    position: relative;
    display: grid;
    align-content: end;
    gap: 8px;
    min-height: 180px;
    padding: 22px;
}

.tile-content strong {
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.tile-content em {
    color: #cbd5e1;
    font-style: normal;
    line-height: 1.55;
}

.tile-content small {
    color: var(--cyan);
    line-height: 1.5;
}

.sub-page {
    min-height: 70vh;
}

.page-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(8, 47, 73, 0.92), rgba(15, 23, 42, 0.96));
}

.small-hero .site-container,
.page-hero-inner {
    position: relative;
    padding: 72px 0;
}

.page-hero h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.ranking-hero {
    min-height: 420px;
}

.ranking-hero .hero-bg {
    opacity: 0.75;
}

.filter-panel {
    display: grid;
    gap: 14px;
    border: 1px solid rgba(51, 65, 85, 0.78);
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.78);
    padding: 18px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.main-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
}

.chip-row button {
    min-height: 36px;
    border: 1px solid rgba(51, 65, 85, 0.85);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    padding: 0 13px;
    cursor: pointer;
}

.chip-row button:hover,
.chip-row button.active {
    color: #001018;
    border-color: var(--cyan);
    background: var(--cyan);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(280px, 0.9fr);
    gap: 28px;
}

.detail-main {
    display: grid;
    gap: 22px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.85);
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: radial-gradient(circle, rgba(8, 145, 178, 0.16), rgba(0, 0, 0, 0.46));
    cursor: pointer;
}

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

.play-large {
    width: 84px;
    height: 84px;
    padding-left: 6px;
    font-size: 34px;
    box-shadow: 0 18px 42px rgba(6, 182, 212, 0.34);
}

.detail-panel,
.side-card {
    border: 1px solid rgba(51, 65, 85, 0.78);
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.86);
    padding: 24px;
}

.detail-panel h1 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.18;
    font-weight: 900;
}

.detail-panel h2,
.side-card h2,
.site-footer h2 {
    margin: 24px 0 12px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
}

.detail-panel h2:first-of-type,
.side-card h2:first-of-type {
    margin-top: 0;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.detail-meta span {
    padding: 7px 10px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.72);
    font-size: 13px;
    font-weight: 800;
}

.detail-panel p {
    margin: 0 0 14px;
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.95;
    text-align: justify;
}

.lead-text {
    color: #ffffff !important;
    font-size: 17px !important;
}

.detail-tags a:hover {
    color: #001018;
    background: var(--cyan);
}

.detail-side {
    align-self: start;
    position: sticky;
    top: 88px;
}

.side-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 18px;
}

.side-card dl {
    display: grid;
    gap: 12px;
    margin: 0;
}

.side-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.68);
}

.side-card dt {
    color: var(--muted);
}

.side-card dd {
    margin: 0;
    color: #ffffff;
    font-weight: 800;
    text-align: right;
}

.site-footer {
    border-top: 1px solid rgba(51, 65, 85, 0.78);
    background: rgba(15, 23, 42, 0.96);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 38px;
    padding: 42px 0;
}

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

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

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

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

.footer-bottom {
    padding: 18px 16px;
    border-top: 1px solid rgba(51, 65, 85, 0.78);
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

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

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

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

    .hero-content {
        grid-template-columns: minmax(0, 1fr) 280px;
    }
}

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

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

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

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

    .hero-content {
        grid-template-columns: 1fr;
        gap: 26px;
        padding: 58px 0 94px;
    }

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

    .hero-controls {
        left: 16px;
        right: auto;
    }

    .search-band-inner,
    .detail-layout,
    .footer-grid,
    .main-filter-row {
        grid-template-columns: 1fr;
    }

    .detail-side {
        position: static;
    }
}

@media (max-width: 640px) {
    .site-container {
        width: min(100% - 24px, 1180px);
    }

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

    .movie-info {
        padding: 12px;
    }

    .movie-info strong {
        font-size: 14px;
    }

    .movie-line {
        display: none;
    }

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

    .detail-panel,
    .side-card,
    .filter-panel {
        padding: 16px;
        border-radius: 18px;
    }

    .page-stack {
        gap: 32px;
        padding: 32px 0 48px;
    }

    .small-hero .site-container,
    .page-hero-inner {
        padding: 52px 0;
    }
}
