:root {
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --secondary-50: #fff7ed;
    --secondary-100: #ffedd5;
    --secondary-600: #ea580c;
    --secondary-700: #c2410c;
    --accent-500: #eab308;
    --dark-50: #f8fafc;
    --dark-100: #f1f5f9;
    --dark-300: #cbd5e1;
    --dark-400: #94a3b8;
    --dark-500: #64748b;
    --dark-600: #475569;
    --dark-700: #334155;
    --dark-800: #1e293b;
    --dark-900: #0f172a;
    --shadow-soft: 0 2px 15px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.10);
    --shadow-hard: 0 18px 50px rgba(15, 23, 42, 0.24);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #f9fafb;
    color: var(--dark-800);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.section-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--primary-600), var(--secondary-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #fff;
    font-size: 14px;
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
    box-shadow: 0 12px 22px rgba(37, 99, 235, 0.24);
}

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

.nav-link {
    color: var(--dark-700);
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--primary-600);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--dark-100);
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: var(--dark-700);
}

.mobile-panel {
    display: none;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    padding: 10px 16px 16px;
}

.mobile-panel.is-open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    display: block;
    padding: 11px 14px;
    border-radius: 12px;
    color: var(--dark-700);
    font-weight: 600;
}

.mobile-link:hover,
.mobile-link.is-active {
    background: var(--primary-50);
    color: var(--primary-600);
}

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

.hero-slides,
.hero-slide,
.hero-shade {
    position: absolute;
    inset: 0;
}

.hero-slide {
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    background-position: center;
    background-size: cover;
    transition: opacity 0.8s ease, transform 1.2s ease;
    transform: scale(1.03);
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-shade {
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.68) 45%, rgba(15, 23, 42, 0.30) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.10) 45%, rgba(15, 23, 42, 0.30) 100%);
}

.hero-content {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, 100%);
    color: #fff;
}

.hero-kicker,
.page-hero span,
.section-heading span,
.home-search-panel span,
.list-toolbar span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--secondary-600);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.hero h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero h2 + p,
.hero h1 + h2 {
    margin-top: 14px;
}

.hero h1 + h2 {
    font-size: clamp(30px, 4vw, 50px);
    color: #dbeafe;
}

.hero p {
    width: min(620px, 100%);
    margin: 22px 0 0;
    color: #e5e7eb;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 12px;
    border: 0;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #fff;
    background: var(--primary-600);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

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

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(12px);
}

.btn.full {
    width: 100%;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    background: rgba(0, 0, 0, 0.46);
    transition: background 0.2s ease, transform 0.2s ease;
}

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

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

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

.hero-dot {
    width: 18px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    transition: width 0.25s ease, background 0.25s ease;
}

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

.hero-side {
    position: absolute;
    right: calc((100vw - min(1280px, 100vw)) / 2 + 16px);
    bottom: 86px;
    z-index: 4;
    width: 320px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow-hard);
    backdrop-filter: blur(16px);
}

.hero-side strong {
    display: block;
    margin-bottom: 14px;
    color: #fff;
    font-size: 18px;
}

.hero-mini-list {
    display: grid;
    gap: 10px;
}

.mini-card {
    display: grid;
    grid-template-columns: 54px 1fr;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-weight: 700;
}

.mini-card img {
    width: 54px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
}

.home-search-panel,
.filter-panel,
.list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.home-search-panel {
    margin-top: -42px;
    position: relative;
    z-index: 5;
    padding-top: 24px;
    padding-bottom: 24px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-hard);
}

.home-search-panel h2,
.list-toolbar h2 {
    margin: 0;
    color: var(--dark-900);
    font-size: clamp(24px, 3vw, 34px);
}

.search-box {
    position: relative;
    display: block;
    width: min(460px, 100%);
}

.search-box input {
    width: 100%;
    height: 52px;
    padding: 0 52px 0 18px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    outline: 0;
    background: #fff;
    color: var(--dark-800);
    box-shadow: var(--shadow-soft);
}

.search-box input:focus {
    border-color: var(--primary-600);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.search-box span {
    position: absolute;
    top: 50%;
    right: 16px;
    margin: 0;
    padding: 0;
    color: var(--primary-600);
    background: transparent;
    transform: translateY(-50%);
    font-size: 22px;
}

.section-block {
    padding-top: 76px;
    padding-bottom: 18px;
}

.section-heading {
    margin-bottom: 32px;
}

.section-heading.with-actions {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.section-heading h2 {
    margin: 0;
    color: var(--dark-900);
    font-size: clamp(30px, 4vw, 44px);
    letter-spacing: -0.05em;
}

.section-heading p {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--dark-600);
    font-size: 17px;
    line-height: 1.7;
}

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

.category-card {
    min-height: 190px;
    padding: 24px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card span {
    display: inline-flex;
    margin-bottom: 18px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--primary-50);
    color: var(--primary-600);
    font-weight: 800;
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    color: var(--dark-900);
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: var(--dark-600);
    line-height: 1.7;
}

.category-card strong {
    display: inline-flex;
    margin-top: 22px;
    color: var(--secondary-600);
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    height: 258px;
    overflow: hidden;
    background: var(--dark-900);
}

.movie-card.compact .poster-link {
    height: 218px;
}

.feature-card .poster-link {
    height: 360px;
}

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

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.05) 52%, rgba(0, 0, 0, 0.08));
}

.badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    padding: 6px 9px;
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.badge-region {
    left: 12px;
    background: var(--primary-600);
}

.badge-type {
    right: 12px;
    background: var(--secondary-600);
}

.card-play {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 999px;
    background: var(--primary-600);
    color: #fff;
    font-size: 22px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card h3 {
    margin: 0 0 8px;
    color: var(--dark-900);
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--primary-600);
}

.movie-meta,
.movie-line {
    margin: 0;
    color: var(--dark-500);
    font-size: 14px;
    line-height: 1.6;
}

.movie-line {
    display: -webkit-box;
    min-height: 44px;
    margin-top: 10px;
    overflow: hidden;
    color: var(--dark-600);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--primary-100);
    color: var(--primary-700);
    font-size: 12px;
    font-weight: 700;
}

.wide-section {
    margin-top: 72px;
    padding: 72px 0;
    background: linear-gradient(180deg, var(--secondary-50), #fff);
}

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

.rail-actions button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: var(--dark-700);
    box-shadow: var(--shadow-soft);
    font-size: 26px;
}

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

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

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

.preview-stack {
    display: grid;
    gap: 40px;
}

.preview-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.preview-title h3 {
    margin: 0;
    color: var(--dark-900);
    font-size: 26px;
}

.preview-title a {
    color: var(--primary-600);
    font-weight: 800;
}

.ranking-section {
    margin-top: 78px;
    padding: 78px 0;
    background: linear-gradient(180deg, var(--primary-50), #fff);
}

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

.ranking-list {
    display: grid;
    gap: 12px;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
}

.ranking-list li a {
    display: grid;
    grid-template-columns: 46px 62px 1fr;
    align-items: center;
    gap: 14px;
    min-height: 78px;
    padding: 10px 14px;
    border-radius: 15px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-list li a:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-medium);
}

.rank-number {
    color: var(--secondary-600);
    font-weight: 900;
    font-size: 24px;
}

.ranking-list img {
    width: 62px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-text strong,
.rank-text em {
    display: block;
}

.rank-text strong {
    color: var(--dark-900);
    font-size: 16px;
}

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

.ranking-feature {
    position: sticky;
    top: 92px;
}

.seo-text {
    margin-top: 64px;
    margin-bottom: 28px;
    padding: 34px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.seo-text h2 {
    margin: 0 0 14px;
    color: var(--dark-900);
    font-size: 30px;
}

.seo-text p {
    margin: 12px 0 0;
    color: var(--dark-600);
    line-height: 1.8;
}

.page-hero {
    padding: 74px 0;
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(234, 88, 12, 0.38), transparent 34%),
        linear-gradient(135deg, var(--primary-600), var(--dark-900));
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(38px, 5vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.7;
}

.small-actions {
    margin-top: 24px;
}

.list-toolbar {
    margin-bottom: 28px;
}

.compact-search {
    width: min(360px, 100%);
}

.filter-panel {
    align-items: stretch;
    margin-bottom: 28px;
    padding: 20px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.large-search {
    flex: 1;
    width: auto;
}

.filter-panel select {
    min-width: 180px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    padding: 0 14px;
    color: var(--dark-700);
    background: #fff;
    outline: 0;
}

.detail-page {
    padding-top: 30px;
}

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

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

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

.detail-main {
    display: grid;
    gap: 24px;
}

.player-card,
.card {
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.player-card {
    overflow: hidden;
}

.player-shell {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.72));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: var(--primary-600);
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.3);
    font-size: 30px;
}

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

.detail-info {
    padding: 28px;
}

.detail-info h1 {
    margin: 0 0 14px;
    color: var(--dark-900);
    font-size: clamp(30px, 4vw, 46px);
    letter-spacing: -0.05em;
}

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

.detail-info p {
    margin: 0;
    color: var(--dark-700);
    line-height: 1.9;
    font-size: 16px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.detail-meta span {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--secondary-50);
    color: var(--secondary-700);
    font-size: 13px;
    font-weight: 800;
}

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

.poster-card {
    overflow: hidden;
    padding-bottom: 20px;
}

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

.poster-card h2,
.poster-card p,
.poster-card .btn {
    margin-left: 20px;
    margin-right: 20px;
}

.poster-card h2 {
    margin-top: 18px;
    margin-bottom: 10px;
    color: var(--dark-900);
    font-size: 24px;
}

.poster-card p {
    color: var(--dark-600);
    line-height: 1.7;
}

.site-footer {
    margin-top: 86px;
    background: var(--dark-900);
    color: var(--dark-100);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 34px;
    padding-top: 48px;
    padding-bottom: 38px;
}

.footer-brand {
    font-size: 22px;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 18px;
}

.site-footer p,
.site-footer a {
    color: var(--dark-300);
    line-height: 1.8;
}

.site-footer a:hover {
    color: #fff;
}

.site-footer ul {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

[data-movie-card].is-hidden {
    display: none;
}

@media (max-width: 1100px) {
    .desktop-nav {
        gap: 18px;
    }

    .hero-side {
        display: none;
    }

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

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

    .detail-side,
    .ranking-feature {
        position: static;
    }
}

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

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

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

    .hero-arrow {
        display: none;
    }

    .home-search-panel,
    .filter-panel,
    .list-toolbar,
    .section-heading.with-actions {
        align-items: stretch;
        flex-direction: column;
    }

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

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

@media (max-width: 560px) {
    .section-container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .brand {
        font-size: 20px;
    }

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

    .hero-copy {
        padding-top: 28px;
    }

    .hero-actions,
    .small-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .home-search-panel {
        margin-top: 0;
        border-radius: 0;
    }

    .grid-three,
    .grid-four,
    .category-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .poster-link,
    .movie-card.compact .poster-link {
        height: 300px;
    }

    .rail-item {
        flex-basis: 82vw;
    }

    .detail-info {
        padding: 22px;
    }
}
