:root {
    --bg: #f8fafc;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --card: #ffffff;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 48%, #e2e8f0 100%);
    color: var(--ink);
    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%;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 52%, #0f172a 100%);
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.25);
}

.nav-shell {
    display: flex;
    align-items: center;
    min-height: 68px;
    gap: 22px;
}

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

.brand-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #0f172a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: 12px;
    box-shadow: 0 0 26px rgba(34, 211, 238, 0.4);
}

.brand-text {
    font-size: 1.25rem;
    background: linear-gradient(90deg, #67e8f9, #60a5fa);
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

.nav-link {
    color: #cbd5e1;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    white-space: nowrap;
}

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

.nav-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.mobile-search input,
.search-box input,
.filter-bar input {
    width: 220px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    padding: 10px 16px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    outline: none;
    transition: all 0.2s ease;
}

.nav-search input:focus,
.mobile-search input:focus {
    width: 280px;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}

.nav-search button,
.mobile-search button,
.search-box button,
.filter-years button,
.filter-years a {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    cursor: pointer;
    font-weight: 700;
}

.mobile-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 9px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    background: #111827;
}

.mobile-panel.open {
    display: block;
}

.mobile-panel-inner {
    display: grid;
    gap: 14px;
    padding: 18px 0;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.34), transparent 28%), linear-gradient(135deg, #0f172a 0%, #1e293b 45%, #164e63 100%);
}

.hero::before {
    position: absolute;
    inset: 0;
    content: "";
    opacity: 0.12;
    background-image: radial-gradient(#ffffff 1px, transparent 1px);
    background-size: 36px 36px;
}

.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 {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    filter: blur(6px) saturate(1.2);
    transform: scale(1.08);
}

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

.hero-bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.9));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    align-items: center;
    gap: 48px;
    height: 100%;
}

.hero-copy {
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(103, 232, 249, 0.34);
    border-radius: 999px;
    padding: 6px 12px;
    color: #67e8f9;
    background: rgba(8, 47, 73, 0.45);
    font-weight: 800;
    letter-spacing: 0.06em;
}

.hero h1,
.sub-hero h1,
.detail-info h1 {
    margin: 18px 0 16px;
    font-size: clamp(2.35rem, 5vw, 4.8rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p,
.sub-hero p,
.lead {
    max-width: 720px;
    color: #dbeafe;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 10px;
    color: #0f172a;
    background: #cffafe;
    font-size: 0.85rem;
    font-weight: 700;
}

.tag-row.large span {
    padding: 7px 13px;
}

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

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

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.28);
}

.ghost-btn {
    color: #e0f2fe;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
}

.ghost-btn.light {
    color: #ffffff;
}

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

.hero-card {
    position: relative;
    overflow: hidden;
    height: 430px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(8, 47, 73, 0.92));
    box-shadow: 0 32px 80px rgba(2, 6, 23, 0.45);
}

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

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

.hero-card span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    border-radius: 999px;
    padding: 8px 13px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(12px);
    font-weight: 800;
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 24px;
    display: flex;
    gap: 9px;
    transform: translateX(-50%);
}

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

.hero-dot.active {
    width: 32px;
    background: #67e8f9;
}

.stats-strip {
    position: relative;
    margin-top: -42px;
    z-index: 5;
}

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

.stats-grid a {
    border: 1px solid rgba(226, 232, 240, 0.72);
    border-radius: 20px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.stats-grid strong {
    display: block;
    font-size: 1.25rem;
}

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

.page-section {
    padding: 64px 0;
}

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

.section-head.tight {
    margin-bottom: 20px;
}

.section-head h2 {
    margin: 0 0 6px;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    letter-spacing: -0.03em;
}

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

.section-more {
    color: #0891b2;
    font-weight: 800;
    white-space: nowrap;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: radial-gradient(circle at 30% 30%, rgba(34, 211, 238, 0.28), transparent 30%), linear-gradient(135deg, #0f172a, #164e63);
}

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

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

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

.poster-shine {
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.72), transparent);
}

.movie-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
    font-size: 0.78rem;
    font-weight: 800;
}

.movie-body {
    padding: 16px;
}

.movie-body h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
    line-height: 1.35;
}

.movie-body h3 a:hover {
    color: #0891b2;
}

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

.movie-desc {
    min-height: 46px;
}

.category-band {
    background: linear-gradient(135deg, #e0f2fe 0%, #ffffff 60%, #dbeafe 100%);
}

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

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

.category-panel {
    overflow: hidden;
    min-height: 230px;
    border: 1px solid rgba(14, 116, 144, 0.16);
    border-radius: 26px;
    padding: 24px;
    background: linear-gradient(135deg, #ffffff, #ecfeff);
    box-shadow: 0 16px 38px rgba(14, 116, 144, 0.12);
}

.category-name {
    display: inline-flex;
    border-radius: 999px;
    padding: 6px 12px;
    color: #0e7490;
    background: #cffafe;
    font-weight: 800;
}

.category-panel strong {
    display: block;
    margin: 18px 0;
    font-size: 1.2rem;
}

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

.category-preview img {
    aspect-ratio: 2 / 3;
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.55fr);
    gap: 34px;
    align-items: start;
}

.hot-panel {
    position: sticky;
    top: 92px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 26px;
    padding: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.ranking-list.expanded {
    gap: 16px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 42px 92px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    padding: 12px;
    background: #ffffff;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.ranking-item:hover {
    border-color: #67e8f9;
    transform: translateX(4px);
}

.ranking-num {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    font-weight: 900;
}

.ranking-thumb {
    overflow: hidden;
    width: 92px;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f172a, #164e63);
}

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

.ranking-main {
    min-width: 0;
}

.ranking-main strong,
.ranking-main em,
.ranking-main small {
    display: block;
}

.ranking-main strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-main em,
.ranking-main small {
    color: var(--muted);
    font-style: normal;
    font-size: 0.88rem;
}

.sub-hero {
    position: relative;
    overflow: hidden;
    padding: 88px 0;
    color: #ffffff;
    background: radial-gradient(circle at 78% 18%, rgba(34, 211, 238, 0.32), transparent 26%), linear-gradient(135deg, #0f172a, #164e63);
}

.sub-hero p {
    margin-bottom: 0;
}

.filter-bar,
.search-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    padding: 18px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
}

.filter-bar input,
.search-box input {
    flex: 1;
    min-width: 260px;
    color: var(--ink);
    background: #f8fafc;
}

.filter-years {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-years button,
.filter-years a {
    color: #0f172a;
    background: #e2e8f0;
}

.filter-years button.active,
.filter-years a:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 38px;
}

.pagination a {
    display: inline-flex;
    min-width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 14px;
    background: #ffffff;
    border: 1px solid var(--line);
    font-weight: 800;
}

.pagination a.active,
.pagination a:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
}

.detail-top {
    color: #ffffff;
    background: radial-gradient(circle at 12% 18%, rgba(34, 211, 238, 0.25), transparent 24%), linear-gradient(135deg, #0f172a 0%, #1e293b 58%, #0e7490 100%);
}

.detail-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 46px;
    align-items: center;
    padding: 72px 0;
}

.detail-cover {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    background: linear-gradient(135deg, #0f172a, #164e63);
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.45);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #bae6fd;
    font-size: 0.92rem;
}

.breadcrumb em {
    color: #ffffff;
    font-style: normal;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.detail-meta span {
    border-radius: 999px;
    padding: 7px 12px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.1);
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 26px 70px rgba(2, 6, 23, 0.28);
}

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

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(15, 23, 42, 0.26));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 50%;
    color: #0f172a;
    background: #67e8f9;
    box-shadow: 0 0 50px rgba(34, 211, 238, 0.42);
    font-size: 2rem;
}

.play-layer strong {
    font-size: 1.15rem;
}

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

.content-card {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    padding: 26px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.content-card h2 {
    margin-top: 0;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.8fr 0.8fr;
    gap: 36px;
}

.footer-brand {
    color: #67e8f9;
    font-size: 1.25rem;
}

.site-footer h3 {
    margin-top: 0;
    color: #ffffff;
}

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

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

.is-filtered-out,
.is-search-hidden {
    display: none !important;
}

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

    .mobile-toggle {
        display: inline-flex;
        margin-left: auto;
    }

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

    .hero-card {
        display: none;
    }

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

    .hot-panel {
        position: static;
    }
}

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

    .hero {
        height: 620px;
    }

    .stats-grid,
    .category-grid,
    .category-grid.large,
    .footer-grid,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .movie-grid.small-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .detail-grid {
        gap: 28px;
    }

    .detail-cover {
        width: min(260px, 100%);
    }

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

    .ranking-item {
        grid-template-columns: 36px 78px minmax(0, 1fr);
    }

    .ranking-thumb {
        width: 78px;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .movie-grid.small-grid {
        grid-template-columns: 1fr;
    }

    .hero h1,
    .sub-hero h1,
    .detail-info h1 {
        font-size: 2.2rem;
    }

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

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