:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #eef6ff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --cyan: #06b6d4;
    --teal: #14b8a6;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    width: min(1240px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 15px;
    font-weight: 650;
    color: #334155;
}

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

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

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 8px;
    border: 0;
    border-radius: 12px;
    background: var(--surface-soft);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 6px 0;
    background: var(--primary-dark);
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.mobile-nav a {
    display: block;
    padding: 11px 12px;
    border-radius: 12px;
    color: #334155;
    font-weight: 650;
}

.mobile-nav a:hover {
    background: var(--surface-soft);
    color: var(--primary);
}

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

.hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #0891b2 48%, #0f766e 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.28), transparent 26%),
        radial-gradient(circle at 80% 0%, rgba(125, 211, 252, 0.25), transparent 32%),
        linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%);
    background-size: auto, auto, 56px 56px;
    opacity: 0.8;
}

.hero-inner {
    position: relative;
    width: min(1240px, calc(100% - 32px));
    min-height: 660px;
    margin: 0 auto;
    padding: 80px 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
    gap: 48px;
    align-items: center;
}

.hero-copy {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 750;
}

.hero h1 {
    margin: 24px 0 18px;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero h1 span {
    color: #a5f3fc;
}

.hero p {
    max-width: 680px;
    margin: 0 0 28px;
    color: #e0f2fe;
    font-size: 18px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    border: 0;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.28);
}

.btn-light {
    background: #ffffff;
    color: var(--primary-dark);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.38);
}

.filter-panel .btn-ghost {
    background: var(--surface-soft);
    color: var(--primary-dark);
    border-color: #bfdbfe;
}

.hero-stage {
    position: relative;
    z-index: 2;
    min-height: 500px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: end;
    min-height: 500px;
    padding: 30px;
    border-radius: 34px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.36);
    opacity: 0;
    transform: translateX(28px) scale(0.98);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(15, 23, 42, 0.88));
}

.hero-slide-content {
    position: relative;
    z-index: 2;
}

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

.hero-slide p {
    margin: 0 0 16px;
    font-size: 15px;
    color: #e2e8f0;
}

.hero-dots {
    position: absolute;
    z-index: 5;
    left: 28px;
    bottom: 24px;
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.hero-dots button.is-active {
    width: 28px;
    background: #ffffff;
}

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

.section {
    padding: 58px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.section-desc {
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

.movie-card:hover {
    transform: translateY(-5px);
    border-color: #bfdbfe;
    box-shadow: var(--shadow);
}

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

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

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

.play-float,
.rank-mark {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 850;
}

.play-float {
    left: 12px;
    bottom: 12px;
    padding: 7px 11px;
    background: rgba(37, 99, 235, 0.88);
}

.rank-mark {
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.8);
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

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

.movie-card h3 a:hover {
    color: var(--primary);
}

.movie-card p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.tag-list span {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 750;
}

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

.category-card {
    min-height: 170px;
    padding: 22px;
    border-radius: 26px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--cyan), var(--teal));
    box-shadow: var(--shadow);
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p {
    margin: 0 0 16px;
    color: #e0f2fe;
}

.category-card .count {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 800;
}

.filter-panel {
    margin: 0 0 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.search-box {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 750;
}

.search-box input,
.filter-row select {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    color: var(--text);
    outline: none;
}

.search-box input:focus,
.filter-row select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

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

.filter-count {
    margin: 12px 0 0;
    color: var(--muted);
    font-weight: 750;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 78px 88px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

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

.rank-row img {
    width: 88px;
    height: 118px;
    object-fit: cover;
    border-radius: 16px;
}

.rank-row h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-row p {
    margin: 0;
    color: var(--muted);
}

.rank-score {
    padding: 8px 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--primary-dark);
    font-weight: 900;
}

.breadcrumb {
    margin: 28px 0 20px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 34px;
    padding: 30px;
    border-radius: 34px;
    color: #ffffff;
    background: linear-gradient(135deg, #1d4ed8, #0891b2, #0f766e);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 26px;
    box-shadow: 0 25px 60px rgba(2, 6, 23, 0.28);
}

.detail-info h1 {
    margin: 10px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-info p {
    margin: 0 0 18px;
    color: #e0f2fe;
    font-size: 17px;
}

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

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 800;
}

.player-section {
    margin: 36px 0;
    padding: 24px;
    border-radius: 30px;
    background: #0f172a;
    color: #ffffff;
    box-shadow: var(--shadow);
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.72));
}

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

.player-start {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    color: #ffffff;
    font-size: 30px;
    cursor: pointer;
    box-shadow: 0 18px 46px rgba(37, 99, 235, 0.45);
}

.content-card {
    padding: 28px;
    margin: 24px 0;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

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

.site-footer {
    margin-top: 60px;
    padding: 44px 0;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.footer-brand {
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.footer-links,
.footer-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 18px;
}

.footer-links a:hover,
.footer-cats a:hover {
    color: #ffffff;
}

.empty-state {
    display: none;
    padding: 28px;
    border: 1px dashed #93c5fd;
    border-radius: 24px;
    color: var(--muted);
    background: #eff6ff;
    text-align: center;
}

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

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

    .nav-toggle {
        display: block;
    }

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

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

@media (max-width: 760px) {
    .hero-inner {
        min-height: auto;
        padding: 46px 0;
    }

    .hero-stage,
    .hero-slide {
        min-height: 430px;
    }

    .section {
        padding: 40px 0;
    }

    .section-head {
        display: block;
    }

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

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

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

    .rank-row img {
        width: 70px;
        height: 96px;
    }

    .rank-score {
        grid-column: 2 / -1;
        width: fit-content;
    }

    .detail-hero {
        padding: 20px;
    }
}

@media (max-width: 500px) {
    .nav-wrap,
    .page-main,
    .section,
    .footer-inner {
        width: min(100% - 22px, 1240px);
    }

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

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