:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-soft: rgba(30, 41, 59, 0.62);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-deep: #0891b2;
    --blue: #2563eb;
    --amber: #facc15;
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --shadow: 0 26px 80px rgba(0, 0, 0, 0.36);
}

* {
    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.18), transparent 28rem),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

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

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

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

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
    box-shadow: 0 12px 32px rgba(34, 211, 238, 0.26);
}

.desktop-nav,
.mobile-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.desktop-nav a,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #cbd5e1;
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #ffffff;
    background: rgba(34, 211, 238, 0.12);
}

.nav-toggle {
    display: none;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    padding: 8px 12px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.95);
    flex-wrap: wrap;
}

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

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-slides,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.02);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.86) 36%, rgba(2, 6, 23, 0.34) 72%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 42%, rgba(2, 6, 23, 0.54) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 620px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 90px 0 110px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 14px 0 18px;
    font-size: clamp(38px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.06em;
    max-width: 850px;
}

.hero-content p,
.page-hero p,
.detail-one-line {
    margin: 0;
    max-width: 720px;
    color: #cbd5e1;
    font-size: clamp(16px, 1.6vw, 20px);
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 11px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    color: #cffafe;
    background: rgba(8, 145, 178, 0.16);
    font-size: 13px;
}

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

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

.primary-btn,
.home-search-form button {
    color: #00111a;
    border: 0;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
    box-shadow: 0 18px 40px rgba(34, 211, 238, 0.24);
}

.ghost-btn {
    color: #e2e8f0;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

.primary-btn:hover,
.ghost-btn:hover,
.home-search-form button:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text);
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(12px);
    transform: translateY(-50%);
    font-size: 34px;
    line-height: 1;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

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

.section-heading,
.search-panel,
.filter-bar,
.detail-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading h2,
.search-panel h2,
.detail-text h2 {
    margin: 6px 0 0;
    font-size: clamp(24px, 3.4vw, 38px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.section-heading a {
    color: var(--cyan);
    font-weight: 800;
}

.quick-search {
    padding-bottom: 10px;
}

.search-panel,
.filter-bar,
.ranking-panel,
.player-shell,
.detail-text,
.category-card-large {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.66));
    box-shadow: var(--shadow);
}

.search-panel {
    padding: 26px;
}

.home-search-form {
    display: flex;
    gap: 12px;
    width: min(560px, 100%);
}

.home-search-form input,
.page-search {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.62);
    outline: none;
    padding: 0 18px;
}

.home-search-form input:focus,
.page-search:focus {
    border-color: rgba(34, 211, 238, 0.62);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

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

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

.movie-card:hover .poster-link img {
    transform: scale(1.06);
}

.poster-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 52%);
}

.score-badge,
.play-dot {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.score-badge {
    top: 12px;
    right: 12px;
    min-width: 42px;
    height: 28px;
    border-radius: 999px;
    color: #111827;
    background: var(--amber);
    font-weight: 900;
    font-size: 13px;
}

.play-dot {
    left: 14px;
    bottom: 14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #00111a;
    background: var(--cyan);
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

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

.movie-card h3 {
    margin: 0 0 8px;
    min-height: 50px;
    font-size: 17px;
    line-height: 1.35;
}

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

.movie-card p {
    margin: 0 0 14px;
    min-height: 45px;
    color: var(--muted);
    font-size: 14px;
}

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #94a3b8;
    font-size: 12px;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 28px;
    align-items: start;
}

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

.category-tile {
    min-height: 145px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 14rem),
        rgba(15, 23, 42, 0.74);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.32);
}

.category-tile span {
    color: var(--cyan);
    font-weight: 900;
}

.category-tile strong {
    font-size: 18px;
}

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

.ranking-panel {
    padding: 22px;
    position: sticky;
    top: 96px;
}

.compact-heading {
    margin-bottom: 18px;
}

.compact-heading h2 {
    font-size: 28px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.28);
}

.rank-poster {
    width: 58px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 12px;
}

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

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em {
    display: block;
}

.rank-info strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

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

.page-main {
    padding-bottom: 40px;
}

.page-hero {
    padding: 76px 0 24px;
}

.page-hero h1 {
    max-width: 1000px;
}

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

.category-card-large {
    overflow: hidden;
    display: grid;
    grid-template-columns: 210px 1fr;
}

.category-cover {
    position: relative;
    min-height: 260px;
    overflow: hidden;
}

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

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

.category-cover span {
    position: absolute;
    z-index: 2;
    left: 16px;
    bottom: 16px;
    font-weight: 900;
    font-size: 22px;
}

.category-card-body {
    padding: 24px;
}

.category-card-body h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.category-card-body p {
    margin: 0 0 18px;
    color: var(--muted);
}

.category-samples {
    display: grid;
    gap: 8px;
}

.category-samples a {
    color: #cffafe;
}

.filter-section {
    padding-top: 18px;
}

.filter-bar {
    align-items: stretch;
    padding: 18px;
    margin-bottom: 26px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.filter-chip,
.rank-tab {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(2, 6, 23, 0.46);
    padding: 10px 14px;
}

.filter-chip.is-active,
.rank-tab.is-active {
    color: #00111a;
    border-color: transparent;
    background: var(--cyan);
    font-weight: 900;
}

.wide-filter {
    display: block;
}

.rank-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 58px 92px 1fr 58px;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.68);
}

.ranking-row[data-rank-group="new"],
.ranking-row[data-rank-group="rated"] {
    display: none;
}

.ranking-row.is-visible {
    display: grid;
}

.ranking-index {
    color: var(--cyan);
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.ranking-cover {
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 3 / 4;
}

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

.ranking-text h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.ranking-text p {
    margin: 0 0 8px;
    color: #cbd5e1;
}

.ranking-text span {
    color: var(--muted);
    font-size: 13px;
}

.ranking-row > strong {
    color: var(--amber);
    font-size: 24px;
}

.breadcrumb {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 26px 0 8px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 34px;
    align-items: center;
    padding: 40px 0 24px;
}

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

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

.detail-info h1 {
    margin-top: 14px;
    font-size: clamp(34px, 5vw, 62px);
}

.detail-stats {
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 24px;
}

.detail-stats span {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.62);
}

.detail-stats strong,
.detail-stats a {
    color: var(--cyan);
}

.player-wrap {
    padding-top: 26px;
    padding-bottom: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    padding: 0;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #00111a;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.2));
    cursor: pointer;
}

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

.player-overlay span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 24px 70px rgba(34, 211, 238, 0.32);
    font-size: 36px;
    padding-left: 6px;
}

.detail-text {
    padding: 30px;
}

.detail-text h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.detail-text p {
    margin: 0 0 24px;
    color: #cbd5e1;
    font-size: 17px;
}

.detail-text p:last-child {
    margin-bottom: 0;
}

.movie-card-small .movie-card-body {
    padding: 14px;
}

.movie-card-small h3 {
    font-size: 16px;
}

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

.footer-inner {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
}

.footer-inner strong {
    color: var(--text);
}

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

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

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

    .ranking-panel {
        position: static;
    }

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

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

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

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

    .hero-arrow {
        display: none;
    }

    .search-panel,
    .home-search-form,
    .filter-bar,
    .section-heading,
    .footer-inner {
        flex-direction: column;
        align-items: stretch;
    }

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

    .category-card-large,
    .ranking-row {
        grid-template-columns: 1fr;
    }

    .ranking-cover {
        width: 120px;
    }

    .ranking-index {
        text-align: left;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .footer-inner,
    .section-wrap,
    .page-hero,
    .breadcrumb,
    .detail-hero,
    .hero-content {
        width: min(100% - 24px, 1180px);
    }

    .brand {
        font-size: 17px;
    }

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

    .hero-actions,
    .home-search-form {
        width: 100%;
    }

    .primary-btn,
    .ghost-btn,
    .home-search-form button {
        width: 100%;
    }

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

    .page-hero {
        padding-top: 48px;
    }

    .detail-info h1,
    .hero-content h1,
    .page-hero h1 {
        letter-spacing: -0.04em;
    }
}
