:root {
    --primary-50: #e6fffb;
    --primary-100: #b3f5ee;
    --primary-400: #14b8a6;
    --primary-500: #009999;
    --primary-600: #007a7a;
    --primary-700: #005f5f;
    --secondary-50: #f0f4f8;
    --secondary-100: #d9e2ec;
    --secondary-200: #bcccdc;
    --secondary-300: #9fb3c8;
    --secondary-500: #627d98;
    --secondary-600: #486581;
    --secondary-700: #334e68;
    --secondary-800: #243b53;
    --secondary-900: #102a43;
    --white: #ffffff;
    --black: #050505;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --shadow-soft: 0 10px 25px rgba(16, 42, 67, 0.08);
    --shadow-card: 0 18px 45px rgba(16, 42, 67, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--secondary-900);
    background: var(--secondary-50);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(188, 204, 220, 0.55);
    box-shadow: 0 10px 26px rgba(16, 42, 67, 0.06);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 210px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-400), var(--primary-700));
    box-shadow: 0 12px 28px rgba(0, 153, 153, 0.28);
    transform: translateZ(0);
    transition: transform 0.2s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.brand-text strong {
    font-size: 20px;
    color: var(--secondary-900);
}

.brand-text small {
    color: var(--secondary-600);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--secondary-700);
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--primary-600);
    background: var(--primary-50);
}

.nav-link-muted {
    font-size: 14px;
    color: var(--secondary-600);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 0;
    background: var(--secondary-50);
    border-radius: 12px;
}

.menu-button span {
    width: 20px;
    height: 2px;
    background: var(--secondary-800);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    background: var(--white);
    border-top: 1px solid var(--secondary-100);
}

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

.mobile-nav-link {
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--secondary-700);
    background: var(--secondary-50);
    font-weight: 600;
}

.mobile-nav-link.is-active {
    color: var(--primary-600);
    background: var(--primary-50);
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: var(--secondary-900);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(5, 12, 22, 0.86), rgba(5, 12, 22, 0.42), rgba(5, 12, 22, 0.12)),
        linear-gradient(0deg, rgba(5, 12, 22, 0.88), rgba(5, 12, 22, 0.05));
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 760px;
    color: var(--white);
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 14px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 153, 153, 0.88);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

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

.hero-meta,
.detail-meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.hero-meta span,
.detail-meta-list span {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--secondary-800);
    background: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    font-weight: 700;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 22px;
    border: 0;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
    color: var(--white);
    background: var(--primary-500);
    box-shadow: 0 14px 30px rgba(0, 153, 153, 0.25);
}

.btn-primary:hover {
    background: var(--primary-600);
}

.btn-secondary {
    color: var(--secondary-800);
    background: rgba(255, 255, 255, 0.9);
}

.btn-secondary:hover {
    color: var(--primary-700);
    background: var(--white);
}

.hero-dots {
    position: absolute;
    right: clamp(20px, 5vw, 64px);
    bottom: 36px;
    z-index: 5;
    display: flex;
    gap: 10px;
}

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

.hero-dot.is-active {
    width: 34px;
    background: var(--primary-500);
}

.section {
    padding: 72px 0;
}

.section-white {
    background: var(--white);
}

.section-dark {
    color: var(--white);
    background: var(--secondary-900);
}

.section-heading,
.section-heading-row {
    margin-bottom: 28px;
}

.section-heading {
    text-align: center;
    max-width: 780px;
}

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

.section-heading-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

.section-kicker {
    color: var(--primary-700);
    background: var(--primary-50);
}

.section-dark .section-kicker {
    color: var(--white);
    background: rgba(20, 184, 166, 0.18);
}

.section h2,
.page-hero h1,
.detail-content h1 {
    margin: 12px 0 8px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section p,
.page-hero p {
    color: var(--secondary-600);
}

.section-dark p {
    color: var(--secondary-200);
}

.text-link {
    color: var(--primary-600);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--secondary-100);
}

.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-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(16, 42, 67, 0.78);
    font-size: 12px;
    font-weight: 800;
}

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    border-radius: 999px;
    background: var(--primary-500);
    box-shadow: 0 12px 28px rgba(0, 153, 153, 0.32);
}

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

.movie-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.movie-tags span,
.tag-list span {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--primary-700);
    background: var(--primary-50);
    font-size: 12px;
    font-weight: 700;
}

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

.movie-card p {
    min-height: 45px;
    margin: 0;
    color: var(--secondary-600);
    font-size: 14px;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    color: var(--secondary-500);
    font-size: 13px;
    font-weight: 700;
}

.is-compact .movie-card-body {
    padding: 13px;
}

.is-compact h3 {
    font-size: 16px;
}

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

.category-tile {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 22px;
    color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    background: var(--secondary-900);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(16, 42, 67, 0.88), rgba(16, 42, 67, 0.12));
}

.category-tile:hover img {
    transform: scale(1.08);
    opacity: 0.72;
}

.category-tile span,
.category-tile small {
    position: relative;
    z-index: 1;
}

.category-tile span {
    font-size: 23px;
    font-weight: 900;
}

.category-tile small {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.82);
}

.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-auto-rows: 210px;
    gap: 22px;
}

.featured-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--secondary-800);
}

.featured-card.is-large {
    grid-row: span 2;
}

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

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

.featured-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.08));
}

.featured-content {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    display: grid;
    gap: 6px;
}

.featured-content small {
    color: var(--primary-100);
    font-weight: 800;
}

.featured-content strong {
    font-size: 22px;
}

.featured-content em {
    color: rgba(255, 255, 255, 0.8);
    font-style: normal;
}

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

.ranking-card,
.card-panel,
.side-card,
.poster-panel,
.ranking-table,
.category-overview-card {
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.ranking-card {
    position: sticky;
    top: 96px;
    padding: 24px;
}

.ranking-card-head h2 {
    margin-top: 10px;
}

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

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

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

.rank-no {
    color: var(--primary-600);
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 800;
}

.rank-type {
    color: var(--secondary-500);
    font-size: 13px;
}

.page-hero,
.detail-top {
    color: var(--white);
    background: radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.38), transparent 34%),
        linear-gradient(135deg, var(--secondary-900), var(--primary-700));
}

.page-hero {
    padding: 68px 0;
}

.page-hero-compact {
    padding-bottom: 44px;
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.78);
}

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

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

.filter-bar,
.search-panel {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.filter-input,
.search-panel input {
    width: min(560px, 100%);
    min-height: 48px;
    padding: 0 16px;
    color: var(--secondary-900);
    border: 2px solid transparent;
    border-radius: 14px;
    outline: none;
    background: var(--white);
    box-shadow: 0 12px 28px rgba(16, 42, 67, 0.12);
}

.filter-input:focus,
.search-panel input:focus {
    border-color: var(--primary-400);
}

.filter-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.filter-chip {
    padding: 8px 14px;
    border: 1px solid var(--secondary-200);
    border-radius: 999px;
    color: var(--secondary-700);
    font-weight: 700;
    background: var(--white);
}

.filter-chip:hover,
.filter-chip.is-active {
    color: var(--white);
    border-color: var(--primary-500);
    background: var(--primary-500);
}

.empty-state,
.search-status {
    padding: 26px;
    margin-top: 24px;
    color: var(--secondary-600);
    text-align: center;
    border-radius: var(--radius-md);
    background: var(--secondary-50);
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    overflow: hidden;
}

.category-cover-stack {
    position: relative;
    min-height: 240px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    background: var(--secondary-900);
}

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

.category-overview-body {
    padding: 26px;
}

.category-overview-body p {
    color: var(--secondary-600);
}

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

.detail-section {
    padding: 38px 0 72px;
}

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

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    background: var(--black);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
}

.video-player {
    width: 100%;
    height: 100%;
    background: var(--black);
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--white);
    border: 0;
    background: radial-gradient(circle, rgba(0, 153, 153, 0.36), rgba(0, 0, 0, 0.52));
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.player-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.player-overlay span {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--primary-500);
    box-shadow: 0 16px 34px rgba(0, 153, 153, 0.36);
    font-size: 28px;
}

.player-message {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    padding: 12px 14px;
    color: var(--white);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.65);
}

.detail-content {
    margin-top: 24px;
    padding: 30px;
}

.detail-title-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: start;
}

.detail-meta-list span {
    background: var(--secondary-50);
}

.detail-one-line {
    padding: 18px 20px;
    margin: 18px 0;
    color: var(--secondary-800);
    border-left: 4px solid var(--primary-500);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--primary-50);
    font-weight: 700;
}

.detail-content h2 {
    margin: 28px 0 10px;
    font-size: 24px;
}

.detail-content p {
    color: var(--secondary-700);
}

.detail-sidebar {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 20px;
}

.poster-panel,
.side-card {
    padding: 18px;
}

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

.poster-panel .btn {
    width: 100%;
}

.side-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.side-link {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
    background: var(--secondary-50);
}

.side-link:hover {
    background: var(--primary-50);
}

.side-link img {
    width: 62px;
    height: 78px;
    object-fit: cover;
    border-radius: 10px;
}

.side-link strong {
    display: block;
    line-height: 1.35;
}

.side-link small {
    color: var(--secondary-500);
}

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

.ranking-table {
    overflow: hidden;
}

.ranking-table-row {
    display: grid;
    grid-template-columns: 70px 78px 1fr 160px;
    gap: 14px;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--secondary-100);
    transition: background 0.2s ease;
}

.ranking-table-row:hover {
    background: var(--primary-50);
}

.ranking-number {
    color: var(--primary-600);
    font-size: 22px;
    font-weight: 900;
}

.ranking-cover img {
    width: 62px;
    height: 82px;
    object-fit: cover;
    border-radius: 10px;
}

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

.ranking-info small {
    color: var(--secondary-600);
}

.ranking-meta {
    color: var(--secondary-500);
    font-weight: 700;
}

.site-footer {
    margin-top: 0;
    padding: 48px 0;
    color: var(--secondary-100);
    background: var(--secondary-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 34px;
}

.footer-brand {
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 900;
}

.site-footer p {
    color: var(--secondary-300);
}

.site-footer h3 {
    margin: 0 0 12px;
}

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

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

.footer-links a {
    color: var(--secondary-300);
}

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

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

    .menu-button {
        display: inline-flex;
    }

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

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

    .ranking-card,
    .detail-sidebar {
        position: static;
    }

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

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

    .brand {
        min-width: auto;
    }

    .brand-text small {
        display: none;
    }

    .hero {
        min-height: 560px;
        height: 78vh;
    }

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

    .hero p {
        font-size: 16px;
    }

    .hero-dots {
        left: 20px;
        right: auto;
        bottom: 24px;
    }

    .section {
        padding: 52px 0;
    }

    .section-heading-row,
    .detail-title-row,
    .filter-bar,
    .search-panel {
        flex-direction: column;
        align-items: stretch;
    }

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

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

    .movie-card h3 {
        font-size: 16px;
    }

    .movie-card p {
        min-height: auto;
    }

    .featured-grid {
        grid-auto-rows: 260px;
    }

    .featured-card.is-large {
        grid-row: span 1;
    }

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

    .category-cover-stack {
        min-height: 170px;
    }

    .detail-content {
        padding: 20px;
    }

    .ranking-table-row {
        grid-template-columns: 48px 58px 1fr;
    }

    .ranking-meta {
        grid-column: 3;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

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

    .hero-actions .btn {
        width: 100%;
    }

    .page-hero {
        padding: 48px 0;
    }
}
