:root {
    color-scheme: light;
    --blue-700: #1d4ed8;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --indigo-700: #4338ca;
    --red-600: #dc2626;
    --orange-500: #f97316;
    --gray-950: #0f172a;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.14);
    --shadow-card: 0 10px 26px rgba(15, 23, 42, 0.10);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.narrow {
    width: min(900px, calc(100% - 32px));
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--blue-600), var(--blue-700));
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

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

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--blue-700);
    background: var(--white);
    box-shadow: 0 6px 16px rgba(255, 255, 255, 0.22);
}

.brand-text {
    font-size: 20px;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.nav-link,
.nav-drop-button {
    padding: 8px 0;
    border: 0;
    color: var(--white);
    background: transparent;
    cursor: pointer;
    font-weight: 700;
    opacity: 0.92;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-drop-button:hover {
    opacity: 1;
    color: #dbeafe;
}

.nav-dropdown {
    position: relative;
}

.nav-drop-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 190px;
    padding: 10px;
    border-radius: 16px;
    color: var(--gray-800);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-drop-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-drop-menu a {
    display: block;
    padding: 9px 12px;
    border-radius: 10px;
}

.nav-drop-menu a:hover {
    color: var(--blue-700);
    background: #eff6ff;
}

.top-search {
    position: relative;
    display: flex;
    width: min(330px, 28vw);
    margin-left: 10px;
}

.top-search input,
.mobile-search input,
.search-page-form input,
.inline-filter input {
    width: 100%;
    border: 0;
    outline: 0;
    border-radius: 999px;
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

.top-search input,
.mobile-search input {
    padding: 10px 86px 10px 16px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.top-search input::placeholder,
.mobile-search input::placeholder {
    color: #dbeafe;
}

.top-search button,
.mobile-search button,
.search-page-form button {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
}

.top-search button,
.mobile-search button {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 5px 12px;
    color: var(--blue-700);
    background: var(--white);
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 8px 11px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-panel.open {
    display: block;
}

.mobile-panel nav {
    display: grid;
    gap: 6px;
    margin-top: 12px;
}

.hero {
    position: relative;
    height: 560px;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(180deg, var(--gray-900), var(--gray-800));
}

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

.hero-slide.active {
    opacity: 1;
}

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.54) 48%, rgba(0, 0, 0, 0.20));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 52px;
    transform: translateX(-50%);
}

.hero-badge,
.eyebrow {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-badge {
    padding: 8px 16px;
    margin-bottom: 16px;
    background: var(--red-600);
}

.eyebrow {
    margin-bottom: 8px;
    color: var(--blue-600);
}

.section-title.light .eyebrow {
    color: rgba(255, 255, 255, 0.82);
}

.hero h1 {
    max-width: 840px;
    margin: 0 0 14px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.08;
    text-shadow: 0 10px 26px rgba(0, 0, 0, 0.38);
}

.hero p {
    max-width: 760px;
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: 19px;
}

.hero-tags,
.movie-meta,
.pill-row,
.detail-meta,
.detail-tags,
.tag-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags a,
.hero-tags span,
.pill-row a,
.pill-row span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags a,
.hero-tags span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

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

.primary-button,
.ghost-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    padding: 12px 22px;
    color: var(--white);
    background: var(--blue-600);
    box-shadow: 0 12px 22px rgba(37, 99, 235, 0.28);
}

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

.primary-button.wide {
    width: 100%;
}

.ghost-button {
    padding: 12px 22px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

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

.hero-dots {
    position: absolute;
    right: max(32px, calc((100vw - 1200px) / 2));
    bottom: 42px;
    display: flex;
    gap: 9px;
}

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

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

.hot-rail {
    padding: 48px 0;
    color: var(--white);
    background: linear-gradient(90deg, var(--orange-500), var(--red-600));
}

.section-block {
    padding: 56px 0;
    background: var(--white);
}

.section-block.muted {
    background: var(--gray-50);
}

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

.section-title.slim {
    align-items: center;
}

.section-title h2,
.page-hero h1,
.detail-card h1 {
    margin: 0;
    line-height: 1.16;
}

.section-title h2 {
    font-size: clamp(24px, 3vw, 34px);
}

.section-title.light h2 {
    color: var(--white);
}

.section-link {
    padding: 9px 15px;
    color: var(--blue-700);
    background: #eff6ff;
}

.section-link:hover {
    background: #dbeafe;
    transform: translateY(-2px);
}

.rail-controls {
    display: flex;
    gap: 10px;
}

.rail-controls button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
}

.movie-rail {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 4px 2px 18px;
}

.movie-rail::-webkit-scrollbar {
    display: none;
}

.rail-item {
    flex: 0 0 280px;
}

.movie-grid,
.compact-grid {
    display: grid;
    gap: 22px;
}

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

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

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

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.25;
    overflow: hidden;
    background: var(--gray-200);
}

.movie-poster img,
.detail-side img,
.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-poster img {
    transition: transform 0.35s ease;
}

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 55%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(37, 99, 235, 0.92);
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: all 0.2s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.movie-info {
    padding: 14px;
}

.movie-title {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    color: var(--gray-900);
    font-size: 16px;
    font-weight: 850;
    line-height: 1.38;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-title:hover {
    color: var(--blue-700);
}

.movie-meta {
    margin-top: 9px;
    color: var(--gray-500);
    font-size: 13px;
}

.movie-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: #cbd5e1;
}

.movie-info p {
    display: -webkit-box;
    min-height: 44px;
    margin: 10px 0 0;
    overflow: hidden;
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span,
.detail-tags span {
    color: var(--blue-700);
    background: #eff6ff;
}

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

.category-tile,
.category-overview-card {
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.category-tile > a,
.category-overview-head {
    display: block;
    padding: 22px;
    background: linear-gradient(135deg, #eff6ff, #ffffff 56%, #fff7ed);
}

.category-tile span,
.category-overview-head h2 {
    display: block;
    margin: 0 0 8px;
    color: var(--gray-900);
    font-size: 20px;
    font-weight: 900;
}

.category-tile p,
.category-overview-head p {
    margin: 0;
    color: var(--gray-600);
}

.category-samples,
.category-overview-links {
    display: grid;
    gap: 8px;
    padding: 16px 22px 22px;
}

.category-samples a,
.category-overview-links a {
    color: var(--gray-700);
    font-size: 14px;
}

.category-samples a:hover,
.category-overview-links a:hover {
    color: var(--blue-700);
}

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

.rank-panel {
    position: sticky;
    top: 88px;
    border-radius: var(--radius-lg);
    padding: 22px;
    background: var(--white);
    box-shadow: var(--shadow-card);
}

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

.rank-list.small {
    gap: 12px;
}

.rank-item {
    display: grid;
    grid-template-columns: 44px 76px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 13px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.06);
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange-500), var(--red-600));
    font-weight: 900;
}

.rank-thumb {
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    overflow: hidden;
    background: var(--gray-200);
}

.rank-title {
    display: -webkit-box;
    overflow: hidden;
    font-weight: 900;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.rank-title:hover {
    color: var(--blue-700);
}

.rank-body p {
    display: -webkit-box;
    margin: 6px 0 0;
    overflow: hidden;
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.page-hero {
    padding: 64px 0 56px;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-600), var(--indigo-700));
}

.page-hero h1 {
    max-width: 820px;
    font-size: clamp(32px, 5vw, 52px);
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: #e0e7ff;
    font-size: 18px;
}

.category-head {
    background: linear-gradient(135deg, #1d4ed8, #0f172a);
}

.ranking-head {
    background: linear-gradient(135deg, #f97316, #dc2626);
}

.search-head {
    background: linear-gradient(135deg, #0f172a, #2563eb);
}

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

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

.inline-filter {
    width: min(360px, 100%);
}

.inline-filter input,
.search-page-form input {
    padding: 13px 18px;
    background: var(--gray-100);
    box-shadow: inset 0 0 0 1px var(--gray-200);
}

.inline-filter input:focus,
.search-page-form input:focus {
    background: var(--white);
    box-shadow: inset 0 0 0 2px var(--blue-500);
}

.search-page-form {
    display: flex;
    gap: 12px;
    max-width: 680px;
    margin-top: 26px;
}

.search-page-form button {
    padding: 0 24px;
    color: var(--blue-700);
    background: var(--white);
}

.empty-state {
    display: none;
    padding: 44px 20px;
    text-align: center;
    color: var(--gray-600);
    border-radius: var(--radius-md);
    background: var(--gray-100);
}

.empty-state.show {
    display: block;
}

.detail-shell {
    padding: 26px 0 56px;
    background: linear-gradient(180deg, #0f172a 0, #111827 460px, var(--gray-50) 460px);
}

.detail-breadcrumb {
    margin: 12px 0 22px;
}

.player-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 24px;
    align-items: start;
}

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

.movie-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: #000000;
    z-index: 2;
}

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

.player-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.24));
}

.player-button {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    color: var(--white);
    background: var(--blue-600);
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.38);
    font-size: 34px;
    text-indent: 5px;
}

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

.detail-side {
    display: grid;
    gap: 16px;
}

.detail-side img {
    aspect-ratio: 3 / 4.25;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    background: var(--gray-200);
}

.detail-card {
    margin-top: 24px;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.detail-card h1 {
    margin-top: 12px;
    color: var(--gray-900);
    font-size: clamp(28px, 4vw, 44px);
}

.detail-one-line {
    margin: 12px 0 0;
    color: var(--gray-600);
    font-size: 18px;
}

.pill-row a,
.pill-row span {
    color: var(--blue-700);
    background: #eff6ff;
}

.detail-meta {
    gap: 12px;
    margin: 22px 0;
    padding: 18px 0;
    color: var(--gray-600);
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

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

.detail-card section {
    margin-top: 28px;
}

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

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

.site-footer {
    color: #d1d5db;
    background: var(--gray-900);
}

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

.footer-brand {
    color: var(--white);
    font-size: 21px;
}

.site-footer p {
    max-width: 460px;
    margin: 12px 0 0;
    color: #a5b4fc;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: var(--white);
}

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

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

.footer-bottom {
    padding: 16px;
    text-align: center;
    color: #9ca3af;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

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

    .two-column {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }
}

@media (max-width: 860px) {
    .main-nav,
    .top-search {
        display: none;
    }

    .mobile-toggle {
        display: inline-flex;
    }

    .hero {
        height: 520px;
    }

    .hero-content {
        bottom: 78px;
    }

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

    .hero-dots {
        left: 16px;
        right: auto;
        bottom: 36px;
    }

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

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

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

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

    .detail-side {
        display: none;
    }

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

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

    .header-inner {
        min-height: 58px;
    }

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

    .hero {
        height: 500px;
    }

    .hero-content {
        bottom: 70px;
    }

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

    .hero-actions,
    .search-page-form {
        flex-direction: column;
    }

    .search-page-form button {
        min-height: 46px;
    }

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

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

    .movie-info {
        padding: 12px;
    }

    .movie-title {
        font-size: 15px;
    }

    .rank-item {
        grid-template-columns: 36px 64px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .rank-number {
        width: 32px;
        height: 32px;
    }

    .detail-shell {
        padding-top: 18px;
        background: linear-gradient(180deg, #0f172a 0, #111827 320px, var(--gray-50) 320px);
    }

    .detail-card {
        padding: 20px;
    }

    .player-button {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
