:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.82);
    --bg-card-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(6, 182, 212, 0.35);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-soft: rgba(34, 211, 238, 0.14);
    --orange: #fb923c;
    --pink: #f472b6;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.16), transparent 32rem),
        radial-gradient(circle at 92% 12%, rgba(244, 114, 182, 0.14), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #06111f 48%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(18px);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.logo-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(34, 211, 238, 0.45);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.28), rgba(99, 102, 241, 0.22)),
        rgba(15, 23, 42, 0.9);
    color: var(--cyan);
    box-shadow: 0 14px 34px rgba(34, 211, 238, 0.12);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-title {
    font-size: 18px;
}

.logo-subtitle {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--muted-strong);
    font-size: 15px;
    font-weight: 700;
}

.desktop-nav a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover {
    color: var(--cyan);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
    color: var(--text);
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 12px 0 18px;
}

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

.mobile-nav a {
    display: block;
    padding: 12px 0;
    color: var(--muted-strong);
    font-weight: 700;
}

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

.hero-carousel {
    position: relative;
    min-height: 76vh;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: end;
    padding: 108px 0 56px;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 1.1s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-slide::before {
    position: absolute;
    inset: 0;
    content: "";
    background:
        radial-gradient(circle at 70% 18%, rgba(34, 211, 238, 0.22), transparent 26rem),
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.62) 54%, rgba(2, 6, 23, 0.88)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 55%, rgba(2, 6, 23, 0.75) 100%);
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.55fr);
    gap: 34px;
    align-items: end;
}

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    color: #a5f3fc;
    font-size: 13px;
    font-weight: 800;
    backdrop-filter: blur(14px);
}

.hero h1 {
    margin: 20px 0 16px;
    font-size: clamp(36px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.08em;
}

.hero-lead {
    max-width: 720px;
    color: var(--muted-strong);
    font-size: clamp(16px, 2vw, 21px);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 800;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, #22d3ee, #67e8f9);
    color: #07111f;
    box-shadow: 0 16px 40px rgba(34, 211, 238, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 22px 54px rgba(34, 211, 238, 0.28);
}

.btn-ghost {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.68);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(15, 23, 42, 0.92);
}

.hero-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.26);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

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

.hero-panel-body {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 24px;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.94) 42%, rgba(2, 6, 23, 0.98));
}

.hero-panel-title {
    display: block;
    font-size: 24px;
    font-weight: 900;
}

.hero-panel-meta {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.hero-controls {
    position: absolute;
    right: max(16px, calc((100% - 1180px) / 2));
    bottom: 24px;
    display: flex;
    gap: 10px;
    z-index: 4;
}

.hero-dot {
    width: 42px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-rail {
    position: relative;
    z-index: 5;
    margin-top: -36px;
}

.hero-rail-inner {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.hero-mini {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 102px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(16px);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.hero-mini:hover {
    border-color: var(--line-strong);
    transform: translateY(-3px);
}

.hero-mini img {
    width: 72px;
    height: 78px;
    border-radius: 16px;
    object-fit: cover;
}

.hero-mini strong {
    display: block;
    overflow: hidden;
    color: var(--text);
    font-size: 14px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-mini span {
    color: var(--muted);
    font-size: 12px;
}

.page-main {
    padding: 54px 0 76px;
}

.section {
    margin-top: 58px;
}

.section:first-child {
    margin-top: 0;
}

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

.section-title-group {
    min-width: 0;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section h2,
.page-title,
.detail-title {
    margin: 0;
    color: var(--text);
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-desc,
.page-desc {
    max-width: 780px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 16px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 18px 56px rgba(0, 0, 0, 0.18);
}

.search-input {
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    outline: none;
    background: rgba(2, 6, 23, 0.76);
    color: var(--text);
}

.search-input:focus {
    border-color: rgba(34, 211, 238, 0.58);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

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

.filter-button {
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: var(--muted-strong);
    font-size: 13px;
    font-weight: 800;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.filter-button:hover,
.filter-button.is-active {
    border-color: rgba(34, 211, 238, 0.52);
    background: var(--cyan-soft);
    color: #e0faff;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--bg-card);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    border-color: rgba(34, 211, 238, 0.42);
    transform: translateY(-5px);
    box-shadow: 0 24px 60px rgba(8, 145, 178, 0.16);
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(244, 114, 182, 0.12));
}

.movie-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover .movie-cover img {
    transform: scale(1.06);
    opacity: 0.88;
}

.movie-badge,
.movie-score,
.movie-rank {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.movie-badge {
    top: 10px;
    left: 10px;
    background: rgba(2, 6, 23, 0.72);
    color: #e0f2fe;
    backdrop-filter: blur(10px);
}

.movie-score {
    right: 10px;
    bottom: 10px;
    background: rgba(250, 204, 21, 0.92);
    color: #1e1b04;
}

.movie-rank {
    top: 10px;
    right: 10px;
    background: rgba(34, 211, 238, 0.92);
    color: #042f3a;
}

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

.movie-card h3 {
    margin: 0;
    color: var(--text);
    font-size: 16px;
    line-height: 1.35;
}

.movie-card h3 a {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    margin: 9px 0 0;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        radial-gradient(circle at 85% 16%, rgba(34, 211, 238, 0.18), transparent 14rem),
        rgba(15, 23, 42, 0.76);
    transition: transform 0.24s ease, border-color 0.24s ease;
}

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

.category-card h3 {
    margin: 0;
    font-size: 24px;
    letter-spacing: -0.04em;
}

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

.category-card .category-link {
    display: inline-flex;
    color: #a5f3fc;
    font-size: 14px;
    font-weight: 900;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 86px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    border-color: rgba(34, 211, 238, 0.38);
    transform: translateX(4px);
}

.rank-index {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 15px;
    background: rgba(34, 211, 238, 0.14);
    color: var(--cyan);
    font-weight: 900;
}

.rank-item img {
    width: 86px;
    height: 116px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-title {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
}

.rank-desc {
    display: -webkit-box;
    overflow: hidden;
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.rank-score {
    color: #facc15;
    font-size: 20px;
    font-weight: 900;
}

.page-hero {
    padding: 62px 0 34px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.14), transparent 26rem),
        radial-gradient(circle at 76% 24%, rgba(244, 114, 182, 0.12), transparent 22rem);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
    gap: 34px;
    align-items: start;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

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

.detail-info {
    align-self: center;
}

.detail-title {
    font-size: clamp(34px, 5vw, 58px);
}

.detail-lead {
    margin: 16px 0 0;
    color: var(--muted-strong);
    font-size: 18px;
}

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

.info-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.info-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.info-card p {
    margin: 0;
    color: var(--muted-strong);
}

.info-card + .info-card {
    margin-top: 18px;
}

.watch-card {
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 28px;
    background: rgba(2, 6, 23, 0.86);
    box-shadow: var(--shadow);
}

.watch-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}

.watch-head h2 {
    margin: 0;
    font-size: 22px;
}

.video-frame {
    position: relative;
    background: #000;
}

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

.player-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 40%, rgba(34, 211, 238, 0.18), transparent 14rem),
        linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-layer.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.play-now {
    display: inline-flex;
    width: 104px;
    height: 104px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.86);
    color: #082f49;
    font-size: 38px;
    font-weight: 900;
    box-shadow: 0 22px 70px rgba(34, 211, 238, 0.32);
    transition: transform 0.2s ease, background 0.2s ease;
}

.play-now:hover {
    transform: scale(1.06);
    background: #67e8f9;
}

.empty-message {
    display: none;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.62);
}

.empty-message.is-visible {
    display: block;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 36px 0;
    background: rgba(2, 6, 23, 0.82);
    color: var(--muted);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

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

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

@media (min-width: 1024px) {
    .movie-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

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

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

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding-bottom: 48px;
    }

    .hero-panel {
        display: none;
    }

    .hero-rail {
        display: none;
    }

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

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

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

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

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

    .header-inner {
        min-height: 64px;
    }

    .logo-title {
        font-size: 16px;
    }

    .logo-subtitle {
        display: none;
    }

    .hero,
    .hero-carousel,
    .hero-slide {
        min-height: 72vh;
    }

    .hero-slide {
        padding: 92px 0 46px;
    }

    .hero h1 {
        font-size: clamp(32px, 12vw, 48px);
    }

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

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

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

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

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

    .movie-desc {
        display: none;
    }

    .rank-item {
        grid-template-columns: 42px 68px minmax(0, 1fr);
    }

    .rank-item img {
        width: 68px;
        height: 92px;
    }

    .rank-score {
        display: none;
    }

    .play-now {
        width: 76px;
        height: 76px;
        font-size: 30px;
    }
}
