:root {
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --sky-700: #0369a1;
    --cyan-500: #06b6d4;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-500: #64748b;
    --slate-700: #334155;
    --slate-900: #0f172a;
    --white: #ffffff;
    --orange: #f97316;
    --shadow: 0 16px 38px rgba(15, 23, 42, 0.12);
    --shadow-strong: 0 28px 65px rgba(15, 23, 42, 0.24);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--slate-900);
    background: linear-gradient(180deg, var(--slate-50), #ffffff 36%, var(--sky-50));
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
    line-height: 1.6;
}

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

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

.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 28px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--slate-900);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky-600), var(--cyan-500));
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(14, 165, 233, 0.28);
    font-size: 14px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--slate-700);
    font-size: 14px;
    font-weight: 700;
}

.nav-links a {
    position: relative;
    padding: 10px 0;
    transition: color 0.2s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;
    height: 2px;
    background: linear-gradient(90deg, var(--sky-600), var(--cyan-500));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

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

.nav-links a:hover::after {
    transform: scaleX(1);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--sky-50);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--sky-700);
    border-radius: 99px;
}

.hero-carousel {
    position: relative;
    min-height: 690px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #0284c7, #2563eb 52%, #06b6d4);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.16;
    background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.8) 0 1px, transparent 2px), radial-gradient(circle at 78% 36%, rgba(255, 255, 255, 0.7) 0 1px, transparent 2px);
    background-size: 62px 62px, 92px 92px;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.03);
    filter: saturate(1.08);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.42));
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 690px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    align-items: center;
    gap: 54px;
    padding: 80px 0 104px;
}

.hero-kicker,
.section-eyebrow {
    margin: 0 0 14px;
    color: #bae6fd;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 13px;
    font-weight: 900;
}

.hero-copy h1 {
    max-width: 820px;
    margin: 0 0 22px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-summary {
    max-width: 760px;
    margin: 0 0 24px;
    color: #e0f2fe;
    font-size: clamp(18px, 2.4vw, 24px);
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(224, 242, 254, 0.92);
    color: var(--sky-700);
    font-size: 12px;
    font-weight: 800;
}

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

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

.primary-button {
    color: var(--sky-700);
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(255, 255, 255, 0.22);
}

.ghost-button {
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.78);
    background: rgba(2, 132, 199, 0.36);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-strong);
}

.hero-poster {
    position: relative;
    justify-self: end;
    width: min(360px, 100%);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 32px 90px rgba(2, 6, 23, 0.46);
    transform: rotate(2deg);
    transition: transform 0.3s ease;
}

.hero-poster:hover {
    transform: rotate(0deg) scale(1.02);
}

.hero-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 30px;
    display: flex;
    align-items: center;
    gap: 16px;
    transform: translateX(-50%);
}

.hero-controls button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    backdrop-filter: blur(8px);
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    min-width: 10px;
    padding: 0;
    background: rgba(255, 255, 255, 0.42);
}

.hero-dots button.is-active {
    width: 26px;
    background: #ffffff;
}

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

.stats-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.stat-card,
.movie-card,
.category-card,
.category-overview-card,
.ranking-item,
.content-card,
.filter-panel {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
}

.stat-card strong {
    display: block;
    color: var(--sky-700);
    font-size: 32px;
    line-height: 1;
}

.stat-card span {
    display: block;
    margin-top: 8px;
    font-weight: 900;
}

.stat-card p {
    margin: 6px 0 0;
    color: var(--slate-500);
    font-size: 13px;
}

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

.muted-section {
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100% - 1180px) / 2));
    padding-right: max(16px, calc((100% - 1180px) / 2));
    background: linear-gradient(180deg, #ffffff, var(--slate-100));
}

.section-heading {
    max-width: 760px;
    margin: 0 auto 36px;
    text-align: center;
}

.left-heading {
    margin-left: 0;
    text-align: left;
}

.section-heading h2,
.page-hero h1,
.detail-main h1 {
    margin: 0 0 12px;
    color: var(--slate-900);
    font-size: clamp(30px, 4.8vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
    margin: 0;
    color: var(--slate-500);
    font-size: 17px;
}

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

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

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

.movie-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.18);
}

.movie-cover {
    position: relative;
    overflow: hidden;
    background: var(--slate-100);
}

.movie-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.28s ease;
}

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

.cover-gradient {
    position: absolute;
    inset: 45% 0 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.76));
}

.year-badge,
.rank-badge,
.play-chip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.year-badge {
    top: 12px;
    left: 12px;
    background: rgba(2, 132, 199, 0.92);
}

.rank-badge {
    top: 12px;
    right: 12px;
    background: rgba(249, 115, 22, 0.96);
}

.play-chip {
    right: 12px;
    bottom: 12px;
    background: rgba(15, 23, 42, 0.82);
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.meta-line {
    margin: 0 0 8px;
    color: var(--slate-500);
    font-size: 13px;
    font-weight: 700;
}

.movie-card h3 {
    margin: 0 0 10px;
    color: var(--slate-900);
    font-size: 19px;
    line-height: 1.28;
}

.movie-card h3 a:hover,
.ranking-content h3 a:hover {
    color: var(--sky-700);
}

.movie-card-desc {
    display: -webkit-box;
    min-height: 46px;
    margin: 0 0 14px;
    color: var(--slate-500);
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
}

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

.category-card {
    position: relative;
    min-height: 230px;
    padding: 24px;
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card img {
    position: absolute;
    right: -36px;
    bottom: -60px;
    width: 150px;
    border-radius: 18px;
    opacity: 0.34;
    transform: rotate(12deg);
}

.category-icon {
    display: block;
    margin-bottom: 14px;
    font-size: 42px;
}

.category-card strong,
.category-card span:not(.category-icon) {
    display: block;
}

.category-card strong {
    font-size: 22px;
    color: var(--slate-900);
}

.category-card span:not(.category-icon) {
    margin-top: 6px;
    color: var(--sky-700);
    font-weight: 900;
}

.category-card p {
    margin: 12px 0 0;
    color: var(--slate-500);
    font-size: 14px;
}

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 80px 54px minmax(0, 1fr) 104px;
    align-items: center;
    gap: 18px;
    padding: 16px;
    border-radius: 20px;
}

.compact-ranking .ranking-item {
    grid-template-columns: 76px 46px minmax(0, 1fr);
}

.compact-ranking .ranking-score {
    display: none;
}

.ranking-cover img {
    width: 80px;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    object-fit: cover;
}

.ranking-number {
    color: var(--orange);
    font-size: 30px;
    font-weight: 950;
    text-align: center;
}

.ranking-content h3 {
    margin: 0 0 4px;
    font-size: 20px;
    line-height: 1.25;
}

.ranking-content p {
    display: -webkit-box;
    margin: 0;
    color: var(--slate-500);
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ranking-score {
    text-align: right;
}

.ranking-score strong {
    display: block;
    color: var(--sky-700);
    font-size: 24px;
}

.ranking-score span {
    color: var(--slate-500);
    font-size: 13px;
}

.page-hero {
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky-700), #2563eb 54%, var(--cyan-500));
}

.page-hero-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 84px 0;
}

.small-hero .page-hero-inner {
    padding: 64px 0;
}

.page-hero h1,
.page-hero p {
    color: #ffffff;
}

.page-hero p:not(.section-eyebrow) {
    max-width: 780px;
    color: #e0f2fe;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1.5fr) repeat(4, minmax(150px, 1fr)) 130px;
    gap: 14px;
    align-items: end;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 20px;
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: var(--slate-700);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 44px;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    padding: 0 12px;
    background: #ffffff;
    color: var(--slate-900);
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--sky-500);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.filter-count {
    color: var(--sky-700);
    font-weight: 900;
    text-align: right;
}

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

.category-overview-card {
    border-radius: 26px;
    overflow: hidden;
}

.category-overview-link {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 24px;
    padding: 22px;
}

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

.category-thumb-stack img {
    width: 100%;
    height: 190px;
    border-radius: 14px;
    object-fit: cover;
}

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

.category-overview-card p {
    color: var(--slate-500);
}

.category-overview-card strong {
    color: var(--sky-700);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--slate-500);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--sky-700);
    font-weight: 800;
}

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

.detail-poster {
    position: sticky;
    top: 96px;
}

.detail-poster img {
    width: 100%;
    border-radius: 28px;
    box-shadow: var(--shadow-strong);
}

.full-button {
    width: 100%;
    margin-top: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky-600), var(--cyan-500));
}

.detail-main {
    padding: 30px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.detail-one-line {
    margin: 0 0 24px;
    color: var(--slate-700);
    font-size: 20px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0;
}

.detail-meta-grid div {
    padding: 16px;
    border-radius: 16px;
    background: var(--sky-50);
}

.detail-meta-grid span,
.detail-meta-grid strong {
    display: block;
}

.detail-meta-grid span {
    color: var(--slate-500);
    font-size: 12px;
    font-weight: 800;
}

.detail-meta-grid strong {
    margin-top: 6px;
    color: var(--slate-900);
}

.large-tags span {
    min-height: 32px;
    font-size: 13px;
}

.player-section {
    margin: 42px 0;
}

.video-player {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000000;
    box-shadow: var(--shadow-strong);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(2, 132, 199, 0.32), rgba(2, 6, 23, 0.68));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay span {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--sky-700);
    font-size: 28px;
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.38);
}

.play-overlay strong {
    font-size: 18px;
}

.video-player.is-playing .play-overlay {
    opacity: 0;
    visibility: hidden;
}

.player-status {
    position: absolute;
    left: 16px;
    bottom: 12px;
    margin: 0;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.65);
    font-size: 12px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.content-card {
    padding: 28px;
    border-radius: 24px;
}

.content-card h2 {
    margin: 0 0 14px;
}

.content-card p {
    margin: 0;
    color: var(--slate-700);
    font-size: 17px;
}

.related-section {
    width: 100%;
    padding-bottom: 0;
}

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

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

.footer-logo {
    color: #ffffff;
}

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

.site-footer h2 {
    color: #ffffff;
    font-size: 16px;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2;
}

.site-footer li {
    margin-bottom: 8px;
}

.site-footer a:hover {
    color: #7dd3fc;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding: 18px;
    text-align: center;
    color: #94a3b8;
}

[hidden] {
    display: none !important;
}

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

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

    .filter-search {
        grid-column: 1 / -1;
    }

    .hero-inner {
        grid-template-columns: 1fr 280px;
    }
}

@media (max-width: 820px) {
    .nav-shell {
        flex-wrap: wrap;
        min-height: 66px;
    }

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

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 8px 0 18px;
    }

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

    .hero-carousel,
    .hero-inner {
        min-height: 760px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        align-content: center;
        padding-top: 56px;
        text-align: left;
    }

    .hero-poster {
        justify-self: start;
        width: 210px;
    }

    .stats-grid,
    .movie-grid,
    .featured-grid,
    .dense-grid,
    .category-grid,
    .category-overview-grid,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

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

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

    .ranking-score {
        grid-column: 3;
        text-align: left;
    }

    .category-overview-link,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        position: static;
        max-width: 320px;
    }

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

@media (max-width: 560px) {
    .stats-grid,
    .movie-grid,
    .featured-grid,
    .dense-grid,
    .category-grid,
    .category-overview-grid,
    .detail-content,
    .footer-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .content-section,
    .detail-shell,
    .page-hero-inner,
    .nav-shell,
    .stats-grid,
    .footer-grid {
        width: min(100% - 24px, 1180px);
    }

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

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

    .ranking-number {
        position: absolute;
        left: 10px;
        top: 10px;
        padding: 2px 8px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.92);
        font-size: 18px;
    }

    .ranking-item {
        position: relative;
    }

    .ranking-content,
    .ranking-score {
        grid-column: 2;
    }
}
