:root {
    --blue-900: #1e3a8a;
    --blue-700: #1d4ed8;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --cyan-500: #06b6d4;
    --green-50: #ecfdf5;
    --blue-50: #eff6ff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-xl: 0 22px 55px rgba(15, 23, 42, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

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

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

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

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: var(--blue-600);
    background: var(--white);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.16);
}

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

.brand-mark,
.movie-card,
.poster-link img,
.poster-play,
.primary-btn,
.ghost-btn,
.hero-dot,
.rank-item,
.category-card,
.nav-toggle span,
.mobile-nav {
    transition: all 0.28s ease;
}

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

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

.desktop-nav a,
.mobile-nav a {
    font-size: 15px;
    opacity: 0.94;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: #bfdbfe;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
    width: 300px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(12px);
}

.header-search input {
    min-width: 0;
    flex: 1;
    color: var(--white);
    padding: 10px 14px;
    border: 0;
    outline: 0;
    background: transparent;
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.76);
}

.header-search button {
    color: var(--blue-700);
    font-weight: 700;
    padding: 10px 16px;
    border: 0;
    background: var(--white);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.14);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--white);
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 8px 0 18px;
}

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

.mobile-nav a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
}

.hero {
    position: relative;
    min-height: 600px;
    color: var(--white);
    overflow: hidden;
    background: linear-gradient(135deg, var(--blue-900), var(--blue-700) 48%, var(--cyan-500));
}

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

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

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

.hero-slide.is-active img {
    transform: scale(1);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(30, 64, 175, 0.72), rgba(6, 182, 212, 0.28));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 360px;
    align-items: center;
    gap: 54px;
    min-height: 600px;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 70px 0;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-bottom: 16px;
    color: #dbeafe;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 820px;
    margin: 0 0 18px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.hero h2 {
    margin: 0 0 18px;
    color: #dbeafe;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.18;
}

.hero p {
    max-width: 720px;
    margin: 0 0 28px;
    color: #e0f2fe;
    font-size: clamp(18px, 2vw, 24px);
}

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

.primary-btn,
.ghost-btn,
.soft-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 800;
}

.primary-btn {
    color: var(--blue-700);
    background: var(--white);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.18);
}

.primary-btn:hover {
    transform: translateY(-2px) scale(1.02);
    background: var(--blue-50);
}

.ghost-btn {
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.86);
}

.ghost-btn:hover {
    color: var(--blue-700);
    background: var(--white);
}

.soft-btn {
    color: var(--blue-700);
    background: var(--blue-50);
}

.hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(16px);
}

.hero-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    height: auto;
    object-fit: cover;
    opacity: 1;
}

.hero-card-body {
    position: absolute;
    inset: auto 0 0;
    padding: 22px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0));
}

.hero-card-body strong {
    display: block;
    font-size: 22px;
}

.hero-card-body span {
    color: #bfdbfe;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
}

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

.section {
    padding: 72px 0;
}

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

.section.tint {
    background: linear-gradient(135deg, var(--green-50), var(--blue-50));
}

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

.section-header h2,
.page-hero h1,
.detail-copy h2,
.related h2 {
    margin: 0;
    color: var(--gray-900);
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.2;
}

.section-header p,
.page-hero p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--gray-600);
}

.featured-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    box-shadow: var(--shadow-xl);
}

.featured-track {
    display: flex;
    transition: transform 0.5s ease;
}

.featured-slide {
    min-width: 100%;
    position: relative;
    height: 420px;
    overflow: hidden;
}

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

.featured-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.06));
}

.featured-caption {
    position: absolute;
    z-index: 2;
    left: 32px;
    right: 32px;
    bottom: 30px;
    color: var(--white);
}

.featured-caption h3 {
    margin: 0 0 8px;
    font-size: clamp(24px, 3vw, 40px);
}

.featured-caption p {
    max-width: 720px;
    margin: 0 0 14px;
    color: #e5e7eb;
}

.carousel-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.carousel-tabs button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--gray-300);
}

.carousel-tabs button.is-active {
    width: 34px;
    background: var(--blue-500);
}

.horizontal-scroll {
    overflow-x: auto;
    padding: 4px 0 18px;
    scrollbar-width: thin;
}

.horizontal-row {
    display: flex;
    gap: 24px;
}

.hot-card {
    flex: 0 0 320px;
    overflow: hidden;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

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

.hot-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.hot-card-body {
    padding: 18px;
}

.hot-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.hot-card p {
    margin: 0 0 12px;
    color: var(--gray-600);
}

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

.movie-card {
    overflow: hidden;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

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

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

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

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

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

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

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    color: var(--white);
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
}

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

.type-badge,
.tag,
.meta-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--white);
    padding: 4px 10px;
    background: var(--blue-500);
}

.movie-info {
    padding: 14px;
}

.movie-info h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.movie-info h3 a:hover {
    color: var(--blue-600);
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--gray-500);
    font-size: 12px;
}

.movie-meta span {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 4px 8px;
    overflow: hidden;
    border-radius: 999px;
    white-space: nowrap;
    text-overflow: ellipsis;
    background: var(--gray-100);
}

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

.category-card {
    display: flex;
    flex-direction: column;
    min-height: 240px;
    padding: 24px;
    border-radius: 20px;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-700), var(--cyan-500));
    box-shadow: var(--shadow-md);
}

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

.category-card h3 {
    margin: 0 0 12px;
    font-size: 26px;
}

.category-card p {
    margin: 0 0 20px;
    color: #dbeafe;
}

.category-card span {
    margin-top: auto;
    font-weight: 800;
}

.rank-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 52px 58px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.rank-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-xl);
}

.rank-no {
    color: var(--blue-600);
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.rank-item img {
    width: 58px;
    height: 78px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-text {
    min-width: 0;
}

.rank-text strong,
.rank-text em {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-text strong {
    font-size: 16px;
}

.rank-text em {
    color: var(--gray-500);
    font-size: 13px;
    font-style: normal;
}

.page-hero {
    color: var(--white);
    padding: 64px 0;
    background: linear-gradient(90deg, var(--blue-600), var(--cyan-500));
}

.page-hero h1,
.page-hero p {
    color: var(--white);
}

.filter-panel,
.detail-panel,
.player-panel,
.detail-copy,
.related,
.rank-board,
.search-panel {
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.filter-panel,
.search-panel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 14px;
    padding: 18px;
    margin-bottom: 28px;
}

.filter-panel input,
.filter-panel select,
.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    color: var(--gray-800);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    outline: 0;
    background: var(--gray-50);
}

.filter-panel input:focus,
.filter-panel select:focus,
.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.13);
}

.filter-status {
    grid-column: 1 / -1;
    color: var(--gray-500);
    font-size: 14px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--gray-500);
    font-size: 14px;
    margin: 24px 0;
}

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

.detail-hero {
    padding: 42px 0;
    background: linear-gradient(135deg, var(--blue-900), var(--blue-700) 52%, var(--cyan-500));
}

.detail-panel {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    padding: 28px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(18px);
}

.detail-poster {
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

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

.detail-main h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.1;
}

.detail-main p {
    color: #dbeafe;
    font-size: 18px;
}

.meta-row,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.meta-pill {
    color: #dbeafe;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.14);
}

.tag {
    color: var(--blue-700);
    padding: 6px 10px;
    background: var(--blue-50);
}

.player-panel {
    position: relative;
    overflow: hidden;
    margin: 36px 0;
    background: #020617;
}

.player-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 14px;
    color: var(--white);
    border: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.2));
}

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

.player-overlay span {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 999px;
    font-size: 32px;
    background: rgba(59, 130, 246, 0.92);
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.32);
}

.player-overlay strong {
    font-size: 22px;
}

.detail-copy {
    padding: 28px;
}

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

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

.related {
    padding: 28px;
    margin: 34px 0 64px;
}

.related h2 {
    margin-bottom: 22px;
    font-size: 30px;
}

.next-links {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 24px;
}

.next-links a {
    display: inline-flex;
    max-width: 48%;
    padding: 12px 18px;
    border-radius: 999px;
    color: var(--blue-700);
    font-weight: 800;
    background: var(--blue-50);
}

.next-links a:hover {
    background: #dbeafe;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
    padding: 52px 0;
}

.footer-brand {
    color: var(--white);
    margin-bottom: 16px;
}

.footer-brand .brand-mark {
    color: var(--white);
    background: var(--blue-500);
}

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

.site-footer p {
    margin: 0;
    color: #9ca3af;
}

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

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

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

.empty-state {
    display: none;
    padding: 40px;
    color: var(--gray-500);
    text-align: center;
    border-radius: 18px;
    background: var(--white);
}

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

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

    .desktop-nav {
        gap: 16px;
    }

    .header-search {
        width: 240px;
    }
}

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

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

    .nav-toggle {
        display: block;
    }

    .hero-content,
    .detail-panel,
    .rank-layout {
        grid-template-columns: 1fr;
    }

    .hero-card {
        max-width: 360px;
    }

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

    .category-grid,
    .filter-panel,
    .search-panel,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .container,
    .site-header-inner,
    .mobile-nav,
    .hero-content {
        width: min(100% - 24px, 1280px);
    }

    .hero,
    .hero-content {
        min-height: 680px;
    }

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

    .section {
        padding: 48px 0;
    }

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

    .featured-slide {
        height: 340px;
    }

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

    .category-grid,
    .filter-panel,
    .search-panel,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-panel {
        padding: 18px;
    }

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

    .next-links {
        flex-direction: column;
    }

    .next-links a {
        max-width: 100%;
    }
}

@media (max-width: 420px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }

    .hot-card {
        flex-basis: 280px;
    }
}
