:root {
    color-scheme: dark;
    --bg: #0f172a;
    --panel: #1e293b;
    --panel-strong: #0f172a;
    --line: #334155;
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --accent: #f97316;
    --accent-strong: #dc2626;
    --gold: #facc15;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

input,
button {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid rgba(51, 65, 85, 0.9);
    backdrop-filter: blur(18px);
}

.header-inner,
.category-strip-inner,
.footer-inner,
.content-section,
.detail-inner,
.page-hero-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 16px 35px rgba(249, 115, 22, 0.24);
}

.logo-text {
    font-size: 1.18rem;
}

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

.nav-link,
.mobile-nav-link {
    color: #d1d5db;
    text-decoration: none;
    border-radius: 10px;
    transition: 0.2s ease;
}

.nav-link {
    padding: 10px 13px;
    font-size: 0.94rem;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #fff;
    background: rgba(51, 65, 85, 0.92);
}

.header-search {
    margin-left: auto;
    display: flex;
    width: min(360px, 32vw);
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 14px;
    overflow: hidden;
}

.header-search input,
.mobile-search input,
.filter-bar input {
    width: 100%;
    background: transparent;
    color: #fff;
    border: 0;
    outline: 0;
}

.header-search input {
    padding: 11px 13px;
}

.header-search button,
.mobile-search button {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    padding: 0 16px;
    cursor: pointer;
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    border: 1px solid #334155;
    border-radius: 10px;
    color: #fff;
    background: #1e293b;
    padding: 8px 11px;
}

.category-strip {
    border-top: 1px solid rgba(51, 65, 85, 0.62);
}

.category-strip-inner {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: none;
}

.category-strip-inner::-webkit-scrollbar,
.scroll-row::-webkit-scrollbar {
    display: none;
}

.category-pill {
    flex: 0 0 auto;
    text-decoration: none;
    color: #cbd5e1;
    background: rgba(51, 65, 85, 0.82);
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 0.84rem;
    transition: 0.2s ease;
}

.category-pill:hover {
    color: #fff;
    background: var(--accent);
}

.mobile-menu {
    display: none;
    padding: 14px 16px 18px;
    border-top: 1px solid #334155;
    background: #0f172a;
}

.mobile-menu.open {
    display: grid;
    gap: 10px;
}

.mobile-search {
    display: flex;
    overflow: hidden;
    border: 1px solid #334155;
    border-radius: 12px;
    background: #1e293b;
}

.mobile-search input {
    padding: 10px 12px;
}

.mobile-nav-link {
    display: block;
    padding: 11px 12px;
}

.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100% - 1280px) / 2 + 16px));
    top: 50%;
    transform: translateY(-50%);
    width: min(680px, calc(100% - 48px));
}

.hero-badge,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.hero-content h1 {
    margin: 18px 0 16px;
    font-size: clamp(2.4rem, 5vw, 4.7rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    color: #d1d5db;
    font-size: 1.08rem;
    line-height: 1.85;
    max-width: 650px;
}

.hero-meta,
.detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.hero-meta span,
.detail-meta span {
    color: #f8fafc;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.9rem;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
    transition: 0.2s ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 18px 42px rgba(249, 115, 22, 0.28);
}

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

.ghost-button {
    color: #fff;
    background: rgba(30, 41, 59, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.ghost-button.small {
    min-height: 38px;
    padding: 0 16px;
    font-size: 0.9rem;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.content-section {
    padding: 64px 0;
}

.intro-section {
    padding-top: 74px;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1 {
    margin: 12px 0 0;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.14;
}

.section-heading p,
.page-hero p {
    color: var(--muted);
    line-height: 1.8;
    max-width: 760px;
}

.section-heading.centered {
    text-align: center;
    display: grid;
    justify-items: center;
}

.section-heading.with-link,
.category-overview-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.section-heading.with-link a,
.category-overview-head a {
    color: #fb923c;
    text-decoration: none;
    font-weight: 800;
}

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

.category-tile {
    min-height: 146px;
    padding: 22px;
    border-radius: 24px;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    border: 1px solid rgba(148, 163, 184, 0.15);
    transition: 0.2s ease;
}

.category-tile:hover {
    border-color: rgba(249, 115, 22, 0.68);
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}

.category-tile span {
    display: block;
    margin-bottom: 10px;
    font-size: 1.18rem;
    font-weight: 800;
}

.category-tile p {
    margin: 0;
    color: var(--soft);
    line-height: 1.7;
    font-size: 0.94rem;
}

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

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

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

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

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

.movie-card {
    display: block;
    min-width: 0;
    color: #fff;
    text-decoration: none;
    background: #1e293b;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(249, 115, 22, 0.55);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
}

.poster-wrap,
.horizontal-cover,
.detail-cover,
.player-box {
    position: relative;
    overflow: hidden;
    background: #020617;
}

.poster-wrap {
    aspect-ratio: 3 / 4;
}

.poster-wrap img,
.horizontal-cover img,
.detail-cover img,
.detail-bg img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.32s ease;
}

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

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    background: rgba(249, 115, 22, 0.95);
    font-size: 0.78rem;
    font-weight: 800;
}

.play-hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.32);
    opacity: 0;
    font-size: 2.6rem;
    transition: 0.2s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
}

.card-content {
    padding: 16px;
}

.card-content h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 1rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-content p {
    min-height: 44px;
    margin: 0 0 12px;
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-kicker {
    margin-bottom: 7px;
    color: #fb923c;
    font-size: 0.82rem;
    font-weight: 800;
}

.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tag-chip {
    display: inline-flex;
    max-width: 100%;
    color: #fed7aa;
    background: rgba(154, 52, 18, 0.28);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 0.76rem;
    white-space: nowrap;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #94a3b8;
    font-size: 0.84rem;
}

.card-meta span:last-child,
.rank-score {
    color: var(--gold);
    font-weight: 900;
}

.horizontal-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
}

.horizontal-cover {
    min-height: 200px;
}

.panel-section {
    width: min(1280px, calc(100% - 32px));
    margin: 28px auto;
    padding: 34px;
    border-radius: 28px;
    background: linear-gradient(135deg, #1e293b, #334155);
}

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

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

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 62px minmax(0, 1fr) 46px;
    align-items: center;
    gap: 13px;
    padding: 10px;
    border-radius: 18px;
    color: #fff;
    text-decoration: none;
    background: rgba(30, 41, 59, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.12);
    transition: 0.2s ease;
}

.rank-item:hover {
    border-color: rgba(249, 115, 22, 0.5);
    transform: translateX(4px);
}

.rank-number {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    font-weight: 900;
}

.rank-item img {
    width: 62px;
    height: 82px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.orange-panel {
    border-radius: 28px;
    padding: 36px;
    background: linear-gradient(135deg, rgba(124, 45, 18, 0.22), rgba(127, 29, 29, 0.18));
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.feature-card {
    grid-column: span 2;
}

.scroll-row {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 14px;
    scrollbar-width: none;
}

.scroll-card {
    flex: 0 0 220px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.22), transparent 38%), linear-gradient(135deg, #111827, #020617);
}

.small-page-hero {
    min-height: 330px;
    display: flex;
    align-items: center;
}

.page-hero-inner {
    padding: 76px 0;
}

.page-hero h1 {
    max-width: 850px;
}

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

.stacked-sections {
    display: grid;
    gap: 34px;
}

.category-overview-block {
    padding: 28px;
    border-radius: 28px;
    background: rgba(30, 41, 59, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.13);
}

.category-overview-head p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

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

.filter-bar {
    position: relative;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.filter-bar input {
    max-width: 560px;
    padding: 16px 18px;
    border: 1px solid #334155;
    border-radius: 16px;
    background: #1e293b;
}

.large-filter input {
    max-width: 760px;
}

.filter-empty {
    display: none;
    color: #fb923c;
    font-weight: 800;
}

.filter-empty.show {
    display: inline-flex;
}

.detail-hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #020617;
}

.detail-bg,
.detail-overlay {
    position: absolute;
    inset: 0;
}

.detail-bg {
    opacity: 0.28;
    filter: blur(4px);
    transform: scale(1.03);
}

.detail-overlay {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.5));
}

.detail-inner {
    position: relative;
    z-index: 2;
    padding: 42px 0 74px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 28px;
    color: #cbd5e1;
    font-size: 0.92rem;
}

.breadcrumb a {
    color: #fb923c;
    text-decoration: none;
}

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

.detail-cover {
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-info h1 {
    max-width: 860px;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
}

.detail-one-line {
    max-width: 850px;
    color: var(--muted);
    line-height: 1.85;
    font-size: 1.08rem;
}

.player-section {
    padding-top: 56px;
}

.player-box {
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.36);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #fff;
    border: 0;
    background: radial-gradient(circle at center, rgba(249, 115, 22, 0.16), rgba(0, 0, 0, 0.66));
    cursor: pointer;
    font-weight: 900;
    letter-spacing: 0.03em;
}

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

.player-play {
    width: 78px;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 20px 48px rgba(249, 115, 22, 0.32);
    font-size: 2.1rem;
}

.player-state {
    position: absolute;
    left: 18px;
    bottom: 16px;
    z-index: 6;
    color: #f8fafc;
    font-size: 0.9rem;
}

.detail-text-section {
    padding-top: 24px;
}

.detail-article {
    display: grid;
    gap: 18px;
    padding: 34px;
    border-radius: 28px;
    background: rgba(30, 41, 59, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.13);
}

.detail-article h2 {
    margin: 0;
    font-size: 1.5rem;
}

.detail-article p {
    margin: 0;
    color: var(--muted);
    line-height: 1.9;
}

.info-table {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.info-table div {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
}

.info-table strong {
    color: #fb923c;
    font-size: 0.86rem;
}

.info-table span {
    color: #fff;
}

.site-footer {
    border-top: 1px solid rgba(51, 65, 85, 0.85);
    background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr;
    gap: 32px;
    padding: 46px 0;
}

.footer-brand p,
.footer-copy {
    color: var(--soft);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-content: start;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
}

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

.footer-copy {
    grid-column: 1 / -1;
    margin: 0;
    padding-top: 18px;
    border-top: 1px solid rgba(51, 65, 85, 0.72);
    font-size: 0.9rem;
}

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

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

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

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

    .hero-slider {
        height: 540px;
    }

    .hero-content {
        top: auto;
        bottom: 72px;
        transform: none;
    }

    .hero-arrow {
        display: none;
    }

    .wide-grid,
    .home-rank,
    .full-rank,
    .mixed-grid,
    .mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

@media (max-width: 640px) {
    .header-inner,
    .content-section,
    .detail-inner,
    .page-hero-inner,
    .footer-inner {
        width: min(100% - 24px, 1280px);
    }

    .hero-slider {
        height: 560px;
    }

    .hero-content h1 {
        font-size: 2.25rem;
    }

    .hero-content p {
        font-size: 0.96rem;
    }

    .hero-actions,
    .page-actions,
    .section-heading.with-link,
    .category-overview-head {
        align-items: stretch;
        flex-direction: column;
    }

    .content-section {
        padding: 42px 0;
    }

    .panel-section,
    .orange-panel,
    .category-overview-block,
    .detail-article {
        padding: 20px;
        border-radius: 22px;
    }

    .category-grid,
    .large-category-grid,
    .poster-grid,
    .all-movie-grid,
    .wide-grid,
    .home-rank,
    .full-rank,
    .mixed-grid,
    .mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .horizontal-card {
        grid-template-columns: 1fr;
    }

    .horizontal-cover {
        aspect-ratio: 16 / 10;
        min-height: 0;
    }

    .feature-card {
        grid-column: span 2;
    }

    .card-content {
        padding: 13px;
    }

    .detail-hero {
        min-height: 0;
    }

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

    .detail-cover {
        width: min(260px, 78vw);
    }

    .player-box {
        border-radius: 18px;
    }

    .player-play {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }

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

    .rank-score {
        display: none;
    }
}

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

    .scroll-card {
        flex-basis: 76vw;
    }
}
