:root {
    --page-bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --text-main: #111827;
    --text-muted: #64748b;
    --line: #e2e8f0;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --purple: #7c3aed;
    --rose: #e11d48;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 34rem),
        radial-gradient(circle at top right, rgba(124, 58, 237, 0.14), transparent 30rem),
        linear-gradient(180deg, #f8fafc 0%, #eef2ff 42%, #f8fafc 100%);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
}

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

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

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

.header-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 74px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.28);
}

.logo-text {
    font-size: 21px;
}

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

.nav-link,
.mobile-nav-link {
    color: #334155;
    font-weight: 700;
    border-radius: 999px;
    transition: 0.2s ease;
}

.nav-link {
    padding: 10px 16px;
}

.mobile-nav-link {
    padding: 14px 18px;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.09);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--surface-soft);
}

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

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

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

.hero-carousel {
    position: relative;
    width: min(1200px, calc(100% - 32px));
    min-height: 590px;
    margin: 28px auto 0;
    overflow: hidden;
    border-radius: 34px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 380px;
    gap: 36px;
    align-items: center;
    padding: clamp(28px, 5vw, 70px);
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.72) 52%, rgba(15, 23, 42, 0.42) 100%),
        var(--hero-image) center / cover;
    filter: saturate(1.1);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 76% 30%, rgba(96, 165, 250, 0.26), transparent 26rem);
}

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

.hero-kicker,
.section-kicker {
    margin: 0 0 12px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-kicker {
    color: #93c5fd;
}

.hero-content h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero-content p {
    max-width: 720px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span,
.detail-tags a {
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 999px;
    color: #475569;
    background: rgba(255, 255, 255, 0.74);
    font-size: 12px;
    font-weight: 800;
    padding: 6px 10px;
}

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

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

.primary-button,
.ghost-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    transition: 0.2s ease;
}

.primary-button {
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.28);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(37, 99, 235, 0.34);
}

.primary-button.small {
    min-height: 42px;
    white-space: nowrap;
}

.ghost-button {
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.text-link {
    color: var(--primary);
}

.text-link:hover {
    color: var(--purple);
}

.hero-poster {
    align-self: stretch;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

.hero-poster img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-poster:hover img {
    transform: scale(1.04);
}

.hero-dots {
    position: absolute;
    left: clamp(28px, 5vw, 70px);
    bottom: 34px;
    z-index: 2;
    display: flex;
    gap: 10px;
}

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

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

.home-search,
.section-block,
.page-hero,
.detail-layout {
    width: min(1200px, calc(100% - 32px));
    margin: 28px auto 0;
}

.home-search {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 420px) auto;
    gap: 18px;
    align-items: end;
    padding: 22px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.home-search strong {
    display: block;
    font-size: 22px;
}

.home-search p {
    margin: 6px 0 0;
    color: var(--text-muted);
}

.home-search label,
.filter-panel label {
    display: grid;
    gap: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 900;
}

input,
select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text-main);
    background: #ffffff;
    font: inherit;
    padding: 0 14px;
    outline: none;
    transition: 0.2s ease;
}

input:focus,
select:focus {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.section-block {
    padding: 34px 0 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-copy h2 {
    margin: 0;
    color: #0f172a;
    letter-spacing: -0.04em;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 42px);
}

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

.category-tile,
.category-card-large,
.movie-card,
.ranking-row,
.player-card,
.detail-info,
.detail-copy {
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
}

.category-tile {
    min-height: 178px;
    padding: 22px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: auto -40px -70px auto;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(124, 58, 237, 0.18));
}

.category-tile span,
.category-card-large h2 {
    display: block;
    position: relative;
    font-size: 22px;
    font-weight: 900;
}

.category-tile p,
.category-card-large p {
    position: relative;
    margin: 12px 0;
    color: var(--text-muted);
    line-height: 1.65;
}

.category-tile div,
.category-sample-links {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tile div a,
.category-sample-links a {
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    transition: 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 58px rgba(15, 23, 42, 0.13);
}

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

.movie-card.compact .poster-wrap {
    aspect-ratio: 16 / 10;
}

.poster-wrap img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.poster-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.58));
    opacity: 0.65;
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #e11d48);
    box-shadow: 0 10px 28px rgba(225, 29, 72, 0.28);
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
}

.card-meta span {
    display: inline-flex;
    align-items: center;
}

.card-meta span:not(:last-child)::after {
    content: "";
    width: 4px;
    height: 4px;
    margin-left: 8px;
    border-radius: 999px;
    background: #cbd5e1;
}

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

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

.movie-card p {
    min-height: 48px;
    margin: 0 0 12px;
    color: var(--text-muted);
    line-height: 1.65;
    font-size: 14px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(150px, 190px));
    gap: 14px;
    align-items: end;
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.07);
}

.page-hero {
    padding: clamp(38px, 7vw, 74px);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 34px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 28rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.96));
    box-shadow: var(--shadow);
}

.compact-hero h1 {
    font-size: clamp(38px, 6vw, 64px);
}

.compact-hero p {
    max-width: 780px;
    margin: 16px 0 0;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1.8;
}

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

.category-card-large {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 20px;
    padding: 18px;
    border-radius: var(--radius-xl);
}

.category-poster-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.category-poster-stack img {
    height: 112px;
    border-radius: 14px;
    object-fit: cover;
    background: linear-gradient(135deg, #dbeafe, #ede9fe);
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 92px 64px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius-lg);
}

.ranking-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #dbeafe, #ede9fe);
}

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

.ranking-index {
    font-size: 34px;
    font-weight: 950;
    color: #cbd5e1;
    text-align: center;
}

.ranking-main h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.ranking-main p {
    margin: 0 0 10px;
    color: var(--text-muted);
    line-height: 1.7;
}

.detail-layout {
    padding-top: 28px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--text-muted);
    font-weight: 800;
    margin-bottom: 18px;
}

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

.detail-main {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 22px;
}

.player-card,
.detail-info,
.detail-copy {
    border-radius: var(--radius-xl);
}

.player-card {
    padding: 16px;
}

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

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

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background:
        radial-gradient(circle, rgba(37, 99, 235, 0.2), transparent 20rem),
        rgba(2, 6, 23, 0.36);
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    box-shadow: 0 18px 46px rgba(37, 99, 235, 0.36);
    font-size: 34px;
    text-indent: 5px;
}

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

.detail-info {
    padding: clamp(24px, 4vw, 34px);
}

.detail-info h1 {
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.05;
}

.detail-lead {
    margin: 18px 0 0;
    color: #334155;
    font-size: 18px;
    line-height: 1.8;
}

.detail-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.detail-stats div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-soft);
}

.detail-stats span {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 900;
}

.detail-stats strong {
    display: block;
    margin-top: 5px;
    line-height: 1.45;
}

.detail-tags {
    margin-bottom: 24px;
}

.detail-copy {
    padding: clamp(24px, 4vw, 36px);
}

.detail-copy h2 {
    font-size: 30px;
    margin-top: 0;
}

.detail-copy h2 + p {
    margin-top: 12px;
}

.detail-copy p {
    color: #334155;
    font-size: 17px;
    line-height: 1.9;
}

.empty-state {
    display: none;
    padding: 36px;
    text-align: center;
    color: var(--text-muted);
    border: 1px dashed var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.72);
}

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

.site-footer {
    margin-top: 64px;
    padding: 38px 0 24px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 32px;
}

.footer-logo {
    color: #ffffff;
    font-size: 22px;
}

.footer-inner p {
    max-width: 620px;
    color: #94a3b8;
    line-height: 1.7;
}

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

.footer-links a {
    color: #dbeafe;
    font-weight: 800;
}

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 26px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
}

@media (max-width: 1100px) {
    .hero-slide,
    .detail-main {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero-carousel {
        min-height: 560px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 28px;
    }

    .home-search,
    .filter-panel,
    .category-card-large,
    .ranking-row,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        display: grid;
    }

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

    .ranking-row {
        align-items: start;
    }

    .ranking-index {
        text-align: left;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .home-search,
    .section-block,
    .page-hero,
    .detail-layout,
    .footer-inner,
    .footer-bottom,
    .hero-carousel {
        width: min(100% - 20px, 1200px);
    }

    .hero-carousel {
        min-height: 620px;
    }

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

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

    .section-heading {
        display: grid;
    }
}
