:root {
    color-scheme: light;
    --orange: #f97316;
    --orange-dark: #ea580c;
    --cyan: #06b6d4;
    --blue: #2563eb;
    --red: #ef4444;
    --green: #10b981;
    --yellow: #facc15;
    --text: #1f2937;
    --muted: #6b7280;
    --light: #f8fafc;
    --line: #e5e7eb;
    --dark: #111827;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 45%, #ecfeff 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

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

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

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, var(--orange), var(--cyan));
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.25);
}

.brand-text {
    font-size: 26px;
    background: linear-gradient(90deg, var(--orange), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 700;
    color: #374151;
    flex: 1;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
    transition: color 0.25s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
    color: var(--orange);
}

.header-search {
    width: 300px;
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.header-search input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 11px 12px 11px 18px;
    background: transparent;
}

.header-search button {
    border: 0;
    color: white;
    background: linear-gradient(90deg, var(--orange), var(--orange-dark));
    padding: 11px 18px;
    cursor: pointer;
}

.mobile-toggle {
    display: none;
    border: 0;
    background: #f3f4f6;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    border-radius: 18px;
    background: white;
    box-shadow: var(--soft-shadow);
}

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

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

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    transition: transform 5s ease;
}

.hero-slide.is-active .hero-bg {
    transform: scale(1.0);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.56) 50%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    width: min(1280px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 720px;
    color: white;
    animation: fadeUp 0.8s ease both;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    color: white;
    background: rgba(249, 115, 22, 0.9);
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(249, 115, 22, 0.22);
}

.hero h1 {
    margin: 18px 0 18px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.8;
}

.hero-meta,
.hero-actions,
.hero-links,
.movie-meta,
.movie-tags,
.detail-meta,
.detail-tags,
.filter-row,
.section-head,
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.hero-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.92);
}

.hero-actions {
    margin-top: 28px;
}

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

.btn {
    color: white;
    background: linear-gradient(90deg, var(--orange), var(--orange-dark));
    box-shadow: 0 18px 32px rgba(249, 115, 22, 0.28);
}

.btn-secondary {
    color: white;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 32px rgba(6, 182, 212, 0.24);
}

.btn-ghost {
    color: white;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.btn:hover,
.btn-secondary:hover,
.btn-ghost:hover {
    transform: translateY(-2px) scale(1.02);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.main-space {
    display: grid;
    gap: 76px;
    padding-bottom: 70px;
}

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

.section:first-of-type {
    margin-top: 64px;
}

.section-head {
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.gradient-title {
    background: linear-gradient(90deg, var(--orange), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-desc {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    overflow: hidden;
    background: white;
    box-shadow: var(--soft-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.movie-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #374151);
}

.movie-cover img,
.compact-image img,
.list-thumb img,
.detail-poster img,
.category-mini img,
.waterfall-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.movie-cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.76) 100%);
    opacity: 0.3;
    transition: opacity 0.25s ease;
}

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

.play-chip {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    width: 64px;
    height: 64px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: var(--orange);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge,
.compact-rank,
.list-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    box-shadow: 0 12px 26px rgba(239, 68, 68, 0.25);
}

.movie-info {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.movie-title {
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
    color: var(--text);
    transition: color 0.25s ease;
}

.movie-card:hover .movie-title,
.list-card:hover .list-body a,
.compact-card:hover strong,
.category-card:hover h2 {
    color: var(--orange);
}

.movie-info p,
.list-body p,
.compact-body span,
.detail-copy p,
.category-card p,
.search-panel p {
    color: var(--muted);
    line-height: 1.75;
}

.movie-meta {
    color: #6b7280;
    font-size: 14px;
}

.movie-meta span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #f3f4f6;
}

.movie-tags span,
.detail-tags span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    color: #374151;
    font-size: 13px;
    background: linear-gradient(90deg, #ffedd5, #cffafe);
}

.rail-wrap {
    position: relative;
}

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

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

.rail-card {
    min-width: 320px;
}

.rail-button {
    position: absolute;
    top: 45%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 0;
    color: #111827;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--soft-shadow);
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.rail-button:hover {
    color: white;
    background: var(--orange);
    transform: translateY(-2px);
}

.rail-left {
    left: -10px;
}

.rail-right {
    right: -10px;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.category-tabs button {
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 800;
    color: #374151;
    background: white;
    box-shadow: var(--soft-shadow);
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.category-tabs button:hover,
.category-tabs button.is-active {
    color: white;
    background: linear-gradient(90deg, var(--orange), var(--orange-dark));
    transform: translateY(-2px);
}

.category-panel {
    display: none;
}

.category-panel.is-active {
    display: grid;
}

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

.compact-card {
    display: flex;
    min-height: 154px;
    overflow: hidden;
    border-radius: 20px;
    background: white;
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.compact-image {
    position: relative;
    flex: 0 0 118px;
    background: #111827;
    overflow: hidden;
}

.compact-rank {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    border-radius: 999px;
}

.compact-body {
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 16px;
    min-width: 0;
}

.compact-body strong {
    font-size: 17px;
    line-height: 1.35;
    transition: color 0.25s ease;
}

.compact-body em {
    font-style: normal;
    color: var(--orange);
    font-size: 13px;
    font-weight: 800;
}

.waterfall {
    columns: 3 260px;
    column-gap: 24px;
}

.waterfall-card {
    position: relative;
    display: block;
    break-inside: avoid;
    margin-bottom: 24px;
    min-height: 260px;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: var(--soft-shadow);
    background: #111827;
}

.waterfall-card:nth-child(2n) {
    min-height: 340px;
}

.waterfall-card:nth-child(3n) {
    min-height: 300px;
}

.waterfall-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.78) 100%);
}

.waterfall-card div {
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 22px;
    color: white;
}

.waterfall-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 22px;
}

.waterfall-card span {
    display: block;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.7;
}

.dark-band {
    padding: 64px 0;
    background: linear-gradient(135deg, #111827, #1f2937 52%, #111827);
}

.dark-band .section-title,
.dark-band .section-desc {
    color: white;
}

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

.list-card {
    display: grid;
    grid-template-columns: 52px 128px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: white;
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.list-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.list-number {
    width: 42px;
    height: 42px;
    border-radius: 999px;
}

.list-thumb {
    height: 78px;
    border-radius: 14px;
    overflow: hidden;
    background: #111827;
}

.list-body a {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 18px;
    font-weight: 900;
    transition: color 0.25s ease;
}

.list-body p {
    margin: 0;
}

.list-extra {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    min-width: 210px;
}

.list-extra span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #374151;
    background: #f3f4f6;
    font-size: 13px;
}

.page-hero {
    padding: 70px 0 42px;
    color: white;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.98), rgba(6, 182, 212, 0.78)), radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.45), transparent 35%);
}

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

.page-hero h1 {
    margin: 12px 0 14px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.12;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 780px;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.8;
    font-size: 18px;
}

.breadcrumb {
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

.breadcrumb a:hover {
    color: white;
}

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

.category-card {
    display: grid;
    gap: 16px;
    padding: 24px;
    border-radius: 24px;
    background: white;
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h2 {
    margin: 0;
    font-size: 24px;
    transition: color 0.25s ease;
}

.category-mini-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.category-mini {
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    overflow: hidden;
    background: #111827;
}

.search-panel {
    display: grid;
    gap: 18px;
    padding: 24px;
    border-radius: 24px;
    background: white;
    box-shadow: var(--soft-shadow);
}

.filter-row input,
.filter-row select {
    min-height: 46px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 0 16px;
    outline: 0;
    background: white;
}

.filter-row input {
    flex: 1 1 320px;
}

.filter-row select {
    flex: 0 1 180px;
}

.detail-wrap {
    width: min(1280px, calc(100% - 32px));
    margin: 36px auto 70px;
}

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

.player-card,
.detail-card,
.related-card {
    border-radius: 24px;
    background: white;
    box-shadow: var(--soft-shadow);
    overflow: hidden;
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.player-mask {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: white;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.62));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-icon {
    width: 78px;
    height: 78px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    box-shadow: 0 18px 42px rgba(249, 115, 22, 0.32);
    font-size: 26px;
}

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

.detail-card {
    padding: 26px;
}

.detail-title {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.detail-lead {
    margin: 0 0 18px;
    color: #4b5563;
    font-size: 18px;
    line-height: 1.8;
}

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

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #374151;
    background: #f3f4f6;
    font-weight: 700;
}

.detail-copy {
    display: grid;
    gap: 24px;
    margin-top: 22px;
}

.detail-copy h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.review-box {
    padding: 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff7ed, #ecfeff);
}

.related-card {
    position: sticky;
    top: 96px;
    padding: 20px;
}

.related-card h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.related-card .compact-card {
    min-height: 112px;
    box-shadow: none;
    border: 1px solid #eef2f7;
}

.related-card .compact-image {
    flex-basis: 90px;
}

.related-card .compact-body {
    padding: 12px;
}

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

.site-footer {
    margin-top: 80px;
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937 55%, #111827);
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
}

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

.footer-inner p {
    max-width: 520px;
    color: #9ca3af;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    justify-content: flex-end;
    gap: 16px 24px;
    font-weight: 700;
}

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

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

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

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

    .related-card {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 66px;
        gap: 12px;
    }

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

    .hero {
        height: 560px;
    }

    .hero-content {
        max-width: none;
    }

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

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

    .movie-info {
        padding: 14px;
    }

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

    .compact-card {
        min-height: 132px;
    }

    .list-card {
        grid-template-columns: 42px 92px minmax(0, 1fr);
    }

    .list-extra {
        grid-column: 2 / -1;
        justify-content: flex-start;
        min-width: auto;
    }

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

    .footer-links {
        justify-content: flex-start;
    }
}

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

    .hero-actions,
    .hero-links {
        align-items: stretch;
        flex-direction: column;
    }

    .btn,
    .btn-secondary,
    .btn-ghost {
        width: 100%;
    }

    .rail-card {
        min-width: 260px;
    }

    .rail-button {
        display: none;
    }
}
