:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: #111c34;
    --bg-card: rgba(15, 23, 42, 0.74);
    --line: rgba(148, 163, 184, 0.2);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --blue: #2563eb;
    --cyan: #22d3ee;
    --cyan-soft: rgba(34, 211, 238, 0.16);
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.36);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.24), transparent 36rem),
        radial-gradient(circle at 92% 14%, rgba(34, 211, 238, 0.18), transparent 34rem),
        linear-gradient(180deg, #0f172a 0%, #15213a 48%, #0f172a 100%);
    color: var(--text);
    min-height: 100vh;
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 64, 175, 0.9), rgba(15, 23, 42, 0.94));
    border-bottom: 1px solid rgba(34, 211, 238, 0.18);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.28);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #22d3ee);
    color: white;
    font-weight: 900;
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.36);
}

.brand-text {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #60a5fa, #67e8f9, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.nav-search {
    flex: 1 1 auto;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.56);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    padding: 6px;
}

.nav-search input,
.mobile-search input,
.filter-input {
    width: 100%;
    border: 0;
    outline: 0;
    color: white;
    background: transparent;
}

.nav-search input {
    padding: 8px 12px;
}

.nav-search button,
.mobile-search button,
.hero-search button,
.primary-button,
.secondary-button,
.play-overlay-button {
    border: 0;
    color: white;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button {
    padding: 8px 16px;
}

.nav-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.play-overlay-button:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.32);
}

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

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

.nav-link:hover,
.nav-link.active {
    color: #67e8f9;
    background: rgba(37, 99, 235, 0.22);
}

.menu-button {
    display: none;
    border: 0;
    background: rgba(15, 23, 42, 0.56);
    border-radius: 14px;
    padding: 10px;
}

.menu-button span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 4px 0;
    background: white;
    border-radius: 2px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    padding: 14px 16px 18px;
    background: rgba(15, 23, 42, 0.96);
}

.mobile-panel.open {
    display: block;
}

.mobile-search {
    display: flex;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.72);
}

.mobile-search button {
    padding: 8px 14px;
}

.mobile-links {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

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

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

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

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

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 40%, rgba(2, 6, 23, 0.12) 100%),
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0) 30%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(640px, 100%);
    padding: 120px 0 84px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(34, 211, 238, 0.32);
    border-radius: 999px;
    color: #cffafe;
    background: rgba(37, 99, 235, 0.34);
    font-size: 14px;
    margin-bottom: 18px;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.hero p {
    margin: 0 0 26px;
    color: #dbeafe;
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.75;
}

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

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    font-weight: 800;
}

.secondary-button {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.26);
    box-shadow: none;
}

.hero-search {
    display: flex;
    gap: 8px;
    width: min(520px, 100%);
    margin-top: 24px;
    padding: 8px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(14px);
}

.hero-search input {
    flex: 1;
    border: 0;
    outline: 0;
    color: white;
    background: transparent;
    padding: 10px 14px;
}

.hero-search button {
    padding: 10px 18px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.54);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 34px;
    background: white;
}

.main-content {
    padding: 54px 0 72px;
}

.home-section,
.category-hero,
.detail-panel,
.search-hero,
.ranking-hero,
.category-overview-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.74));
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.home-section {
    padding: 26px;
    margin-bottom: 34px;
}

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

.section-heading p,
.category-hero p,
.search-hero p,
.ranking-hero p {
    margin: 0 0 8px;
    color: #67e8f9;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-heading h2,
.category-hero h1,
.search-hero h1,
.ranking-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

.section-more {
    color: #67e8f9;
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.7);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 22px 48px rgba(2, 6, 23, 0.44);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.8);
}

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

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.76));
}

.poster-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #22d3ee);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.35);
}

.rank-badge {
    position: absolute;
    z-index: 3;
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.92);
    color: white;
    font-size: 12px;
}

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

.movie-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #93c5fd;
    font-size: 13px;
    margin-bottom: 10px;
}

.movie-card h2 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h2 a:hover,
.rank-info h2 a:hover {
    color: #67e8f9;
}

.movie-card p {
    margin: 0 0 12px;
    color: #cbd5e1;
    line-height: 1.65;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span {
    padding: 5px 8px;
    border-radius: 999px;
    color: #cffafe;
    background: rgba(34, 211, 238, 0.12);
    font-size: 12px;
}

.category-card {
    display: flex;
    min-height: 164px;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(34, 211, 238, 0.1)),
        rgba(15, 23, 42, 0.72);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.6;
}

.category-card span {
    color: #67e8f9;
    font-weight: 800;
    margin-top: 18px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 150px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.66);
}

.list-rank {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(37, 99, 235, 0.2);
    color: #67e8f9;
    font-weight: 900;
}

.rank-cover {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 16px;
}

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

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-info p {
    margin: 0 0 10px;
    color: #cbd5e1;
    line-height: 1.6;
}

.category-hero,
.search-hero,
.ranking-hero {
    padding: 34px;
    margin-bottom: 28px;
}

.category-hero .lead,
.search-hero .lead,
.ranking-hero .lead {
    max-width: 820px;
    margin: 12px 0 0;
    color: #cbd5e1;
    line-height: 1.75;
    font-size: 16px;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.66);
    margin-bottom: 24px;
}

.filter-input {
    padding: 12px 14px;
}

.filter-bar button {
    border: 0;
    border-radius: 14px;
    color: white;
    background: rgba(37, 99, 235, 0.68);
    padding: 12px 16px;
}

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

.breadcrumb a:hover {
    color: #67e8f9;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 24px;
    align-items: start;
}

.player-panel {
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: var(--shadow);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.player-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-stage video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #020617;
    z-index: 3;
}

.play-layer.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    filter: saturate(1.08);
}

.play-layer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08), rgba(2, 6, 23, 0.74));
}

.play-overlay-button {
    position: relative;
    z-index: 4;
    width: 86px;
    height: 86px;
    font-size: 32px;
    display: grid;
    place-items: center;
    padding-left: 6px;
}

.detail-copy {
    padding: 24px;
}

.detail-copy p {
    color: #cbd5e1;
    line-height: 1.8;
}

.detail-copy .meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 18px;
    color: #93c5fd;
}

.detail-panel {
    padding: 24px;
}

.detail-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-panel p {
    color: #cbd5e1;
    line-height: 1.85;
}

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

.site-footer {
    padding: 42px 0 26px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), #020617);
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 28px;
}

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

.site-footer p,
.footer-links a,
.footer-bottom {
    color: #94a3b8;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.72);
}

.footer-links a:hover {
    color: #67e8f9;
}

.footer-bottom {
    margin-top: 28px;
    font-size: 14px;
}

.empty-state {
    display: none;
    padding: 36px;
    color: #cbd5e1;
    text-align: center;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.66);
}

.empty-state.visible {
    display: block;
}

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

    .menu-button {
        display: block;
        margin-left: auto;
    }

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

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

    .nav-shell {
        height: 64px;
    }

    .brand-text {
        font-size: 20px;
    }

    .nav-search {
        display: none;
    }

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

    .hero-copy {
        padding: 96px 0 74px;
    }

    .hero-search {
        border-radius: 18px;
        align-items: stretch;
    }

    .hero-search button {
        padding: 10px 14px;
    }

    .home-section,
    .category-hero,
    .search-hero,
    .ranking-hero {
        padding: 20px;
    }

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

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

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

    .rank-row {
        grid-template-columns: 44px 104px 1fr;
        gap: 12px;
    }

    .rank-info p {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .brand-text {
        font-size: 18px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero-actions,
    .hero-search,
    .filter-bar {
        flex-direction: column;
        border-radius: 20px;
    }

    .hero-search button,
    .filter-bar button,
    .primary-button,
    .secondary-button {
        width: 100%;
    }

    .card-grid,
    .category-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 1fr;
    }

    .list-rank {
        width: auto;
    }
}
