:root {
    --bg: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --blue: #2563eb;
    --blue-dark: #1e3a8a;
    --cyan: #06b6d4;
    --yellow: #facc15;
    --orange: #f97316;
    --card: #ffffff;
    --line: #e2e8f0;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #1d4ed8, #0891b2);
    color: #ffffff;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.22);
}

.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    color: #fef08a;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

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

.nav-link {
    padding: 9px 12px;
    border-radius: 999px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.16);
    color: #fef08a;
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 16px;
}

.mobile-nav.open {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #0f172a;
}

.hero-slider,
.hero-slide {
    min-height: 620px;
}

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

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

.hero-bg,
.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(2px);
    transform: scale(1.04);
    opacity: 0.38;
}

.hero-slide::after,
.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(29, 78, 216, 0.98), rgba(8, 145, 178, 0.82), rgba(15, 23, 42, 0.78));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
    align-items: center;
    gap: 56px;
    padding: 72px 20px 86px;
    color: #ffffff;
}

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #facc15;
    color: #1e3a8a;
    font-size: 14px;
    font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0 0 20px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-one-line {
    margin: 0 0 24px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.86);
}

.hero-tags,
.detail-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-tags span,
.detail-meta span {
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 14px;
}

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

.hero-mini-tags span,
.tag-row span {
    padding: 4px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
}

.hero-mini-tags span {
    background: rgba(255, 255, 255, 0.16);
    color: #dff9ff;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    background: #facc15;
    color: #1e3a8a;
    box-shadow: 0 12px 28px rgba(250, 204, 21, 0.28);
}

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

.ghost-button {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.hero-poster {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
    transform: rotate(1deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.hero-poster span,
.play-hover {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(250, 204, 21, 0.92);
    color: #1e3a8a;
    font-size: 24px;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.hero-dot.active {
    width: 32px;
    border-radius: 999px;
    background: #facc15;
}

.quick-entry,
.content-section,
.player-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 20px;
}

.content-section.light,
.gradient-soft {
    max-width: none;
}

.content-section.light > *,
.gradient-soft > * {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.content-section.light {
    background: #ffffff;
}

.gradient-soft {
    background: linear-gradient(90deg, #eff6ff, #ecfeff);
}

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

.section-head.centered {
    display: block;
    text-align: center;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.section-head span:first-child {
    width: 8px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2563eb, #06b6d4);
}

.section-head h2 {
    flex: 1;
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
}

.section-head p {
    color: var(--muted);
    margin: 12px auto 0;
}

.section-head a {
    color: #2563eb;
    font-weight: 800;
}

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

.category-tile a {
    display: block;
    height: 100%;
    padding: 18px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile a:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 18px;
}

.category-thumbs img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
    background: #dbeafe;
}

.category-tile h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

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

.category-tile span {
    color: #2563eb;
    font-weight: 800;
}

.search-panel {
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.search-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 800;
}

.search-box {
    display: flex;
    gap: 12px;
}

.movie-search {
    flex: 1;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 14px;
    font-size: 16px;
}

.clear-search,
.filter-chip {
    border: 0;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
    padding: 0 16px;
    font-weight: 800;
    cursor: pointer;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.filter-chip {
    min-height: 40px;
}

.filter-chip.active,
.filter-chip:hover,
.clear-search:hover {
    background: #2563eb;
    color: #ffffff;
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
    transition: transform 0.35s ease;
}

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

.play-hover {
    width: 48px;
    height: 48px;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #facc15);
    color: #ffffff;
    font-weight: 900;
}

.card-content {
    flex: 1;
    padding: 16px;
}

.card-content h2,
.compact-card h2 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.25;
}

.card-content h2 a:hover,
.compact-card h2 a:hover {
    color: #2563eb;
}

.card-line,
.compact-card p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.movie-meta {
    color: #64748b;
    font-size: 13px;
    gap: 6px;
}

.movie-meta span {
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

.movie-meta.small {
    font-size: 12px;
}

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

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

.compact-card {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.13);
}

.compact-poster img {
    width: 108px;
    height: 84px;
    border-radius: 12px;
    object-fit: cover;
    background: #dbeafe;
}

.compact-rank {
    display: inline-flex;
    margin-bottom: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f97316;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: #1d4ed8;
    color: #ffffff;
}

.page-hero > div {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 86px 20px;
}

.compact-page-hero {
    background: linear-gradient(120deg, #1d4ed8, #0891b2);
}

.category-page-hero {
    background: linear-gradient(120deg, #2563eb, #7c3aed);
}

.rank-page-hero {
    background: linear-gradient(120deg, #ea580c, #2563eb);
}

.category-inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.category-inline-links a {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-weight: 700;
}

.detail-hero {
    min-height: 560px;
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 44px 20px 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #fef08a;
}

.detail-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 26px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
    background: #dbeafe;
}

.detail-info {
    color: #ffffff;
}

.detail-info h1 {
    font-size: clamp(34px, 5vw, 58px);
}

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

.player-section {
    padding-top: 54px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.34), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

.player-overlay span {
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #facc15;
    color: #1e3a8a;
    font-size: 30px;
    font-weight: 900;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.player-overlay strong {
    font-size: 20px;
}

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

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding-top: 28px;
}

.story-card {
    padding: 28px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}

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

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

.related-section {
    padding-top: 18px;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 20px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 32px;
}

.footer-logo {
    color: #ffffff;
    margin-bottom: 12px;
}

.site-footer p {
    margin: 0;
    color: #94a3b8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a:hover {
    color: #22d3ee;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding: 18px 20px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

.hidden-by-filter,
.hidden-by-search {
    display: none !important;
}

.no-result {
    grid-column: 1 / -1;
    padding: 32px;
    text-align: center;
    color: #64748b;
    background: #ffffff;
    border-radius: 18px;
}

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

    .mobile-menu-button {
        display: inline-block;
    }

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

    .hero-poster {
        max-width: 420px;
    }

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

    .rank-grid,
    .rank-list,
    .detail-content {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .site-header-inner {
        min-height: 62px;
    }

    .logo {
        font-size: 18px;
    }

    .hero,
    .hero-slider,
    .hero-slide,
    .hero-content {
        min-height: 680px;
    }

    .hero-content {
        padding-top: 48px;
        gap: 28px;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }

    .hero p,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .hero-actions,
    .search-box {
        flex-direction: column;
    }

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

    .compact-card {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .compact-poster img {
        width: 92px;
        height: 76px;
    }

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

    .quick-entry,
    .content-section,
    .player-section {
        padding: 42px 16px;
    }
}
