:root {
    --blue-900: #1e3a8a;
    --blue-800: #1e40af;
    --blue-700: #1d4ed8;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --indigo-50: #eef2ff;
    --green-50: #ecfdf5;
    --orange-50: #fff7ed;
    --red-50: #fef2f2;
    --gray-950: #030712;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--gray-900);
    background: #f8fafc;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--blue-600), var(--blue-800), var(--blue-900));
    box-shadow: 0 10px 28px rgba(30, 64, 175, 0.28);
}

.header-inner {
    max-width: 1240px;
    height: 68px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-weight: 700;
}

.nav-link {
    opacity: 0.88;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    opacity: 1;
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px 16px;
}

.mobile-nav a {
    display: block;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

.hero {
    position: relative;
    height: min(76vh, 760px);
    min-height: 520px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1d4ed8 52%, #60a5fa);
}

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

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

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

.hero-slide img.is-missing {
    opacity: 0;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 18%, rgba(59, 130, 246, 0.52), transparent 28%),
        linear-gradient(90deg, rgba(3, 7, 18, 0.92) 0%, rgba(15, 23, 42, 0.72) 43%, rgba(15, 23, 42, 0.18) 100%),
        linear-gradient(0deg, rgba(3, 7, 18, 0.88), transparent 60%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px 72px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: var(--white);
}

.hero-kicker {
    display: inline-flex;
    width: fit-content;
    padding: 8px 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    max-width: 780px;
    margin: 0 0 18px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 26px;
    font-size: clamp(17px, 2vw, 22px);
    color: rgba(255, 255, 255, 0.88);
}

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

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

.primary-button {
    color: var(--white);
    background: var(--blue-600);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.32);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
}

.ghost-button {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.42);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-2px);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

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

.search-band,
.content-section,
.page-main,
.filter-bar {
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.search-band {
    margin-top: -42px;
    position: relative;
    z-index: 4;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 420px);
    gap: 22px;
    align-items: center;
    padding: 22px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.search-panel strong {
    display: block;
    font-size: 22px;
    margin-bottom: 4px;
}

.search-panel p {
    margin: 0;
    color: var(--gray-600);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border-radius: 14px;
    background: var(--gray-100);
    border: 1px solid transparent;
}

.search-box:focus-within {
    border-color: rgba(37, 99, 235, 0.5);
    background: var(--white);
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.category-chips a,
.filter-buttons button {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    background: var(--white);
    color: var(--blue-700);
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    cursor: pointer;
}

.filter-buttons button.is-active,
.category-chips a:hover {
    color: var(--white);
    background: var(--blue-600);
}

.content-section {
    padding-top: 58px;
    padding-bottom: 28px;
}

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

.section-heading span {
    display: block;
    color: var(--blue-600);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 12px;
}

.section-heading h2 {
    margin: 4px 0 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.1;
}

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

.section-more {
    white-space: nowrap;
    color: var(--blue-700);
    font-weight: 900;
}

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

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

.movie-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(220px, 1fr));
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.16);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--blue-800), #0f172a);
}

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

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

.movie-cover img.is-missing,
.detail-side img.is-missing,
.row-cover img.is-missing {
    opacity: 0;
}

.movie-cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 55%);
}

.play-mark {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-700);
    background: rgba(255, 255, 255, 0.88);
    opacity: 0;
    transform: scale(0.88);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-mark,
.movie-row-card:hover .play-mark {
    opacity: 1;
    transform: scale(1);
}

.duration-pill {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 4px 8px;
    border-radius: 7px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.72);
    font-size: 12px;
    font-weight: 800;
}

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

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.32;
}

.movie-card h3 a:hover {
    color: var(--blue-700);
}

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

.movie-tags,
.row-meta,
.detail-meta,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-tags span,
.detail-tags span {
    border-radius: 999px;
    padding: 5px 8px;
    background: #dbeafe;
    color: var(--blue-700);
    font-size: 12px;
    font-weight: 800;
}

.soft-green {
    max-width: none;
    margin-top: 36px;
    padding-left: max(20px, calc((100vw - 1240px) / 2 + 20px));
    padding-right: max(20px, calc((100vw - 1240px) / 2 + 20px));
    background: linear-gradient(90deg, #f0fdf4, #ecfeff);
}

.warm-rank {
    max-width: none;
    padding-left: max(20px, calc((100vw - 1240px) / 2 + 20px));
    padding-right: max(20px, calc((100vw - 1240px) / 2 + 20px));
    background: linear-gradient(90deg, var(--red-50), var(--orange-50), #fefce8);
}

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

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

.category-card {
    min-height: 148px;
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: var(--white);
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.25), transparent 38%),
        linear-gradient(135deg, var(--blue-700), #7c3aed);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.2);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 50px rgba(37, 99, 235, 0.3);
}

.category-card span {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 8px;
}

.category-card strong {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.35);
}

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

.two-column-cards > div,
.rank-list {
    display: grid;
    gap: 18px;
}

.movie-row-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 16px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-row-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.row-cover {
    position: relative;
    min-height: 118px;
    background: linear-gradient(135deg, #111827, var(--blue-800));
    overflow: hidden;
}

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

.row-body {
    padding: 16px 16px 16px 0;
}

.row-title {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 900;
}

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

.row-body p {
    margin: 0 0 10px;
    color: var(--gray-600);
    font-size: 14px;
}

.row-meta span,
.detail-meta span {
    color: var(--gray-500);
    font-size: 13px;
}

.page-main {
    padding-top: 32px;
    padding-bottom: 44px;
}

.page-hero {
    border-radius: 30px;
    padding: 56px;
    color: var(--white);
    background:
        radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.23), transparent 24%),
        linear-gradient(135deg, var(--blue-700), #6d28d9);
    box-shadow: var(--shadow);
}

.compact-hero {
    min-height: 240px;
}

.rank-hero {
    background:
        radial-gradient(circle at 80% 24%, rgba(255, 255, 255, 0.28), transparent 24%),
        linear-gradient(135deg, #991b1b, #f97316);
}

.page-hero span {
    display: block;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.72);
}

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

.page-hero p {
    max-width: 720px;
    margin: 0;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.84);
}

.filter-bar {
    padding-top: 28px;
    display: grid;
    gap: 14px;
}

.wide-search {
    background: var(--white);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.library-section {
    padding-top: 28px;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
}

.detail-main,
.detail-side,
.detail-panel {
    min-width: 0;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: var(--gray-950);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.24);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--white);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.22));
    cursor: pointer;
}

.player-overlay[hidden] {
    display: none;
}

.play-circle {
    width: 76px;
    height: 76px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-700);
    background: rgba(255, 255, 255, 0.92);
    font-size: 34px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.26);
}

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

.detail-panel h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.12;
}

.detail-panel h2 {
    margin: 28px 0 12px;
    font-size: 24px;
}

.detail-panel p {
    color: var(--gray-700);
    font-size: 16px;
}

.lead-text {
    padding: 16px;
    border-radius: 16px;
    background: var(--gray-100);
    font-weight: 700;
}

.review-text {
    padding: 20px;
    border-left: 4px solid var(--blue-600);
    border-radius: 14px;
    background: #eff6ff;
}

.detail-meta {
    margin-bottom: 14px;
}

.detail-side {
    position: sticky;
    top: 92px;
    align-self: start;
}

.detail-side img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--gray-900), var(--blue-800));
    box-shadow: var(--shadow);
}

.side-card {
    margin-top: 16px;
    padding: 18px;
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow);
    display: grid;
    gap: 8px;
}

.side-card strong {
    font-size: 20px;
}

.side-card span {
    color: var(--gray-600);
}

.side-card a {
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--white);
    text-align: center;
    font-weight: 900;
    background: var(--blue-600);
}

.related-section {
    padding-left: 0;
    padding-right: 0;
}

.site-footer {
    margin-top: 40px;
    color: var(--gray-300);
    background: var(--gray-900);
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 44px 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 28px;
}

.footer-inner strong {
    display: block;
    margin-bottom: 12px;
    color: var(--white);
    font-size: 18px;
}

.footer-inner p {
    margin: 0;
    max-width: 520px;
    color: var(--gray-300);
}

.footer-inner a {
    display: block;
    margin-bottom: 8px;
    color: var(--gray-300);
}

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

.copyright {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    color: var(--gray-500);
    font-size: 14px;
}

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

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

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

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

    .detail-side {
        position: static;
    }
}

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

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

    .hero {
        min-height: 560px;
    }

    .hero-arrow {
        display: none;
    }

    .search-panel,
    .two-column-cards,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

    .page-hero {
        padding: 36px 26px;
    }
}

@media (max-width: 560px) {
    .brand span:last-child {
        font-size: 18px;
    }

    .hero-content {
        padding-bottom: 64px;
    }

    .movie-grid,
    .rank-grid,
    .dense-grid,
    .category-grid,
    .category-grid-large {
        grid-template-columns: 1fr;
    }

    .movie-row-card {
        grid-template-columns: 132px 1fr;
    }

    .row-body {
        padding: 12px 12px 12px 0;
    }

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