* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --cyan: #06b6d4;
    --cyan-dark: #0891b2;
    --blue: #2563eb;
    --green: #0f766e;
    --red: #dc2626;
    --shadow: 0 16px 45px rgba(15, 23, 42, 0.10);
    --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

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

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

img,
video {
    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);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(14px);
}

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

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

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 10px 22px rgba(6, 182, 212, 0.35);
}

.brand-text,
.gradient-text {
    background: linear-gradient(135deg, var(--cyan-dark), var(--blue), var(--green));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    position: relative;
    padding: 8px 0;
    color: #334155;
    font-weight: 700;
}

.nav-link::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    content: "";
    background: var(--cyan);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.24s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--cyan-dark);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

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

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--ink);
}

.mobile-panel {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--line);
}

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

.mobile-link {
    padding: 12px 14px;
    border-radius: 12px;
    color: #334155;
    font-weight: 700;
    background: var(--surface-soft);
}

.hero-section {
    position: relative;
    overflow: hidden;
    padding: 74px 0 50px;
    background: linear-gradient(135deg, #ecfeff 0%, #eff6ff 45%, #f0fdfa 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.55;
    background-image: linear-gradient(to right, rgba(15, 23, 42, 0.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
}

.hero-shell {
    position: relative;
    z-index: 1;
}

.hero-slider {
    position: relative;
    min-height: 520px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    align-items: center;
    gap: 44px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.hero-copy h1 {
    max-width: 760px;
    margin: 18px 0;
    font-size: clamp(42px, 7vw, 74px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 30px;
    color: #475569;
    font-size: clamp(17px, 2vw, 22px);
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 13px;
    color: var(--cyan-dark);
    border: 1px solid rgba(6, 182, 212, 0.28);
    border-radius: 999px;
    background: rgba(236, 254, 255, 0.9);
    font-size: 13px;
    font-weight: 800;
}

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

.btn-primary,
.btn-secondary,
.ghost-button,
.rank-action,
.text-link,
.filter-side-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease, color 0.24s ease;
}

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

.btn-secondary,
.ghost-button,
.filter-side-link {
    color: var(--cyan-dark);
    border: 1px solid rgba(6, 182, 212, 0.28);
    background: rgba(255, 255, 255, 0.86);
}

.btn-primary:hover,
.btn-secondary:hover,
.ghost-button:hover,
.rank-action:hover,
.text-link:hover,
.filter-side-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.hero-art {
    position: relative;
    overflow: hidden;
    min-height: 460px;
    border: 12px solid rgba(255, 255, 255, 0.65);
    border-radius: 32px;
    box-shadow: var(--shadow);
    background: #e2e8f0;
}

.hero-art img {
    width: 100%;
    height: 460px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.hero-art::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(to top, rgba(15, 23, 42, 0.72), transparent 48%);
}

.hero-art span {
    position: absolute;
    right: 22px;
    bottom: 22px;
    z-index: 1;
    padding: 8px 14px;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(8px);
    font-weight: 800;
}

.hero-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 24px;
}

.hero-controls button {
    width: 42px;
    height: 42px;
    color: var(--cyan-dark);
    border: 1px solid rgba(6, 182, 212, 0.26);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.82);
}

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

.hero-dot {
    width: 10px !important;
    height: 10px !important;
    padding: 0 !important;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.25) !important;
}

.hero-dot.active {
    width: 28px !important;
    border-radius: 999px;
    background: var(--cyan) !important;
}

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

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

.stats-grid div {
    padding: 26px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: var(--shadow-soft);
}

.stats-grid strong {
    display: block;
    font-size: clamp(28px, 4vw, 42px);
    color: var(--cyan-dark);
    line-height: 1;
}

.stats-grid span {
    color: var(--muted);
    font-weight: 700;
}

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

.section-heading h2 {
    margin: 12px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.16;
}

.section-heading > a {
    color: var(--cyan-dark);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(6, 182, 212, 0.45);
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #e2e8f0;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.65), transparent 52%);
}

.year-pill,
.rank-badge {
    position: absolute;
    z-index: 1;
    top: 12px;
    padding: 5px 9px;
    color: #ffffff;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 900;
}

.year-pill {
    right: 12px;
    background: var(--red);
}

.rank-badge {
    left: 12px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.card-meta span,
.tag-row span,
.tag-row a,
.rank-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    color: #0e7490;
    background: #ecfeff;
    font-size: 12px;
    font-weight: 800;
}

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

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

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

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    padding: 18px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    background: #dbeafe;
}

.category-tile img,
.category-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tile-overlay,
.category-cover span {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.08));
}

.category-tile strong,
.category-tile em {
    position: relative;
    z-index: 1;
    display: block;
    color: #ffffff;
}

.category-tile strong {
    margin-top: 95px;
    font-size: 22px;
}

.category-tile em {
    font-style: normal;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 116px 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.rank-cover {
    overflow: hidden;
    height: 82px;
    border-radius: 14px;
    background: #e2e8f0;
}

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

.rank-number {
    color: var(--cyan-dark);
    font-size: 26px;
    font-weight: 900;
}

.rank-content h3 {
    margin: 0 0 4px;
    font-size: 20px;
}

.rank-content p {
    display: -webkit-box;
    margin: 0 0 9px;
    overflow: hidden;
    color: var(--muted);
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.rank-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rank-action {
    color: #ffffff;
    background: var(--cyan);
}

.page-hero {
    padding: 76px 0;
    background: radial-gradient(circle at 10% 10%, rgba(6, 182, 212, 0.20), transparent 28%), linear-gradient(135deg, #f8fafc, #ecfeff);
}

.page-hero h1 {
    margin: 14px 0;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.08;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    color: var(--muted);
    font-weight: 700;
}

.breadcrumb a {
    color: var(--cyan-dark);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(140px, 180px)) auto auto auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 26px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

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

.search-box input:focus,
.filter-select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.10);
}

.result-count {
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

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

.category-card-large {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.category-cover {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    border-radius: 18px;
    background: #e2e8f0;
}

.category-card-large h2 {
    margin: 12px 0 8px;
    font-size: 28px;
}

.category-card-large p {
    color: var(--muted);
}

.text-link {
    min-height: 38px;
    padding: 0;
    color: var(--cyan-dark);
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 76px 0;
    color: #ffffff;
    background: #0f172a;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.42;
    filter: blur(1px);
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-hero::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.55));
}

.detail-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
    background: #1e293b;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-copy h1 {
    margin: 18px 0;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.08;
}

.detail-copy p {
    max-width: 800px;
    margin: 0 0 28px;
    color: #e2e8f0;
    font-size: 20px;
}

.detail-copy .breadcrumb {
    margin: 0 0 18px;
    color: #cbd5e1;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    padding: 56px 0 20px;
}

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

.player-block,
.content-card,
.side-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.player-block h2,
.content-card h2,
.side-card h2 {
    margin: 0 0 18px;
    font-size: 24px;
}

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

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #ffffff;
    border: 0;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.22), rgba(2, 6, 23, 0.68));
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-circle {
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    padding-left: 4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 35px rgba(6, 182, 212, 0.32);
    font-size: 30px;
}

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

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.side-card dl {
    display: grid;
    gap: 14px;
    margin: 0;
}

.side-card dl div {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px;
}

.side-card dt {
    color: var(--muted);
    font-weight: 800;
}

.side-card dd {
    margin: 0;
    font-weight: 700;
}

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

.mini-rank {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: var(--surface-soft);
}

.mini-rank span {
    color: var(--cyan-dark);
    font-weight: 900;
}

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

.mini-rank em {
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

.related-grid .compact-card p {
    min-height: 0;
}

.site-footer {
    margin-top: 42px;
    padding: 46px 0 34px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff, #f1f5f9);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
}

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

.footer-grid p {
    max-width: 460px;
    color: var(--muted);
}

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

.footer-links a {
    color: #475569;
    font-weight: 700;
}

.footer-links a:hover {
    color: var(--cyan-dark);
}

.back-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    display: none;
    width: 46px;
    height: 46px;
    color: #ffffff;
    border: 0;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: var(--shadow-soft);
}

.back-top.show {
    display: block;
}

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

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

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

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

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

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

    .nav-toggle {
        display: block;
    }

    .hero-section {
        padding-top: 42px;
    }

    .hero-slider {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
    }

    .hero-art,
    .hero-art img {
        min-height: 360px;
        height: 360px;
    }

    .stats-grid,
    .movie-grid,
    .rank-feature-grid,
    .category-grid,
    .category-large-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .category-cover {
        min-height: 220px;
    }

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

    .rank-number,
    .rank-action {
        grid-column: span 1;
    }

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

    .detail-poster {
        max-width: 240px;
    }
}

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

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

    .hero-copy h1 {
        font-size: 38px;
    }

    .hero-art,
    .hero-art img {
        min-height: 300px;
        height: 300px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .stats-grid,
    .movie-grid,
    .rank-feature-grid,
    .category-grid,
    .category-large-grid,
    .footer-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 80px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-number {
        order: -1;
    }

    .rank-action {
        grid-column: 1 / -1;
    }

    .detail-copy p {
        font-size: 17px;
    }

    .player-block,
    .content-card,
    .side-card {
        padding: 18px;
    }
}
