:root {
    color-scheme: light;
    --bg: #f7fbff;
    --surface: #ffffff;
    --surface-soft: #eef7ff;
    --text: #0f172a;
    --muted: #64748b;
    --line: rgba(15, 23, 42, 0.10);
    --primary: #2563eb;
    --primary-2: #06b6d4;
    --accent: #8b5cf6;
    --dark: #08111f;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    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;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.12), transparent 28rem),
        radial-gradient(circle at 88% 12%, rgba(6, 182, 212, 0.12), transparent 24rem),
        var(--bg);
    line-height: 1.7;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.28);
}

.brand-text {
    font-size: 20px;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #334155;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #0f62fe;
    background: rgba(37, 99, 235, 0.10);
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 640px;
    padding: 78px 0 64px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(8, 17, 31, 0.98), rgba(12, 64, 140, 0.88) 48%, rgba(6, 182, 212, 0.70)),
        #08111f;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(6px);
    opacity: 0.74;
}

.hero::before {
    width: 420px;
    height: 420px;
    right: -120px;
    top: -150px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.55), transparent 68%);
}

.hero::after {
    width: 520px;
    height: 520px;
    left: -180px;
    bottom: -240px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.45), transparent 70%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    gap: 42px;
    align-items: center;
}

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

.eyebrow {
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 12px;
    font-weight: 800;
    color: #38bdf8;
}

.hero h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.hero-lead {
    margin: 22px 0 0;
    max-width: 620px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 800;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.32);
}

.button.ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.10);
}

.button.light {
    color: var(--primary);
    background: #fff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.10);
}

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

.hero-search {
    margin-top: 28px;
    display: flex;
    gap: 10px;
    padding: 8px;
    max-width: 560px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    color: #fff;
    background: transparent;
    padding: 0 14px;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.70);
}

.hero-search button {
    border: 0;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 34px;
}

.stat-card {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(14px);
}

.stat-card strong {
    display: block;
    font-size: 26px;
    line-height: 1;
}

.stat-card span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.hero-visual {
    position: relative;
    min-height: 520px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 0.78fr 1fr;
    gap: 20px;
    align-items: end;
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-poster {
    position: relative;
    min-height: 430px;
    border-radius: 32px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.34);
}

.hero-poster img,
.poster img,
.detail-cover img,
.recommend-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(6, 182, 212, 0.20));
}

.hero-poster::after,
.poster-shade {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.62));
}

.hero-panel {
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.22);
}

.hero-panel h2 {
    margin: 0 0 10px;
    font-size: 30px;
    line-height: 1.18;
}

.hero-panel p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

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

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

.hero-tags span,
.tag-list span,
.detail-tags span {
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    color: #0f62fe;
    background: rgba(37, 99, 235, 0.10);
}

.hero-tags span {
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.14);
}

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

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

.hero-dot.is-active {
    width: 28px;
    background: #fff;
}

.content-section,
.page-section,
.detail-section {
    padding: 66px 0;
}

.section-heading,
.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    margin-bottom: 28px;
}

.section-heading h2,
.page-heading h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.section-heading p,
.page-heading p,
.detail-title p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more {
    flex: 0 0 auto;
    color: var(--primary);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: var(--shadow);
}

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

.poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.poster img {
    transition: transform 0.34s ease;
}

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

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 4px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

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

.meta-row,
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.meta-row span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: #cbd5e1;
}

.movie-card h3 {
    margin: 8px 0 8px;
    font-size: 17px;
    line-height: 1.32;
}

.movie-line,
.genre-line {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.movie-line {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.genre-line {
    margin-top: 8px;
}

.tag-list {
    margin-top: 12px;
}

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

.category-card {
    min-height: 170px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(6, 182, 212, 0.10)),
        var(--surface);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 12px;
    padding: 16px;
    margin: 26px 0 30px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    background: #fff;
    padding: 0 14px;
}

.filter-count {
    margin: -14px 0 24px;
    color: var(--muted);
}

.detail-hero {
    padding: 44px 0 58px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(8, 17, 31, 0.98), rgba(21, 77, 154, 0.9)),
        #08111f;
}

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

.detail-cover {
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.32);
}

.breadcrumbs {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.72);
}

.breadcrumbs a:hover {
    color: #fff;
}

.detail-title h1 {
    color: #fff;
}

.detail-title p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 17px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 22px 0;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.12);
}

.player-panel {
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: #000;
    box-shadow: var(--shadow);
}

.video-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-wrap video {
    width: 100%;
    height: 100%;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background:
        radial-gradient(circle at center, rgba(37, 99, 235, 0.22), transparent 36%),
        rgba(0, 0, 0, 0.42);
}

.play-overlay span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    min-height: 54px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.45);
}

.player-panel.is-playing .play-overlay {
    display: none;
}

.player-message {
    padding: 14px 18px;
    color: #cbd5e1;
    background: #0f172a;
}

.text-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--surface);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.text-card + .text-card {
    margin-top: 22px;
}

.text-card h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

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

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

.recommend-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
}

.recommend-cover {
    aspect-ratio: 3 / 4;
    background: #dbeafe;
}

.recommend-card h3 {
    margin: 10px 12px 12px;
    font-size: 15px;
    line-height: 1.3;
}

.rank-table {
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.rank-row {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr) 160px 160px 150px;
    gap: 14px;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}

.rank-row:last-child {
    border-bottom: 0;
}

.rank-num {
    font-size: 22px;
    font-weight: 900;
    color: var(--primary);
}

.site-footer {
    margin-top: 50px;
    color: #cbd5e1;
    background: #08111f;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr 0.8fr;
    gap: 34px;
    padding: 46px 0;
}

.footer-grid h3 {
    margin: 0 0 14px;
    color: #fff;
}

.footer-grid p {
    color: #94a3b8;
}

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

.footer-links a:hover {
    color: #38bdf8;
}

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    text-align: center;
    color: #94a3b8;
}

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

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

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

@media (max-width: 860px) {
    .mobile-menu-button {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: #fff;
        box-shadow: var(--shadow);
    }

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

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

    .hero {
        min-height: auto;
        padding-top: 52px;
    }

    .hero-visual {
        min-height: 640px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
    }

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

    .rank-row {
        grid-template-columns: 54px minmax(0, 1fr);
    }

    .rank-row span:nth-child(n+4) {
        display: none;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .hero-search {
        border-radius: 20px;
        flex-direction: column;
    }

    .section-heading,
    .page-heading {
        display: block;
    }

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

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

    .movie-line {
        min-height: auto;
    }
}
