:root {
    --fog-50: #f0f4f8;
    --fog-100: #d9e2ec;
    --fog-200: #bcccdc;
    --fog-300: #9fb3c8;
    --fog-600: #526d82;
    --fog-700: #334e68;
    --fog-800: #243b53;
    --fog-900: #102a43;
    --mist-50: #f8f9fa;
    --mist-500: #6c757d;
    --mist-600: #5c6773;
    --mist-700: #495057;
    --cyan-100: #bef8fd;
    --cyan-400: #38bec9;
    --cyan-500: #2cb1bc;
    --cyan-600: #14919b;
    --cyan-700: #0e7c86;
    --white: #ffffff;
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, .05);
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, .06), 0 2px 4px -1px rgba(0, 0, 0, .03);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, .08), 0 4px 6px -2px rgba(0, 0, 0, .03);
    --shadow-strong: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 10px 10px -5px rgba(0, 0, 0, .02);
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--fog-800);
    background: linear-gradient(135deg, #e0fcff 0%, var(--fog-50) 48%, #ffffff 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .95);
    border-bottom: 1px solid rgba(188, 204, 220, .75);
    backdrop-filter: blur(16px);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan-500), var(--fog-800));
    box-shadow: var(--shadow-soft);
}

.brand-text {
    max-width: 260px;
    line-height: 1.2;
}

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

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    font-weight: 700;
    color: var(--mist-600);
    transition: color .2s ease, background-color .2s ease;
}

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

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--fog-50);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--fog-800);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 0 24px 18px;
    gap: 8px;
    flex-wrap: wrap;
}

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 420px);
    gap: 48px;
    align-items: center;
    padding: 96px max(24px, calc((100vw - 1280px) / 2 + 24px));
    color: #ffffff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease, transform 1s ease;
    transform: scale(1.02);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
    transform: scale(1.08);
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(16, 42, 67, .92), rgba(16, 42, 67, .62), rgba(16, 42, 67, .28));
}

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

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    margin: 8px 0 10px;
    max-width: 900px;
    font-size: clamp(2.4rem, 6vw, 4.9rem);
    line-height: 1;
    letter-spacing: -.04em;
}

.hero-content h2 {
    margin: 0 0 16px;
    font-size: clamp(1.3rem, 3vw, 2.2rem);
    color: var(--cyan-100);
}

.hero-summary {
    max-width: 720px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, .86);
    line-height: 1.9;
    font-size: 1.05rem;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--cyan-100);
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.eyebrow.dark {
    color: var(--cyan-700);
}

.hero-tags .tag {
    color: #ffffff;
    background: rgba(255, 255, 255, .18);
}

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

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

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

.btn.primary {
    color: #ffffff;
    background: var(--cyan-500);
    box-shadow: var(--shadow-medium);
}

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

.btn.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(8px);
}

.btn.ghost:hover {
    background: rgba(255, 255, 255, .28);
}

.hero-poster {
    justify-self: end;
    width: min(360px, 28vw);
    min-width: 240px;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}

.hero-poster img {
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-poster span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(0, 0, 0, .45);
    color: #ffffff;
    backdrop-filter: blur(6px);
    font-size: 2rem;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, .3);
    cursor: pointer;
    font-size: 2.2rem;
    line-height: 1;
    backdrop-filter: blur(8px);
}

.hero-control:hover {
    background: rgba(0, 0, 0, .5);
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: #ffffff;
}

.page-main,
.panel-section {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.page-main {
    padding-top: 40px;
    padding-bottom: 70px;
}

.panel-section {
    padding-top: 64px;
    padding-bottom: 18px;
}

.quick-search {
    margin-top: 0;
}

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

.section-heading h2,
.preview-heading h2,
.compact-heading h2 {
    margin: 0;
    color: var(--fog-800);
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    letter-spacing: -.02em;
}

.section-heading p,
.preview-heading p {
    margin: 8px 0 0;
    color: var(--mist-600);
}

.text-link {
    color: var(--cyan-700);
    font-weight: 800;
}

.text-link:hover {
    color: var(--cyan-600);
}

.inline-search,
.search-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    background: #ffffff;
    border-radius: 24px;
    padding: 12px;
    box-shadow: var(--shadow-soft);
}

.inline-search input,
.search-box input {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--fog-100);
    border-radius: 16px;
    padding: 0 16px;
    color: var(--fog-800);
    outline: none;
}

.inline-search input:focus,
.search-box input:focus {
    border-color: var(--cyan-500);
    box-shadow: 0 0 0 4px rgba(44, 177, 188, .15);
}

.inline-search button,
.search-box button {
    min-height: 52px;
    border: 0;
    border-radius: 16px;
    padding: 0 22px;
    color: #ffffff;
    background: var(--fog-800);
    font-weight: 800;
    cursor: pointer;
}

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

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

.category-tile {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform .2s ease, box-shadow .2s ease;
}

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

.category-stack {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    height: 110px;
    overflow: hidden;
    border-radius: 18px;
    background: var(--fog-100);
}

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

.category-tile h3 {
    margin: 0;
    font-size: 1.2rem;
}

.category-tile p {
    margin: 0;
    color: var(--mist-600);
    line-height: 1.7;
}

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

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform .25s ease, box-shadow .25s ease;
}

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

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

.poster-wrap img {
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

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

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, .42);
    backdrop-filter: blur(6px);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translateY(0);
}

.rank-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: var(--cyan-500);
    font-weight: 900;
    box-shadow: var(--shadow-soft);
}

.movie-body {
    padding: 14px;
}

.movie-body h3 {
    margin: 0 0 8px;
    color: var(--fog-800);
    font-size: 1rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-body h3 a:hover {
    color: var(--cyan-700);
}

.meta-line {
    margin: 0 0 8px;
    color: var(--mist-500);
    font-size: .9rem;
}

.movie-desc {
    margin: 0 0 12px;
    min-height: 44px;
    color: var(--mist-700);
    line-height: 1.6;
    font-size: .92rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    color: var(--cyan-700);
    background: var(--cyan-100);
    font-size: .78rem;
    font-weight: 800;
}

.ranking-panel {
    padding-bottom: 70px;
}

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

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

.horizontal-card {
    display: grid;
    grid-template-columns: auto 94px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.list-rank {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: var(--fog-800);
    font-weight: 900;
}

.horizontal-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: var(--fog-100);
}

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

.horizontal-card h3 {
    margin: 0 0 6px;
    color: var(--fog-800);
}

.horizontal-card h3 a:hover {
    color: var(--cyan-700);
}

.horizontal-card p {
    margin: 0 0 8px;
    color: var(--mist-700);
    line-height: 1.6;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    padding: 54px;
    color: #ffffff;
    background: radial-gradient(circle at top right, rgba(56, 190, 201, .45), transparent 32%), linear-gradient(135deg, var(--fog-900), var(--fog-800));
    box-shadow: var(--shadow-medium);
}

.small-hero h1 {
    margin: 0 0 14px;
    max-width: 900px;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.06;
    letter-spacing: -.03em;
}

.small-hero p:last-child {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, .84);
    line-height: 1.85;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    color: var(--mist-600);
    font-weight: 700;
}

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

.category-preview-list {
    display: grid;
    gap: 40px;
}

.category-preview {
    padding: 26px;
    border-radius: 28px;
    background: rgba(255, 255, 255, .82);
    box-shadow: var(--shadow-soft);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.filter-chip {
    min-height: 38px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    color: var(--fog-700);
    background: rgba(255, 255, 255, .8);
    font-weight: 800;
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease;
}

.filter-chip.active,
.filter-chip:hover {
    color: #ffffff;
    background: var(--cyan-500);
}

.detail-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    padding: 30px;
    border-radius: 32px;
    background: #ffffff;
    box-shadow: var(--shadow-medium);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 3 / 4;
    background: var(--fog-100);
}

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

.detail-info h1 {
    margin: 8px 0 16px;
    color: var(--fog-900);
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.detail-one-line {
    margin: 0 0 24px;
    color: var(--mist-700);
    font-size: 1.1rem;
    line-height: 1.85;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 20px;
}

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

.detail-meta dt {
    color: var(--mist-500);
    font-size: .85rem;
    font-weight: 800;
}

.detail-meta dd {
    margin: 4px 0 0;
    color: var(--fog-800);
    font-weight: 800;
}

.detail-tags {
    margin-bottom: 26px;
}

.player-section {
    margin-top: 48px;
    padding: 28px;
    border-radius: 30px;
    color: #ffffff;
    background: var(--fog-900);
    box-shadow: var(--shadow-medium);
}

.player-section h2 {
    margin: 0 0 20px;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

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

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: #ffffff;
    background: #000000;
    transition: opacity .25s ease, visibility .25s ease;
}

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

.player-cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .62));
}

.big-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(44, 177, 188, .86);
    box-shadow: var(--shadow-strong);
    font-size: 2.6rem;
}

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

.compact-panel {
    max-width: none;
    padding: 34px;
    margin-top: 40px;
    border-radius: 30px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.detail-text h2 {
    margin: 0 0 14px;
    color: var(--fog-800);
}

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

.detail-text p {
    margin: 0;
    color: var(--mist-700);
    line-height: 2;
    font-size: 1.02rem;
}

.search-result-title {
    margin-bottom: 20px;
    color: var(--fog-800);
    font-size: 1.4rem;
    font-weight: 900;
}

.site-footer {
    margin-top: 40px;
    color: rgba(255, 255, 255, .78);
    background: var(--fog-900);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 1fr);
    gap: 32px;
}

.footer-inner strong {
    display: block;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 1.2rem;
}

.footer-inner p {
    margin: 0;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
}

.footer-links a:hover {
    background: rgba(255, 255, 255, .16);
}

.footer-copy {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 18px 24px;
    text-align: center;
}

.is-filter-hidden {
    display: none;
}

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 86px 24px 96px;
    }

    .hero-poster {
        justify-self: start;
        width: 220px;
        min-width: 0;
    }

    .hero-control {
        top: auto;
        bottom: 26px;
        transform: none;
    }

    .hero-dots {
        bottom: 42px;
    }

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

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

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

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

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

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

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .header-inner {
        padding: 0 16px;
    }

    .brand-text {
        max-width: 190px;
        font-size: .94rem;
    }

    .page-main,
    .panel-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .page-hero {
        padding: 34px 22px;
        border-radius: 24px;
    }

    .inline-search,
    .search-box {
        grid-template-columns: 1fr;
    }

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

    .horizontal-card {
        grid-template-columns: auto 78px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .horizontal-card p:not(.meta-line),
    .horizontal-card .tag-row {
        display: none;
    }

    .detail-layout,
    .player-section,
    .compact-panel {
        padding: 18px;
        border-radius: 22px;
    }

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