* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --dark: #111827;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    --radius: 24px;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(16px);
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.26);
}

.brand-text {
    font-size: 21px;
    letter-spacing: 0.02em;
    color: transparent;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
    color: #334155;
    font-weight: 650;
}

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

.nav-links a:hover {
    color: var(--blue);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    background: #f1f5f9;
    border-radius: 12px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #0f172a;
    border-radius: 99px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    min-height: 640px;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.75s ease, transform 0.75s ease;
    pointer-events: none;
}

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 28%, rgba(6, 182, 212, 0.34), transparent 34%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58) 50%, rgba(2, 6, 23, 0.24)),
        linear-gradient(180deg, rgba(2, 6, 23, 0.3), rgba(2, 6, 23, 0.9));
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 128px 0 96px;
}

.hero-kicker,
.section-kicker {
    margin: 0 0 10px;
    color: var(--cyan);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(42px, 8vw, 82px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

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

.hero-tags,
.tag-row,
.info-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.hero-tags span,
.tag-row span,
.info-pills span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 650;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(10px);
}

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

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

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

.ghost-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

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

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

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

.section-shell {
    padding: 68px 0 0;
}

.intro-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 34px;
    margin-top: -44px;
    position: relative;
    z-index: 4;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.intro-strip h2,
.section-head h2,
.page-hero h1,
.movie-info-card h1,
.article-block h2,
.section-block h2 {
    margin: 0;
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.intro-strip p:last-child {
    max-width: 700px;
    margin: 8px 0 0;
    color: var(--muted);
}

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

.section-head a,
.text-link {
    color: var(--blue);
    font-weight: 800;
}

.compact-head {
    align-items: center;
    margin-bottom: 18px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px;
    gap: 14px;
    padding: 16px;
    margin-bottom: 24px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--soft-shadow);
}

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

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

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

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

.movie-card {
    overflow: hidden;
    background: var(--panel);
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 22px;
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-badge,
.poster-play {
    position: absolute;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(10px);
}

.poster-badge {
    left: 12px;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.poster-play {
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.card-body {
    padding: 16px;
}

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

.card-body h2,
.ranking-card h2 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.32;
}

.card-body h2 a:hover,
.ranking-card h2 a:hover {
    color: var(--blue);
}

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

.tag-row span {
    color: #2563eb;
    background: #eff6ff;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

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

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

.category-card {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: var(--soft-shadow);
    isolation: isolate;
}

.category-card img {
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 0.35s ease;
}

.category-card:hover img {
    transform: scale(1.08);
}

.category-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.82));
}

.category-content {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    display: grid;
    gap: 6px;
    padding: 20px;
    color: #ffffff;
}

.category-content strong {
    font-size: 24px;
    line-height: 1.1;
}

.category-content em {
    color: rgba(255, 255, 255, 0.82);
    font-style: normal;
    font-size: 14px;
}

.rank-panel {
    padding: 22px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--soft-shadow);
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 34px 78px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.rank-item:hover {
    background: #f8fafc;
}

.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border-radius: 10px;
    font-size: 13px;
    font-weight: 900;
}

.rank-item img {
    width: 78px;
    height: 54px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-info {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.rank-info strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info em {
    overflow: hidden;
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-score {
    color: var(--blue);
    font-size: 18px;
    font-weight: 900;
}

.page-hero {
    display: grid;
    align-items: center;
    min-height: 340px;
    padding: 70px min(8vw, 72px);
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.36), transparent 34%),
        linear-gradient(135deg, #0f172a, #1d4ed8 58%, #06b6d4);
}

.page-hero > div {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.page-hero h1 {
    max-width: 760px;
    font-size: clamp(38px, 6vw, 64px);
}

.page-hero p {
    max-width: 720px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 750;
}

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

.category-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--soft-shadow);
}

.ranking-poster {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 16 / 10;
}

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

.ranking-poster span {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.detail-shell {
    padding: 28px 0 0;
}

.detail-breadcrumb {
    color: var(--muted);
}

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

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

.detail-main,
.detail-side {
    display: grid;
    gap: 22px;
}

.player-card,
.movie-info-card,
.section-block,
.side-poster {
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--soft-shadow);
}

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

.video-wrap video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.14), rgba(15, 23, 42, 0.45));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer span {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border-radius: 50%;
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.45);
    font-size: 30px;
    transform: translateX(2px);
}

.play-layer.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.movie-info-card,
.section-block {
    padding: 28px;
}

.movie-info-card h1 {
    font-size: clamp(30px, 5vw, 46px);
}

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

.info-pills {
    margin: 0 0 16px;
}

.info-pills span {
    color: #075985;
    background: #ecfeff;
}

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

.article-block {
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.article-block + .article-block {
    margin-top: 22px;
}

.article-block p {
    margin: 12px 0 0;
    color: #334155;
    white-space: pre-line;
}

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

.side-poster {
    padding: 18px;
}

.side-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 16px;
}

.side-poster .primary-btn {
    width: 100%;
}

.site-footer {
    margin-top: 78px;
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
    padding: 46px 0;
}

.footer-brand p,
.footer-links a,
.footer-bottom {
    color: rgba(255, 255, 255, 0.68);
}

.footer-group h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 14px;
}

.is-filtered-out {
    display: none;
}

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

    .split-section,
    .category-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .sticky-panel,
    .compact-rank-panel {
        position: static;
    }

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

@media (max-width: 820px) {
    .nav-shell {
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        padding: 11px 0;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 10px 0 4px;
    }

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

    .nav-links a {
        padding: 10px 12px;
        background: #f8fafc;
        border-radius: 12px;
    }

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

    .hero-content {
        padding: 92px 0 84px;
    }

    .intro-strip,
    .section-head,
    .footer-shell {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

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

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

    .ranking-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .movie-grid,
    .large-category-grid,
    .category-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

    .rank-item {
        grid-template-columns: 30px 70px minmax(0, 1fr);
    }

    .rank-score {
        display: none;
    }
}
