* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.76);
    --panel-solid: #0f172a;
    --panel-soft: rgba(30, 41, 59, 0.72);
    --line: rgba(125, 211, 252, 0.18);
    --line-strong: rgba(56, 189, 248, 0.34);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --blue: #38bdf8;
    --cyan: #67e8f9;
    --indigo: #818cf8;
    --green: #34d399;
    --shadow: 0 26px 70px rgba(2, 8, 23, 0.45);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.22), transparent 34rem),
        radial-gradient(circle at 78% 12%, rgba(99, 102, 241, 0.18), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #07111f 45%, #020617 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.9), rgba(8, 47, 73, 0.9));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

.header-inner,
.footer-grid,
.main-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #06111f;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 28px rgba(34, 211, 238, 0.28);
    font-size: 16px;
    font-weight: 900;
}

.brand-copy {
    display: grid;
    line-height: 1.1;
}

.brand-copy strong {
    font-size: 20px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #e0f2fe, #67e8f9, #bfdbfe);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-copy em {
    margin-top: 4px;
    color: rgba(186, 230, 253, 0.7);
    font-size: 12px;
    font-style: normal;
}

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

.nav-link,
.mobile-link {
    color: #cbd5e1;
    border-radius: 12px;
    transition: 0.2s ease;
}

.nav-link {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #fff;
    background: rgba(14, 165, 233, 0.16);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(14, 165, 233, 0.12);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #e0f2fe;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

.mobile-link {
    padding: 12px 14px;
    font-weight: 650;
}

.main-wrap {
    padding: 30px 0 64px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
    gap: 28px;
    align-items: stretch;
    margin-bottom: 34px;
}

.hero-copy {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    padding: 42px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.72)),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.25), transparent 16rem);
    box-shadow: var(--shadow);
}

.hero-copy::after {
    content: "";
    position: absolute;
    right: -88px;
    bottom: -88px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.18);
    filter: blur(2px);
}

.hero-kicker,
.section-kicker,
.movie-meta,
.detail-kicker {
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1 {
    position: relative;
    z-index: 1;
    margin: 16px 0 20px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy p {
    position: relative;
    z-index: 1;
    color: #cbd5e1;
    line-height: 1.9;
    font-size: 16px;
}

.hero-quick-links,
.hero-actions,
.detail-actions {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-quick-links a,
.btn,
.section-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.hero-quick-links a,
.btn-ghost,
.section-action {
    border: 1px solid var(--line-strong);
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.45);
}

.btn-primary {
    color: #06111f;
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 34px rgba(14, 165, 233, 0.28);
}

.hero-quick-links a:hover,
.btn:hover,
.section-action:hover {
    transform: translateY(-2px);
}

.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    border-radius: 30px;
    border: 1px solid rgba(103, 232, 249, 0.22);
    background: #0f172a;
    box-shadow: var(--shadow);
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.55), rgba(2, 6, 23, 0.22)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.8), transparent 60%);
}

.hero-content {
    position: absolute;
    left: 36px;
    right: 36px;
    bottom: 36px;
    max-width: 660px;
}

.hero-content h2 {
    margin: 10px 0 12px;
    font-size: clamp(30px, 4.6vw, 56px);
    line-height: 1.08;
}

.hero-content p {
    color: #dbeafe;
    line-height: 1.85;
    max-width: 620px;
}

.hero-dots {
    position: absolute;
    right: 28px;
    bottom: 28px;
    z-index: 4;
    display: flex;
    gap: 8px;
}

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

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

.search-panel,
.content-section,
.detail-panel,
.categories-hero {
    margin: 28px 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(280px, 1.08fr);
    gap: 24px;
    padding: 28px;
    align-items: start;
}

.search-panel h2,
.section-heading h2,
.categories-hero h1,
.detail-title h1 {
    margin: 6px 0 10px;
    font-size: clamp(26px, 3.2vw, 40px);
    line-height: 1.16;
}

.search-panel p,
.section-heading p,
.categories-hero p,
.detail-title p,
.detail-copy p {
    color: var(--muted);
    line-height: 1.85;
}

.search-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 148px;
    gap: 12px;
}

.search-controls input,
.search-controls select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    color: #e0f2fe;
    background: rgba(2, 6, 23, 0.45);
    padding: 0 14px;
    outline: none;
}

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

.category-pills {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-pills a,
.tag-list span,
.breadcrumb a,
.breadcrumb span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 252, 0.18);
    background: rgba(14, 165, 233, 0.09);
    color: #bae6fd;
}

.category-pills a {
    min-height: 36px;
    padding: 0 13px;
    font-size: 13px;
    font-weight: 700;
}

.empty-state {
    display: none;
    grid-column: 1 / -1;
    margin: 0;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.5);
}

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

.content-section {
    padding: 28px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, 0.14);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 16px 34px rgba(2, 6, 23, 0.32);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(103, 232, 249, 0.42);
    box-shadow: 0 22px 52px rgba(8, 47, 73, 0.38);
}

.movie-card.is-hidden {
    display: none;
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.95);
}

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

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

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 9px;
    border-radius: 12px;
    color: #06111f;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(14, 165, 233, 0.34);
}

.movie-info {
    padding: 15px;
}

.movie-meta {
    margin: 0 0 8px;
    color: #93c5fd;
    font-size: 12px;
    letter-spacing: 0.03em;
}

.movie-info h3 {
    margin: 0 0 9px;
    font-size: 17px;
    line-height: 1.35;
}

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

.movie-info p:not(.movie-meta) {
    margin: 0;
    min-height: 58px;
    color: var(--muted);
    line-height: 1.65;
    font-size: 13px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-list span {
    min-height: 26px;
    padding: 0 9px;
    font-size: 12px;
}

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

.category-card {
    min-height: 210px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(14, 165, 233, 0.12), rgba(99, 102, 241, 0.1)),
        rgba(15, 23, 42, 0.75);
    box-shadow: 0 18px 38px rgba(2, 6, 23, 0.32);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(103, 232, 249, 0.42);
}

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

.category-card p {
    color: var(--muted);
    line-height: 1.8;
}

.category-card span {
    display: inline-flex;
    margin-top: 14px;
    color: var(--cyan);
    font-weight: 800;
}

.categories-hero {
    padding: 36px;
    background:
        radial-gradient(circle at 15% 10%, rgba(56, 189, 248, 0.2), transparent 24rem),
        linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.62));
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.breadcrumb a,
.breadcrumb span {
    min-height: 30px;
    padding: 0 12px;
    font-size: 13px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    gap: 28px;
    align-items: start;
}

.detail-panel {
    overflow: hidden;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    border: 1px solid rgba(125, 211, 252, 0.2);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-ring {
    display: grid;
    place-items: center;
    width: 90px;
    height: 90px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    color: #06111f;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 50px rgba(14, 165, 233, 0.42);
    font-size: 30px;
    font-weight: 900;
}

.detail-body {
    padding: 26px;
}

.detail-title {
    margin-bottom: 22px;
}

.detail-title h1 {
    margin-bottom: 12px;
}

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

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(125, 211, 252, 0.18);
    font-size: 13px;
    font-weight: 700;
}

.detail-copy h2 {
    margin: 28px 0 10px;
    font-size: 24px;
}

.poster-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

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

.poster-panel div {
    padding: 18px;
}

.poster-panel h2 {
    margin: 0 0 8px;
}

.poster-panel p {
    color: var(--muted);
    line-height: 1.7;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 28px;
    padding: 42px 0 28px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
    color: var(--muted);
    line-height: 1.8;
}

.footer-grid h2 {
    margin: 0 0 12px;
    font-size: 16px;
}

.footer-grid ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-grid li + li {
    margin-top: 8px;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 30px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    font-size: 14px;
}

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

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

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

    .menu-toggle {
        display: inline-block;
    }

    .hero,
    .search-panel,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy,
    .hero-slider {
        min-height: 430px;
    }

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

@media (max-width: 640px) {
    .header-inner,
    .footer-grid,
    .main-wrap,
    .footer-bottom,
    .mobile-nav {
        width: min(100% - 22px, 1180px);
    }

    .brand-copy strong {
        font-size: 17px;
    }

    .brand-copy em {
        display: none;
    }

    .hero-copy,
    .content-section,
    .search-panel,
    .categories-hero,
    .detail-body {
        padding: 20px;
    }

    .hero-copy,
    .hero-slider {
        min-height: 380px;
        border-radius: 22px;
    }

    .hero-content {
        left: 20px;
        right: 20px;
        bottom: 22px;
    }

    .hero-dots {
        left: 20px;
        right: auto;
        bottom: 14px;
    }

    .search-controls,
    .category-cards {
        grid-template-columns: 1fr;
    }

    .section-heading {
        display: block;
    }

    .section-action {
        margin-top: 12px;
    }

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

    .movie-info {
        padding: 12px;
    }

    .movie-info h3 {
        font-size: 15px;
    }

    .movie-info p:not(.movie-meta) {
        min-height: auto;
    }

    .play-ring {
        width: 72px;
        height: 72px;
    }
}
