:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.84);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #3b82f6;
    --accent-strong: #2563eb;
    --gold: #f59e0b;
    --radius: 20px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 0%, rgba(37, 99, 235, 0.24), transparent 28rem),
        radial-gradient(circle at 90% 12%, rgba(14, 165, 233, 0.16), transparent 24rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 76px;
    padding: 14px clamp(18px, 4vw, 56px);
    background: rgba(2, 6, 23, 0.78);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), #06b6d4);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.35);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    color: #cbd5e1;
    font-size: 15px;
}

.main-nav a {
    padding: 8px 0;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: #ffffff;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-search input,
.listing-tools input {
    width: 220px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 999px;
    padding: 10px 16px;
    color: #fff;
    background: rgba(15, 23, 42, 0.9);
    outline: none;
}

.header-search input:focus,
.listing-tools input:focus {
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.header-search button,
.primary-btn,
.secondary-btn,
.filter-pills button,
.play-cta {
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.26);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button {
    padding: 10px 16px;
}

.primary-btn,
.secondary-btn,
.play-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    font-weight: 700;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: none;
}

.header-search button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.filter-pills button:hover,
.filter-pills button.is-active,
.play-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 44px rgba(37, 99, 235, 0.36);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #fff;
    background: rgba(15, 23, 42, 0.82);
}

.page-main {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 70px;
}

.hero-slider {
    position: relative;
    width: min(1440px, calc(100% - 32px));
    min-height: 620px;
    margin: 22px auto 42px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 32px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
    align-items: center;
    gap: 36px;
    padding: clamp(32px, 7vw, 86px);
    opacity: 0;
    pointer-events: none;
    transform: scale(1.015);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.70) 44%, rgba(2, 6, 23, 0.18) 100%),
        var(--hero-image) center / cover no-repeat;
    filter: saturate(1.05);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent);
}

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

.hero-content,
.hero-poster {
    position: relative;
    z-index: 1;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #bfdbfe;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
    max-width: 820px;
    margin: 16px 0 18px;
    font-size: clamp(36px, 6.2vw, 74px);
    line-height: 1;
    letter-spacing: -0.055em;
}

.hero-content p {
    max-width: 680px;
    color: #cbd5e1;
    font-size: clamp(16px, 1.5vw, 20px);
}

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

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

.hero-tags {
    margin-top: 20px;
}

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

.hero-poster {
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-poster a {
    width: min(310px, 90%);
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.46);
    transform: rotate(2deg);
}

.hero-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.slider-dots {
    position: absolute;
    left: clamp(32px, 7vw, 86px);
    bottom: 28px;
    z-index: 2;
    display: flex;
    gap: 10px;
}

.slider-dots button {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.slider-dots button.is-active {
    background: #fff;
}

.section {
    margin: 42px 0;
}

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

.section-head h2,
.category-hero h1,
.detail-title,
.search-hero h1 {
    margin: 0;
    font-size: clamp(26px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.section-head p,
.category-hero p,
.search-hero p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more {
    color: #bfdbfe;
    font-weight: 700;
}

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

.movie-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.55);
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.68);
}

.poster-link {
    position: relative;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.25s ease;
}

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

.poster-glow {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    color: #fff;
    background: rgba(37, 99, 235, 0.82);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-glow {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
}

.card-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 48px;
    color: #fff;
    font-weight: 800;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta,
.card-desc {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.card-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 62px;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 28px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, #fef3c7, #f59e0b);
    font-weight: 900;
    box-shadow: 0 10px 28px rgba(245, 158, 11, 0.34);
}

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

.category-card {
    min-height: 168px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at right top, rgba(59, 130, 246, 0.24), transparent 16rem),
        rgba(15, 23, 42, 0.84);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.48);
}

.category-card strong {
    display: block;
    margin-bottom: 10px;
    color: #fff;
    font-size: 21px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.category-hero,
.search-hero,
.detail-hero {
    margin-bottom: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        radial-gradient(circle at 8% 0%, rgba(59, 130, 246, 0.18), transparent 24rem),
        rgba(15, 23, 42, 0.76);
    box-shadow: var(--shadow);
}

.category-hero,
.search-hero {
    padding: clamp(24px, 5vw, 48px);
}

.listing-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 22px 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.68);
}

.listing-tools label {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
}

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

.filter-pills button {
    padding: 8px 13px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.detail-hero {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: clamp(22px, 4vw, 42px);
    padding: clamp(22px, 5vw, 46px);
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.35);
}

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

.breadcrumb {
    margin-bottom: 18px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumb a {
    color: #93c5fd;
}

.detail-title {
    margin-top: 8px;
}

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

.detail-meta span {
    border-radius: 999px;
    padding: 7px 12px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.1);
}

.detail-intro {
    max-width: 860px;
    color: #cbd5e1;
    font-size: 17px;
}

.player-section,
.detail-text,
.related-section {
    margin: 34px 0;
}

.player-section h2,
.detail-text h2,
.related-section h2 {
    margin: 0 0 16px;
    font-size: clamp(24px, 3vw, 34px);
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: rgba(2, 6, 23, 0.24);
    cursor: pointer;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 18px 50px rgba(37, 99, 235, 0.42);
    font-size: 36px;
    text-indent: 4px;
}

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

.player-message {
    display: none;
    margin-top: 12px;
    color: #fca5a5;
}

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

.detail-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

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

.text-card p {
    margin: 0;
    color: #dbeafe;
}

.no-result {
    display: none;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 22px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.7);
    text-align: center;
}

.no-result.is-visible {
    display: block;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 32px clamp(18px, 4vw, 56px);
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: rgba(2, 6, 23, 0.88);
}

.site-footer strong {
    color: #fff;
}

.site-footer p {
    max-width: 720px;
    margin: 8px 0 0;
}

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

.footer-links a {
    color: #cbd5e1;
}

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

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

    .main-nav {
        display: none;
        position: absolute;
        left: 18px;
        right: 18px;
        top: 74px;
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(2, 6, 23, 0.96);
    }

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

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

@media (max-width: 900px) {
    .site-header {
        gap: 12px;
    }

    .header-search {
        display: none;
    }

    .hero-slider {
        min-height: 720px;
        border-radius: 24px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 30px 24px 72px;
    }

    .hero-poster a {
        width: min(220px, 80%);
    }

    .slider-dots {
        left: 24px;
    }

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

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

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

    .listing-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .listing-tools label {
        align-items: stretch;
        flex-direction: column;
    }

    .listing-tools input {
        width: 100%;
    }

    .filter-pills {
        justify-content: flex-start;
    }

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

@media (max-width: 620px) {
    .brand {
        font-size: 17px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .page-main {
        width: min(100% - 22px, 1240px);
        padding-top: 22px;
    }

    .hero-slider {
        width: min(100% - 22px, 1440px);
        min-height: 650px;
        margin-top: 14px;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 36px;
    }

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

    .card-body {
        padding: 12px;
    }

    .card-desc {
        display: none;
    }
}
