:root {
    color-scheme: light;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --blue-700: #1d4ed8;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --emerald-600: #059669;
    --amber-500: #f59e0b;
    --white: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--slate-50);
    color: var(--slate-900);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--slate-200);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(14px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 64px;
}

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

.logo-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--blue-600);
    color: var(--white);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-text strong {
    font-size: 20px;
}

.logo-text small {
    margin-top: 3px;
    color: var(--slate-500);
    font-size: 11px;
    letter-spacing: 0.08em;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.desktop-nav a {
    color: var(--slate-700);
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.desktop-nav a:hover {
    color: var(--blue-600);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.inline-filter input,
.mobile-nav input {
    width: 240px;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    background: var(--slate-100);
    padding: 10px 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search input:focus,
.inline-filter input:focus,
.mobile-nav input:focus {
    border-color: var(--blue-500);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.top-search button,
.inline-filter button,
.mobile-nav button {
    border: 0;
    border-radius: 12px;
    background: var(--blue-600);
    color: var(--white);
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.top-search button:hover,
.inline-filter button:hover,
.mobile-nav button:hover {
    background: var(--blue-700);
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    border: 0;
    border-radius: 12px;
    background: var(--slate-100);
    color: var(--slate-700);
    width: 42px;
    height: 42px;
    font-size: 22px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 16px 24px 24px;
    border-top: 1px solid var(--slate-200);
    background: var(--white);
}

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

.mobile-nav a {
    font-weight: 700;
    color: var(--slate-700);
}

.mobile-nav form {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.mobile-nav input {
    width: 100%;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: var(--slate-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.62) 48%, rgba(15, 23, 42, 0.18) 100%), linear-gradient(0deg, var(--slate-900) 0%, rgba(15, 23, 42, 0.04) 42%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 22px;
    color: var(--white);
}

.hero-content h1,
.hero-content h2 {
    max-width: 780px;
    margin: 0;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    margin: 0;
    color: var(--slate-200);
    font-size: 19px;
    line-height: 1.8;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #bfdbfe;
    padding: 8px 13px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow.dark {
    background: rgba(37, 99, 235, 0.10);
    color: var(--blue-700);
}

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

.btn-primary,
.btn-ghost,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 12px;
    padding: 0 20px;
    font-weight: 800;
}

.btn-primary {
    background: var(--blue-600);
    color: var(--white);
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.28);
}

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

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.10);
    color: var(--white);
    backdrop-filter: blur(10px);
}

.hero-actions span {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.10);
    color: var(--slate-100);
    padding: 12px 15px;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

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

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

.hero-dots button.is-active {
    width: 34px;
    background: var(--white);
}

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

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

.section-block.soft,
.page-main {
    background: var(--slate-50);
}

.section-block.gradient {
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 62%, #ecfeff 100%);
}

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

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

.section-head h2 {
    margin: 10px 0 8px;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-head p {
    max-width: 760px;
    margin: 0;
    color: var(--slate-600);
    line-height: 1.8;
}

.section-head.inverted p {
    color: var(--slate-300);
}

.section-more {
    border: 1px solid var(--slate-200);
    color: var(--blue-700);
    background: var(--white);
    white-space: nowrap;
}

.section-more.light {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.10);
    color: var(--white);
}

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

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

.movie-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    border-color: var(--slate-300);
    box-shadow: var(--shadow);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--slate-900);
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.68) 0%, rgba(15, 23, 42, 0.02) 55%);
}

.movie-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.92);
    color: var(--white);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

.movie-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.movie-meta {
    color: var(--blue-700);
    font-size: 12px;
    font-weight: 800;
}

.movie-info strong {
    color: var(--slate-900);
    font-size: 18px;
    line-height: 1.35;
}

.movie-desc {
    color: var(--slate-600);
    font-size: 14px;
    line-height: 1.7;
}

.movie-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: auto;
}

.movie-tags span,
.detail-tags span {
    border-radius: 999px;
    background: var(--slate-100);
    color: var(--slate-600);
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 700;
}

.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 330px);
    gap: 18px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scrollbar-width: thin;
}

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

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

.large-card .movie-cover {
    aspect-ratio: 16 / 9;
}

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

.category-tile,
.category-panel {
    overflow: hidden;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-panel:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    height: 128px;
    background: var(--slate-900);
    overflow: hidden;
}

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

.category-tile strong,
.category-tile em {
    display: block;
    padding: 0 18px;
}

.category-tile strong {
    padding-top: 18px;
    color: var(--slate-900);
    font-size: 20px;
    font-style: normal;
    font-weight: 900;
}

.category-tile em {
    padding-top: 8px;
    padding-bottom: 18px;
    color: var(--slate-600);
    font-size: 14px;
    font-style: normal;
    line-height: 1.7;
}

.page-hero {
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 32%), linear-gradient(135deg, var(--slate-950), var(--slate-800));
    color: var(--white);
    padding: 78px 0 72px;
}

.page-hero h1 {
    max-width: 850px;
    margin: 16px 0;
    font-size: clamp(36px, 6vw, 60px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--slate-200);
    line-height: 1.8;
    font-size: 18px;
}

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

.breadcrumb a {
    color: #bfdbfe;
}

.inline-filter {
    display: flex;
    gap: 10px;
    width: min(100%, 620px);
    margin-top: 28px;
}

.inline-filter input {
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
}

.category-full-grid {
    padding-bottom: 24px;
}

.category-panel {
    padding: 18px;
}

.category-panel-head {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.category-panel-head span {
    color: var(--slate-900);
    font-size: 22px;
    font-weight: 900;
}

.category-panel-head small {
    color: var(--slate-600);
    line-height: 1.7;
}

.mini-card-list,
.ranking-list {
    display: grid;
    gap: 12px;
}

.rank-row {
    display: grid;
    grid-template-columns: auto 96px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(226, 232, 240, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    padding: 12px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.10);
}

.light-list .rank-row,
.mini-card-list .rank-row {
    border-color: var(--slate-200);
    background: var(--white);
}

.rank-row img {
    width: 96px;
    height: 62px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--slate-900);
}

.rank-row span:not(.rank-num) {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.rank-row strong {
    overflow: hidden;
    color: inherit;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-row em,
.rank-row small {
    overflow: hidden;
    color: var(--slate-500);
    font-size: 13px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark-section .rank-row em,
.dark-section .rank-row small {
    color: var(--slate-300);
}

.rank-num {
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--blue-600);
    color: var(--white);
    font-weight: 900;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    background: var(--slate-900);
    color: var(--white);
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--detail-bg);
    background-size: cover;
    background-position: center;
    filter: blur(16px);
    transform: scale(1.08);
    opacity: 0.34;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.74));
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    padding: 46px 0 54px;
}

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

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.28);
}

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

.detail-copy h1 {
    margin: 18px 0 16px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.detail-copy p {
    max-width: 800px;
    margin: 0 0 20px;
    color: var(--slate-200);
    font-size: 18px;
    line-height: 1.8;
}

.detail-tags span {
    background: rgba(255, 255, 255, 0.12);
    color: var(--slate-100);
}

.player-section {
    margin-top: -28px;
    position: relative;
    z-index: 2;
}

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

.player-box video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    object-fit: contain;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.14), rgba(15, 23, 42, 0.78));
    color: var(--white);
    cursor: pointer;
}

.player-start span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: var(--blue-600);
    font-size: 34px;
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.34);
}

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

.player-box.is-playing .player-start {
    display: none;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 26px;
    padding: 46px 0 64px;
}

.detail-article,
.detail-side {
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    background: var(--white);
    padding: 26px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 16px;
    color: var(--slate-900);
    font-size: 24px;
    font-weight: 900;
}

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

.detail-article p {
    margin: 0;
    color: var(--slate-700);
    font-size: 16px;
    line-height: 2;
}

.detail-side ul {
    display: grid;
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.detail-side li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--slate-100);
    padding-bottom: 12px;
}

.detail-side strong {
    color: var(--slate-500);
}

.detail-side span {
    color: var(--slate-900);
    font-weight: 800;
    text-align: right;
}

.related-section {
    padding-top: 58px;
}

.site-footer {
    background: var(--slate-900);
    color: var(--slate-300);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 36px;
    padding: 46px 0;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 16px;
}

.site-footer p {
    max-width: 560px;
    line-height: 1.8;
}

.site-footer a {
    display: inline-flex;
    margin: 0 12px 10px 0;
    color: var(--slate-300);
}

.footer-logo {
    color: var(--white);
    font-size: 22px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 24px;
    text-align: center;
    color: var(--slate-500);
    font-size: 14px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
}

[data-card].is-hidden,
.search-fallback-head.is-hidden,
[data-search-fallback].is-hidden {
    display: none;
}

#searchResults:empty {
    display: none;
}

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

    .menu-button {
        display: inline-grid;
        place-items: center;
    }

    .header-inner {
        justify-content: space-between;
    }
}

@media (max-width: 920px) {
    .top-search {
        display: none;
    }

    .hero {
        height: 560px;
    }

    .section-head,
    .detail-grid,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .movie-grid,
    .movie-grid.compact,
    .featured-layout,
    .category-grid,
    .category-panels {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .detail-grid {
        display: grid;
    }

    .detail-poster {
        width: min(260px, 100%);
    }
}

@media (max-width: 640px) {
    .header-inner {
        min-height: 60px;
    }

    .logo-text small {
        display: none;
    }

    .hero {
        height: 520px;
    }

    .hero-content {
        justify-content: flex-end;
        padding-bottom: 78px;
    }

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

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
        max-width: 320px;
    }

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

    .movie-grid,
    .movie-grid.compact,
    .featured-layout,
    .category-grid,
    .category-panels {
        grid-template-columns: 1fr;
    }

    .inline-filter,
    .mobile-nav form {
        flex-direction: column;
    }

    .rank-row {
        grid-template-columns: auto 78px minmax(0, 1fr);
    }

    .rank-row img {
        width: 78px;
        height: 54px;
    }

    .detail-hero-inner {
        padding-top: 30px;
    }

    .detail-grid {
        gap: 24px;
    }

    .detail-content {
        padding-top: 34px;
    }

    .player-start span {
        width: 68px;
        height: 68px;
    }
}
