:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.72);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #06b6d4;
    --blue: #2563eb;
    --green: #22c55e;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 18% 2%, rgba(6, 182, 212, 0.16), transparent 28rem),
        radial-gradient(circle at 82% 18%, rgba(37, 99, 235, 0.16), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

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

.header-inner {
    width: min(1240px, calc(100% - 28px));
    margin: 0 auto;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 35px rgba(6, 182, 212, 0.35);
    font-size: 14px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
}

.nav-link {
    color: #cbd5e1;
    padding: 10px 12px;
    border-radius: 999px;
    font-size: 14px;
    transition: color 0.25s ease, background 0.25s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    background: rgba(6, 182, 212, 0.14);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.82);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #e2e8f0;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 28px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.94);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mobile-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.03);
}

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

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

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

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

.hero-image,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.94) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, #020617 0%, transparent 35%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 56px;
    padding-top: 32px;
}

.hero-copy {
    width: min(680px, 100%);
}

.hero-kicker,
.page-hero span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 18px 40px rgba(6, 182, 212, 0.28);
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 22px 0 20px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    margin: 0;
    max-width: 760px;
    color: #cbd5e1;
    font-size: 19px;
    line-height: 1.78;
}

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

.hero-tags {
    margin: 24px 0 0;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.68);
    color: #dbeafe;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
}

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

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

.primary-btn {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #ffffff;
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.38);
}

.ghost-btn,
.section-more {
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.5);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 46px rgba(6, 182, 212, 0.28);
}

.hero-poster {
    position: relative;
    width: min(300px, 28vw);
    aspect-ratio: 2 / 3;
    flex: 0 0 auto;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.9);
    color: #ffffff;
    font-weight: 800;
    font-size: 13px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    font-size: 30px;
    cursor: pointer;
    z-index: 5;
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

.hero-dot.is-active {
    background: #22d3ee;
}

.section {
    padding: 56px 0;
}

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

.section-head h2,
.rank-panel h2,
.story-card h2,
.side-card h2 {
    margin: 0;
    font-size: clamp(25px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.search-section {
    padding-top: 34px;
    padding-bottom: 18px;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.58);
    padding: 18px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(16px);
}

.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 18px;
    min-height: 50px;
}

.search-input-wrap span {
    color: var(--cyan);
    font-size: 22px;
}

.search-input-wrap input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
}

.quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.quick-filters button {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.04);
    padding: 9px 12px;
    cursor: pointer;
}

.quick-filters button:hover {
    color: #ffffff;
    border-color: rgba(6, 182, 212, 0.52);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.55));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: 0 24px 70px rgba(6, 182, 212, 0.12);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 22;
    overflow: hidden;
}

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

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

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

.play-dot {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #ffffff;
    box-shadow: 0 12px 32px rgba(6, 182, 212, 0.36);
    font-size: 13px;
}

.rank-badge {
    position: absolute;
    left: 14px;
    top: 14px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 7px 10px;
    color: #22d3ee;
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #67e8f9;
    font-size: 12px;
    margin-bottom: 10px;
}

.card-body h3 {
    margin: 0;
    min-height: 52px;
    font-size: 17px;
    line-height: 1.45;
}

.card-body h3 a:hover {
    color: #22d3ee;
}

.card-body p {
    margin: 10px 0 14px;
    color: #a7b3c6;
    font-size: 14px;
    line-height: 1.65;
    min-height: 68px;
}

.tag-row span {
    padding: 4px 8px;
}

.empty-message {
    display: none;
    text-align: center;
    color: #cbd5e1;
    padding: 42px 0;
}

.split-section {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 26px;
    align-items: start;
}

.rank-panel,
.side-card,
.story-card {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.rank-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
}

.rank-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.rank-panel-head a {
    color: #22d3ee;
    font-weight: 700;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 38px 72px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.42);
    border: 1px solid transparent;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.rank-item:hover {
    border-color: rgba(6, 182, 212, 0.38);
    background: rgba(6, 182, 212, 0.08);
}

.rank-num {
    color: #22d3ee;
    font-weight: 900;
    font-size: 20px;
}

.rank-item img {
    width: 72px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
}

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

.rank-text strong {
    color: #ffffff;
    line-height: 1.35;
}

.rank-text em {
    margin-top: 4px;
    color: #94a3b8;
    font-size: 12px;
    font-style: normal;
}

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

.category-tile,
.category-card-large a {
    display: block;
    min-height: 150px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(6, 182, 212, 0.16), rgba(37, 99, 235, 0.08)),
        rgba(15, 23, 42, 0.65);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover,
.category-card-large a:hover {
    transform: translateY(-4px);
    border-color: rgba(6, 182, 212, 0.45);
}

.category-tile span,
.category-card-large h2 {
    display: block;
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong,
.category-card-large p {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.7;
    font-weight: 500;
}

.page-shell {
    padding: 46px 0 20px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 32px;
    min-height: 310px;
    padding: 48px;
    background:
        radial-gradient(circle at 88% 18%, rgba(6, 182, 212, 0.3), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.8));
    box-shadow: var(--shadow);
}

.slim-hero {
    min-height: 250px;
}

.category-hero,
.ranking-hero {
    margin-bottom: 18px;
}

.hero-inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-inline-links a {
    color: #dbeafe;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    padding: 8px 12px;
}

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

.category-card-large a {
    min-height: 230px;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.category-samples span {
    color: #a5f3fc;
    background: rgba(6, 182, 212, 0.09);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
}

.top-rank-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 28px;
}

.top-rank-card {
    position: relative;
    overflow: hidden;
    min-height: 240px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #020617;
}

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

.top-rank-card span,
.top-rank-card strong,
.top-rank-card em {
    position: relative;
    z-index: 2;
    display: block;
    margin-left: 18px;
    margin-right: 18px;
}

.top-rank-card span {
    margin-top: 18px;
    color: #22d3ee;
    font-weight: 900;
}

.top-rank-card strong {
    margin-top: 112px;
    font-size: 20px;
}

.top-rank-card em {
    margin-top: 6px;
    color: #cbd5e1;
    font-style: normal;
}

.detail-shell {
    background: #020617;
}

.detail-hero {
    position: relative;
    min-height: 760px;
    overflow: hidden;
    padding: 42px 0 64px;
}

.detail-bg {
    filter: blur(4px) saturate(1.08);
    transform: scale(1.04);
    opacity: 0.38;
}

.detail-bg-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.55)),
        linear-gradient(0deg, #020617 0%, transparent 42%);
}

.detail-layout {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
    gap: 34px;
    align-items: center;
}

.player-panel {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    overflow: hidden;
    background: #000000;
    box-shadow: var(--shadow);
}

.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.movie-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 1;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: #000000;
    cursor: pointer;
}

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

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

.big-play {
    position: relative;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #ffffff;
    box-shadow: 0 24px 70px rgba(6, 182, 212, 0.42);
    font-size: 32px;
    padding-left: 6px;
}

.detail-info {
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.65);
    padding: 30px;
    backdrop-filter: blur(18px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #22d3ee;
}

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

.detail-meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.detail-meta-grid span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.56);
    color: #dbeafe;
    border: 1px solid var(--line);
}

.detail-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    margin-top: -40px;
    position: relative;
    z-index: 3;
}

.story-card,
.side-card {
    padding: 28px;
}

.story-card h2 {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 24px;
}

.story-card h2:not(:first-child) {
    margin-top: 30px;
}

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

.side-card {
    height: fit-content;
    position: sticky;
    top: 92px;
}

.side-card h2 {
    margin-bottom: 18px;
    font-size: 24px;
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a:hover {
    color: #22d3ee;
}

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

    .menu-toggle {
        display: block;
    }

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

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

    .rank-panel,
    .side-card {
        position: static;
    }

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

@media (max-width: 760px) {
    .hero-carousel {
        height: 680px;
    }

    .hero-content {
        align-items: flex-end;
        padding-bottom: 80px;
    }

    .hero-poster {
        display: none;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 38px;
    }

    .hero-copy p,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .hero-arrow {
        display: none;
    }

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

    .search-panel {
        grid-template-columns: 1fr;
    }

    .quick-filters {
        justify-content: flex-start;
    }

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

    .page-hero {
        padding: 30px;
        border-radius: 24px;
    }

    .detail-hero {
        min-height: auto;
        padding-bottom: 44px;
    }

    .detail-info {
        padding: 22px;
    }

    .footer-links {
        flex-wrap: wrap;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .small-grid,
    .category-grid,
    .category-large-grid,
    .top-rank-grid {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 34px 62px 1fr;
    }

    .rank-item img {
        width: 62px;
        height: 44px;
    }

    .big-play {
        width: 72px;
        height: 72px;
        font-size: 26px;
    }
}
