:root {
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --sky-700: #0369a1;
    --blue-600: #2563eb;
    --cyan-500: #06b6d4;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.14);
    --radius-lg: 18px;
    --radius-xl: 24px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--gray-800);
    background: linear-gradient(180deg, var(--gray-50), var(--white));
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--gray-900);
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--white);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--sky-600), var(--cyan-500));
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.28);
}

.brand-text {
    font-size: 21px;
    letter-spacing: -0.02em;
}

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

.nav-link,
.mobile-link {
    color: var(--gray-700);
    font-size: 15px;
    font-weight: 700;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.nav-link {
    padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--sky-700);
    background: var(--sky-50);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 0;
    border-radius: 12px;
    background: var(--gray-100);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--gray-700);
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 8px;
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-nav.open {
    display: flex;
}

.mobile-link {
    padding: 12px 14px;
}

.hero-carousel {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(135deg, var(--sky-600), var(--blue-600), var(--cyan-500));
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.8s ease;
}

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    filter: blur(6px);
    transform: scale(1.08);
    opacity: 0.28;
}

.hero-slide::before,
.detail-hero::before,
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.22), transparent 30%), linear-gradient(90deg, rgba(2, 132, 199, 0.95), rgba(37, 99, 235, 0.86), rgba(6, 182, 212, 0.76));
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) 360px;
    gap: 54px;
    align-items: center;
    width: min(100% - 32px, var(--container));
    min-height: 640px;
    margin: 0 auto;
    padding: 80px 0 96px;
}

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

.hero-copy p {
    max-width: 760px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(16px, 2vw, 21px);
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--sky-700);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy .eyebrow,
.detail-copy .eyebrow,
.page-hero .eyebrow {
    color: rgba(224, 242, 254, 0.96);
}

.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;
    color: var(--sky-700);
    background: var(--sky-50);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

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

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

.primary-button {
    color: var(--sky-700);
    background: var(--white);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.18);
}

.secondary-button {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.12);
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.28);
    transform: rotate(2deg);
}

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

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.hero-dot.active {
    width: 32px;
    background: var(--white);
}

.stats-panel {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    width: min(100% - 32px, var(--container));
    margin: -46px auto 0;
}

.stat-card {
    padding: 24px;
    text-align: center;
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.stat-card strong {
    display: block;
    color: var(--gray-900);
    font-size: 30px;
    line-height: 1;
}

.stat-card span {
    color: var(--gray-500);
    font-size: 14px;
}

.section-block,
.filter-bar,
.search-app {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
}

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

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

.section-heading h2 {
    margin: 2px 0 0;
    color: var(--gray-900);
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.16;
    letter-spacing: -0.035em;
}

.section-heading a,
.text-link {
    color: var(--sky-700);
    font-weight: 800;
}

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

.compact-heading h2 {
    font-size: 26px;
}

.category-grid,
.category-overview-grid {
    display: grid;
    gap: 18px;
}

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

.category-tile,
.category-overview-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover,
.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.category-covers,
.overview-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 8px;
    background: linear-gradient(135deg, var(--sky-50), var(--gray-100));
}

.category-covers img,
.overview-thumbs img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
}

.category-tile div:last-child,
.overview-body {
    padding: 18px;
}

.category-count,
.overview-body span {
    color: var(--sky-700);
    font-size: 13px;
    font-weight: 800;
}

.category-tile h3,
.category-overview-card h2 {
    margin: 4px 0 8px;
    color: var(--gray-900);
}

.category-tile p,
.category-overview-card p {
    margin: 0;
    color: var(--gray-500);
    font-size: 14px;
}

.two-column-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 30px;
    align-items: start;
}

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

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

.ranking-card-grid {
    grid-template-columns: repeat(5, 1fr);
}

.category-movie-grid {
    grid-template-columns: repeat(5, 1fr);
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

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

.play-chip,
.rank-badge {
    position: absolute;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    background: rgba(2, 132, 199, 0.9);
}

.rank-badge {
    top: 10px;
    left: 10px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: rgba(239, 68, 68, 0.9);
}

.movie-info {
    padding: 16px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--gray-500);
    font-size: 12px;
    font-weight: 700;
}

.movie-info h3 {
    margin: 8px 0 8px;
    color: var(--gray-900);
    font-size: 17px;
    line-height: 1.35;
}

.movie-info h3 a:hover {
    color: var(--sky-700);
}

.movie-info p {
    margin: 0 0 12px;
    min-height: 44px;
    color: var(--gray-600);
    font-size: 14px;
}

.rank-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

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

.rank-row {
    display: grid;
    grid-template-columns: auto 54px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    background: var(--gray-50);
    border-radius: 14px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    background: var(--sky-50);
    transform: translateX(3px);
}

.rank-row img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
}

.list-rank {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: var(--sky-700);
    background: var(--sky-100);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.rank-title {
    color: var(--gray-900);
    font-weight: 800;
}

.rank-meta {
    grid-column: 3;
    color: var(--gray-500);
    font-size: 13px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(135deg, var(--sky-600), var(--blue-600), var(--cyan-500));
}

.page-hero > div {
    position: relative;
    z-index: 1;
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    padding: 76px 0;
}

.page-hero h1 {
    margin: 8px 0 12px;
    max-width: 880px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.08;
}

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

.filter-bar,
.search-app {
    margin-top: 30px;
    padding: 22px;
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px auto;
    gap: 18px;
    align-items: end;
}

.search-field,
.select-field,
.global-search-field {
    display: grid;
    gap: 8px;
    color: var(--gray-700);
    font-size: 13px;
    font-weight: 800;
}

.search-field input,
.select-field select,
.global-search-field input,
.search-toolbar select {
    width: 100%;
    padding: 12px 14px;
    color: var(--gray-800);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    outline: none;
}

.search-field input:focus,
.select-field select:focus,
.global-search-field input:focus,
.search-toolbar select:focus {
    border-color: var(--sky-500);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.filter-count {
    margin: 0 0 12px;
    color: var(--gray-500);
    font-weight: 800;
}

.list-section {
    padding-top: 30px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 230px 1fr;
    align-items: stretch;
}

.overview-thumbs {
    grid-template-columns: repeat(2, 1fr);
}

.detail-inner {
    position: relative;
    z-index: 1;
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    padding: 34px 0 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    font-weight: 700;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.25);
}

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

.detail-copy h1 {
    margin: 10px 0 14px;
    max-width: 880px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.detail-one-line {
    max-width: 820px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 820px;
}

.detail-meta-grid div {
    padding: 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
}

.detail-meta-grid strong {
    display: block;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
}

.detail-meta-grid span {
    color: var(--white);
    font-weight: 800;
}

.detail-tags {
    margin-top: 18px;
}

.detail-tags span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.player-block {
    padding-top: 54px;
}

.source-label {
    color: var(--gray-500);
    font-size: 14px;
    font-weight: 800;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: var(--gray-900);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--gray-900);
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    width: 100%;
    color: var(--white);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.25), rgba(15, 23, 42, 0.72));
    border: 0;
    cursor: pointer;
}

.player-start.hidden {
    display: none;
}

.big-play {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    padding-left: 5px;
    color: var(--sky-700);
    background: var(--white);
    border-radius: 999px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.28);
    font-size: 34px;
}

.player-status {
    margin: 14px 0 0;
    color: var(--gray-500);
    font-size: 14px;
}

.prose-card {
    padding: 30px;
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.prose-card h2 {
    margin: 0 0 12px;
    color: var(--gray-900);
    font-size: 25px;
}

.prose-card h2:not(:first-child) {
    margin-top: 28px;
}

.prose-card p {
    margin: 0 0 14px;
    color: var(--gray-700);
    font-size: 17px;
}

.search-app {
    display: grid;
    gap: 18px;
}

.global-search-field input {
    padding: 16px 18px;
    font-size: 18px;
}

.search-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    color: var(--gray-600);
    font-weight: 800;
}

.search-toolbar select {
    max-width: 220px;
}

.search-empty {
    grid-column: 1 / -1;
    padding: 36px;
    text-align: center;
    color: var(--gray-500);
    background: var(--gray-50);
    border: 1px dashed var(--gray-200);
    border-radius: var(--radius-lg);
}

.site-footer {
    margin-top: 78px;
    color: var(--gray-300);
    background: var(--gray-900);
}

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

.footer-logo .brand-text,
.footer-column h3 {
    color: var(--white);
}

.footer-column p {
    max-width: 420px;
    color: var(--gray-400);
}

.footer-column ul {
    display: grid;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.footer-column a {
    color: var(--gray-400);
}

.footer-column a:hover {
    color: var(--sky-100);
}

.footer-bottom {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    padding: 22px 0;
    color: var(--gray-400);
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    text-align: center;
}

.footer-bottom p {
    margin: 0;
}

@media (max-width: 1100px) {
    .category-grid,
    .category-movie-grid,
    .ranking-card-grid {
        grid-template-columns: repeat(4, 1fr);
    }

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

    .hero-inner,
    .detail-layout {
        grid-template-columns: 1fr 300px;
    }
}

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

    .menu-toggle {
        display: flex;
    }

    .hero-inner,
    .detail-layout,
    .two-column-layout,
    .footer-inner,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .hero-inner {
        min-height: 760px;
        padding-top: 58px;
    }

    .hero-poster,
    .detail-poster {
        max-width: 300px;
        margin: 0 auto;
    }

    .stats-panel,
    .movie-grid,
    .home-grid,
    .category-grid,
    .category-movie-grid,
    .ranking-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-bar {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .rank-panel {
        position: static;
    }

    .detail-meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .brand-text {
        font-size: 18px;
    }

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

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

    .stats-panel,
    .movie-grid,
    .home-grid,
    .category-grid,
    .category-movie-grid,
    .ranking-card-grid,
    .related-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

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

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

    .rank-row {
        grid-template-columns: auto 46px 1fr;
    }

    .rank-row img {
        width: 46px;
        height: 62px;
    }

    .prose-card {
        padding: 22px;
    }
}
