:root {
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --sky-700: #0369a1;
    --blue-600: #2563eb;
    --ink-900: #0f172a;
    --ink-800: #1e293b;
    --ink-700: #334155;
    --ink-500: #64748b;
    --line: #e2e8f0;
    --card: #ffffff;
    --soft-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --deep-shadow: 0 25px 80px rgba(15, 23, 42, 0.25);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--ink-800);
    background: linear-gradient(180deg, var(--sky-50) 0%, #ffffff 42%, #f8fafc 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--sky-500), var(--blue-600));
    box-shadow: 0 12px 30px rgba(2, 132, 199, 0.28);
}

.nav-container {
    width: min(1180px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand {
    color: #ffffff;
    font-size: 20px;
    white-space: nowrap;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: var(--sky-600);
    background: #ffffff;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
    transform: translateZ(0);
    transition: transform 0.2s ease;
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    color: #ffffff;
    font-weight: 650;
    margin-left: auto;
}

.desktop-nav > a,
.nav-dropdown > a {
    opacity: 0.96;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.desktop-nav > a:hover,
.nav-dropdown > a:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    width: 190px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--deep-shadow);
    color: var(--ink-700);
    transform: translate(-50%, 10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.dropdown-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
}

.dropdown-panel a:hover {
    background: var(--sky-50);
    color: var(--sky-700);
}

.nav-search {
    display: flex;
    align-items: center;
    min-width: 250px;
}

.nav-search input {
    width: 100%;
    height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px 0 0 999px;
    outline: none;
}

.nav-search input:focus {
    box-shadow: inset 0 0 0 2px rgba(14, 165, 233, 0.35);
}

.nav-search button {
    height: 34px;
    padding: 0 16px;
    border: 0;
    border-radius: 0 999px 999px 0;
    color: #ffffff;
    background: var(--sky-700);
    cursor: pointer;
    font-weight: 650;
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 24px 18px;
    background: var(--sky-600);
}

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

.mobile-nav a {
    color: #ffffff;
    padding: 8px 0;
    font-weight: 650;
}

.hero-carousel {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: var(--ink-900);
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.52) 46%, rgba(2, 6, 23, 0.14) 100%),
        radial-gradient(circle at 20% 70%, rgba(14, 165, 233, 0.35), transparent 34%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100% - 1180px) / 2));
    right: max(32px, calc((100% - 1180px) / 2));
    bottom: 74px;
    max-width: 760px;
    color: #ffffff;
}

.hero-tags,
.detail-meta,
.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 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    backdrop-filter: blur(12px);
    font-size: 13px;
    font-weight: 650;
}

.hero-tags span:first-child,
.tag-row span:first-child {
    background: var(--sky-500);
}

.hero-content h1 {
    margin: 18px 0 14px;
    font-size: clamp(34px, 6vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.hero-content p {
    margin: 0 0 28px;
    max-width: 680px;
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.86);
}

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

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

.primary-button {
    color: #ffffff;
    background: var(--sky-500);
    box-shadow: 0 14px 28px rgba(14, 165, 233, 0.32);
}

.primary-button:hover {
    background: var(--sky-600);
    transform: translateY(-2px);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.34);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

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

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

.section-heading h2,
.section-heading h1 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    color: var(--ink-800);
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--ink-500);
}

.section-link {
    color: var(--sky-700);
    font-weight: 800;
    white-space: nowrap;
}

.feature-grid,
.movie-grid,
.category-grid {
    display: grid;
    gap: 24px;
}

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

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

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

.feature-card .poster-wrap {
    aspect-ratio: 16 / 11;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.7) 100%);
    opacity: 0.78;
}

.play-chip {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--sky-500);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    min-width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.card-body {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.card-body strong {
    color: var(--ink-800);
    line-height: 1.35;
    font-size: 16px;
}

.meta-line,
.card-desc {
    color: var(--ink-500);
    font-size: 13px;
}

.card-desc {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row span {
    color: var(--sky-700);
    background: var(--sky-50);
    backdrop-filter: none;
    font-size: 12px;
}

.tag-row span:first-child {
    color: #ffffff;
    background: var(--sky-500);
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 28px;
}

.panel-card {
    padding: 26px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--soft-shadow);
}

.compact-heading {
    margin-bottom: 20px;
}

.rank-list {
    display: grid;
    gap: 12px;
}

.rank-item {
    display: grid;
    grid-template-columns: 44px 58px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease, transform 0.2s ease;
}

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

.rank-num {
    color: var(--sky-700);
    font-size: 22px;
    font-weight: 900;
}

.rank-item img {
    width: 58px;
    height: 78px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--sky-100);
}

.rank-item strong,
.rank-item small {
    display: block;
}

.rank-item small {
    margin-top: 5px;
    color: var(--ink-500);
    line-height: 1.4;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(130px, 0.8fr)) auto;
    gap: 14px;
    align-items: end;
    padding: 18px;
    margin-bottom: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: var(--ink-500);
    font-size: 13px;
    font-weight: 750;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    color: var(--ink-800);
    outline: none;
}

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

.filter-panel button {
    border: 0;
    color: #ffffff;
    background: var(--ink-800);
    cursor: pointer;
}

.category-tile {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.25), transparent 45%),
        linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile strong {
    color: var(--ink-800);
    font-size: 21px;
}

.category-tile span {
    color: var(--ink-500);
    line-height: 1.7;
}

.category-tile em {
    color: var(--sky-700);
    font-style: normal;
    font-weight: 800;
}

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 210px;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 4px 20px;
    scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
    scroll-snap-align: start;
}

.page-hero {
    position: relative;
    min-height: 360px;
    display: flex;
    align-items: end;
    overflow: hidden;
    background:
        linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.45)),
        var(--page-hero-image),
        linear-gradient(135deg, var(--sky-500), var(--blue-600));
    background-size: cover;
    background-position: center;
    color: #ffffff;
}

.slim-hero {
    min-height: 300px;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.26), transparent 24%),
        linear-gradient(135deg, var(--sky-500), var(--blue-600));
}

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

.page-hero span {
    display: inline-flex;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    font-weight: 750;
}

.page-hero h1 {
    margin: 16px 0 12px;
    font-size: clamp(34px, 6vw, 56px);
    line-height: 1.05;
}

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

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

.category-overview-block {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

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

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

.detail-section {
    padding-top: 36px;
}

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

.static-player {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--deep-shadow);
    aspect-ratio: 16 / 9;
}

.static-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.22), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: var(--sky-500);
    box-shadow: 0 20px 45px rgba(14, 165, 233, 0.45);
    font-size: 34px;
    text-indent: 5px;
}

.player-start strong {
    font-size: 24px;
}

.player-start small {
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

.detail-copy h1 {
    margin: 0 0 12px;
    color: var(--ink-900);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
}

.lead-text {
    color: var(--ink-700);
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--sky-700);
    background: var(--sky-50);
    font-size: 13px;
    font-weight: 800;
}

.detail-tags {
    margin: 18px 0 22px;
}

.detail-copy h2 {
    margin: 26px 0 10px;
    color: var(--ink-900);
    font-size: 22px;
}

.detail-copy p {
    color: var(--ink-700);
    line-height: 1.9;
}

.detail-aside {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 16px;
}

.detail-aside > img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 24px;
    object-fit: cover;
    background: var(--sky-100);
    box-shadow: var(--soft-shadow);
}

.aside-card {
    display: grid;
    gap: 10px;
    padding: 20px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.aside-card strong {
    font-size: 20px;
    color: var(--ink-900);
}

.aside-card span {
    color: var(--ink-500);
}

.full-button {
    width: 100%;
}

.empty-state {
    display: none;
    margin: 28px 0 0;
    padding: 24px;
    border-radius: 20px;
    color: var(--ink-500);
    background: #ffffff;
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

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

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

.footer-brand {
    color: #ffffff;
    font-size: 20px;
}

.footer-grid p {
    max-width: 420px;
    line-height: 1.8;
}

.footer-grid h3 {
    margin: 0 0 16px;
    color: #ffffff;
}

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

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

.is-hidden-by-filter {
    display: none !important;
}

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

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

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

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

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

    .hero-carousel {
        height: 520px;
    }

    .hero-content {
        left: 22px;
        right: 22px;
        bottom: 62px;
    }

    .hero-arrow {
        display: none;
    }

    .feature-grid,
    .two-column-section,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-aside {
        position: static;
        grid-template-columns: 160px minmax(0, 1fr);
        align-items: start;
    }
}

@media (max-width: 640px) {
    .content-section {
        width: min(100% - 22px, 1180px);
        padding: 36px 0;
    }

    .nav-container {
        width: min(100% - 22px, 1180px);
    }

    .hero-carousel {
        height: 500px;
    }

    .hero-content p {
        font-size: 15px;
    }

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

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

    .filter-panel {
        grid-template-columns: 1fr;
        padding: 14px;
    }

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

    .card-body {
        padding: 12px;
    }

    .card-desc {
        -webkit-line-clamp: 1;
    }

    .page-hero > div {
        padding: 52px 0;
    }

    .detail-copy {
        padding: 22px;
    }

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

    .footer-grid {
        width: min(100% - 22px, 1180px);
    }
}
