:root {
    --bg: #f6f8fc;
    --surface: #ffffff;
    --surface-soft: #f0f5ff;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --accent: #7c3aed;
    --orange: #f97316;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.88);
}

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

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

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

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

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

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

.nav-link:hover,
.nav-link.active {
    color: var(--brand);
    background: #eaf1ff;
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    border-radius: 14px;
    background: #eef4ff;
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--brand);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    background: rgba(255, 255, 255, 0.96);
}

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

.mobile-nav a {
    padding: 12px 16px;
    border-radius: 16px;
    background: #f1f5f9;
    font-weight: 700;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 720px;
    padding: 48px 0 40px;
    color: #ffffff;
    background:
        radial-gradient(circle at 18% 20%, rgba(124, 58, 237, 0.54), transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(37, 99, 235, 0.48), transparent 30%),
        linear-gradient(135deg, #0f172a 0%, #172554 48%, #111827 100%);
}

.hero-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    filter: blur(24px);
    opacity: 0.38;
    pointer-events: none;
}

.hero-glow-one {
    left: -120px;
    bottom: 12%;
    background: #2563eb;
}

.hero-glow-two {
    right: -140px;
    top: 14%;
    background: #7c3aed;
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: stretch;
}

.hero-stage {
    position: relative;
    min-height: 590px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 34px;
    background: rgba(15, 23, 42, 0.48);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(300px, 0.78fr);
    gap: 34px;
    align-items: center;
    padding: 58px;
    opacity: 0;
    transform: translateX(28px) scale(0.985);
    transition: opacity 0.45s ease, transform 0.45s ease;
    pointer-events: none;
}

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

.eyebrow {
    margin: 0 0 12px;
    color: #60a5fa;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 20px;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-summary {
    max-width: 720px;
    margin: 0 0 26px;
    color: #dbeafe;
    font-size: 19px;
}

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

.hero-tags span,
.movie-tags span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    color: #2563eb;
    background: #eaf1ff;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.13);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 0;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.32);
}

.btn-soft {
    color: var(--brand);
    background: #eaf1ff;
}

.hero .btn-soft {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.1;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.hero-poster::after,
.poster-link::after,
.rank-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(15, 23, 42, 0.78));
    pointer-events: none;
}

.hero-poster img,
.poster-link img,
.rank-cover img,
.detail-cover img,
.mini-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #dbeafe, #ede9fe);
}

.hero-controls {
    position: absolute;
    left: 58px;
    right: 58px;
    bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.hero-controls button {
    pointer-events: auto;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.hero-dots {
    display: flex;
    gap: 8px;
    pointer-events: auto;
}

.hero-dot {
    width: 28px !important;
    height: 8px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.3) !important;
}

.hero-dot.is-active {
    background: #ffffff !important;
}

.hero-rank,
.rank-panel,
.detail-card,
.content-card,
.category-overview-card,
.intro-strip,
.filter-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.hero-rank {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 20px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.95);
}

.hero-rank h2,
.rank-panel h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.mini-card {
    position: relative;
    display: grid;
    grid-template-columns: 54px 1fr;
    grid-template-rows: auto auto;
    gap: 4px 12px;
    align-items: center;
    padding: 8px;
    border-radius: 16px;
    background: #f8fafc;
    transition: transform 0.18s ease, background 0.18s ease;
}

.mini-card:hover {
    transform: translateX(3px);
    background: #eff6ff;
}

.mini-card img {
    grid-row: span 2;
    width: 54px;
    height: 72px;
    border-radius: 12px;
}

.mini-card span {
    position: absolute;
    left: 6px;
    top: 6px;
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    color: #ffffff;
    border-radius: 999px;
    background: var(--orange);
    font-size: 12px;
    font-weight: 900;
    z-index: 2;
}

.mini-card strong {
    align-self: end;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.mini-card em {
    align-self: start;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.intro-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: -30px;
    padding: 28px;
    position: relative;
    z-index: 3;
}

.intro-strip h2,
.section-head h2,
.sub-hero h1,
.content-card h2 {
    margin: 0;
    letter-spacing: -0.035em;
}

.intro-strip p,
.sub-hero p,
.category-overview-head p,
.content-card p {
    color: var(--muted);
}

.section-block {
    margin-top: 42px;
}

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

.inline-head {
    margin-bottom: 14px;
}

.text-link {
    color: var(--brand);
    font-weight: 900;
}

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

.category-tile {
    display: grid;
    gap: 8px;
    min-height: 132px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff, #f1f5ff);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile strong {
    font-size: 20px;
}

.category-tile span {
    color: var(--muted);
    font-size: 14px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 160px 150px;
    gap: 12px;
    padding: 14px;
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    min-height: 48px;
    border-radius: 16px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.search-box input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    padding: 0 16px;
    background: transparent;
}

.search-box span {
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    color: #ffffff;
    background: var(--brand);
    font-weight: 900;
}

.filter-panel select {
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    outline: 0;
    background: #f8fafc;
}

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

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

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

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

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.15;
    overflow: hidden;
    background: #dbeafe;
}

.poster-link img {
    transition: transform 0.35s ease;
}

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

.poster-year,
.poster-action,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    font-size: 12px;
    font-weight: 900;
}

.poster-year {
    left: 10px;
    top: 10px;
}

.poster-action {
    right: 10px;
    bottom: 10px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
}

.rank-badge {
    right: 10px;
    top: 10px;
    background: var(--orange);
}

.movie-body {
    padding: 15px;
}

.movie-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 17px;
    font-weight: 900;
}

.movie-title:hover {
    color: var(--brand);
}

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

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

.movie-tags {
    margin-top: 12px;
}

.feature-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.rank-panel {
    padding: 18px;
}

.sticky-panel {
    position: sticky;
    top: 92px;
}

.sub-hero {
    padding: 70px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 15% 20%, rgba(96, 165, 250, 0.36), transparent 26%),
        linear-gradient(135deg, #0f172a, #1e3a8a 58%, #111827);
}

.sub-hero h1 {
    max-width: 780px;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.08;
}

.sub-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: #dbeafe;
    font-size: 18px;
}

.category-overview-grid {
    display: grid;
    gap: 22px;
    margin-top: 42px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 22px;
    padding: 22px;
}

.category-overview-head h2 {
    margin: 0 0 10px;
    font-size: 30px;
}

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

.rank-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 32px;
    align-items: center;
}

.rank-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.3);
}

.rank-cover strong {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 2;
    color: #ffffff;
    font-size: 20px;
}

.player-wrap {
    padding: 26px 0 36px;
    background: #020617;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: #cbd5e1;
    font-size: 14px;
}

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

.player-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
}

.movie-player {
    display: block;
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.68));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    padding-left: 5px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 18px 48px rgba(37, 99, 235, 0.42);
    font-size: 34px;
}

.player-overlay strong {
    font-size: clamp(22px, 4vw, 42px);
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
    margin-top: 36px;
}

.detail-main {
    display: grid;
    gap: 20px;
}

.detail-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
    padding: 22px;
}

.detail-cover {
    overflow: hidden;
    aspect-ratio: 3 / 4.15;
    border-radius: 20px;
    background: #dbeafe;
}

.detail-info h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 4vw, 54px);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.lead-text {
    margin: 18px 0;
    color: #334155;
    font-size: 18px;
}

.wide-tags span {
    font-size: 13px;
}

.content-card {
    padding: 24px;
}

.content-card h2 {
    margin-bottom: 12px;
    font-size: 28px;
}

.content-card p {
    margin: 0;
    font-size: 17px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.5fr);
    gap: 24px;
}

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

.site-footer p {
    max-width: 760px;
    color: #94a3b8;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 1080px) {
    .hero-inner,
    .feature-row,
    .detail-layout,
    .rank-hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-rank,
    .detail-side {
        display: none;
    }

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

    .hero-slide {
        grid-template-columns: 1fr 280px;
        padding: 42px;
    }

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

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

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

    .mobile-toggle {
        display: block;
    }

    .hero {
        min-height: auto;
        padding: 28px 0;
    }

    .hero-stage {
        min-height: 760px;
        border-radius: 24px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: start;
        padding: 28px;
    }

    .hero-poster {
        max-width: 260px;
        margin: 0 auto;
    }

    .hero-controls {
        left: 28px;
        right: 28px;
    }

    .intro-strip,
    .section-head,
    .footer-grid,
    .detail-card,
    .category-overview-card {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

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

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

    .detail-card {
        display: grid;
    }

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

    .player-box {
        border-radius: 18px;
    }
}

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

    .hero-stage {
        min-height: 700px;
    }

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

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

    .play-circle {
        width: 66px;
        height: 66px;
    }
}
