:root {
    --bg: #0f1117;
    --bg-soft: #151923;
    --panel: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --accent: #f97316;
    --gold: #fbbf24;
    --radius: 18px;
    --shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.78);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.nav-link,
.mobile-link {
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
    padding: 10px 12px;
    border-radius: 999px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--primary);
    background: rgba(220, 38, 38, 0.08);
}

.top-search {
    display: flex;
    align-items: center;
    width: min(320px, 28vw);
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.top-search input,
.large-search input,
.filter-controls input,
.filter-controls select {
    border: 0;
    outline: 0;
    color: #111827;
    background: transparent;
}

.top-search input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
}

.top-search button,
.large-search button {
    border: 0;
    color: #ffffff;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.top-search button {
    padding: 10px 16px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: #111827;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mobile-panel.open {
    display: grid;
}

.mobile-link {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f3f4f6;
}

.hero-slider {
    position: relative;
    min-height: 620px;
    background: var(--bg);
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 420px);
    gap: 48px;
    align-items: center;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 86px 24px 104px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-slide::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image: linear-gradient(90deg, rgba(15, 17, 23, 0.92), rgba(185, 28, 28, 0.72), rgba(249, 115, 22, 0.5)), var(--hero-bg);
    background-size: cover;
    background-position: center;
    filter: saturate(1.12);
}

.hero-slide::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 70% 25%, rgba(251, 191, 36, 0.32), transparent 32%), linear-gradient(180deg, transparent, rgba(15, 17, 23, 0.64));
}

.hero-slide.active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.hero-copy {
    color: #ffffff;
}

.hero-label,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
}

.hero-label {
    padding: 8px 14px;
    color: #ffedd5;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-copy h1 {
    margin: 22px 0 18px;
    max-width: 780px;
    font-size: clamp(2.6rem, 6vw, 5.8rem);
    line-height: 0.96;
    letter-spacing: -0.08em;
    font-weight: 900;
}

.hero-copy p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    line-height: 1.85;
}

.hero-actions,
.section-head,
.filter-controls,
.footer-links,
.footer-cats,
.tag-row,
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.hero-actions {
    gap: 14px;
    margin-top: 34px;
}

.primary-btn,
.ghost-btn,
.section-link,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    min-height: 48px;
    padding: 0 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 14px 30px rgba(220, 38, 38, 0.32);
}

.ghost-btn {
    min-height: 48px;
    padding: 0 22px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
}

.hero-poster img {
    aspect-ratio: 3 / 4.25;
    object-fit: cover;
}

.hero-poster span,
.play-mark {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 12px 30px rgba(220, 38, 38, 0.32);
}

.hero-poster span {
    right: 22px;
    bottom: 22px;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    font-size: 1.35rem;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 4;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-controls button {
    border: 0;
}

.hero-controls > button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 1.7rem;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.hero-dots {
    display: flex;
    gap: 8px;
}

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

.hero-dot.active {
    width: 32px;
    background: #ffffff;
}

.search-hero,
.content-section,
.filter-panel,
.page-hero,
.detail-hero,
.detail-content,
.player-section,
.category-overview-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.search-hero {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 520px);
    gap: 28px;
    align-items: center;
    margin-top: -44px;
    position: relative;
    z-index: 5;
    padding-top: 32px;
    padding-bottom: 32px;
    border-radius: 26px;
    color: #ffffff;
    background: linear-gradient(135deg, #dc2626, #f97316);
    box-shadow: var(--shadow);
}

.search-hero h2,
.page-hero h1,
.section-head h2,
.filter-panel h2,
.detail-intro h1,
.detail-content h2 {
    margin: 8px 0 0;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #111827;
}

.search-hero h2 {
    color: #ffffff;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
}

.search-hero p {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.8;
}

.search-hero .eyebrow,
.page-hero .eyebrow,
.section-head .eyebrow,
.filter-panel .eyebrow,
.detail-intro .eyebrow {
    color: var(--primary);
}

.search-hero .eyebrow {
    color: #ffedd5;
}

.large-search {
    display: flex;
    min-height: 58px;
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.large-search input {
    flex: 1;
    min-width: 0;
    padding: 0 20px;
}

.large-search button {
    padding: 0 24px;
}

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

.section-head {
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.section-head h2,
.filter-panel h2,
.page-hero h1,
.detail-content h2 {
    font-size: clamp(1.65rem, 3vw, 2.45rem);
}

.section-link,
.text-link {
    color: var(--primary);
    background: rgba(220, 38, 38, 0.08);
    padding: 12px 16px;
}

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

.category-tile {
    min-height: 170px;
    border-radius: 24px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background-image: linear-gradient(180deg, rgba(15, 17, 23, 0.18), rgba(15, 17, 23, 0.88)), var(--tile-bg);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.5), rgba(249, 115, 22, 0.22));
}

.category-tile span {
    font-size: 1.25rem;
    font-weight: 900;
}

.category-tile strong {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.84);
}

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

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

.movie-card {
    border-radius: 22px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #7f1d1d);
}

.poster-link img {
    aspect-ratio: 3 / 4.2;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.play-mark {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-width: 38px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold), var(--primary));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

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

.movie-card h3 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.35;
    font-weight: 850;
    color: #111827;
}

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

.meta-line,
.card-desc,
.detail-content p,
.info-list,
.category-overview-card p,
.page-hero p,
.lead-text {
    color: var(--muted);
    line-height: 1.75;
}

.meta-line {
    margin: 8px 0 0;
    font-size: 0.88rem;
}

.card-desc {
    margin: 10px 0 0;
    font-size: 0.92rem;
}

.tag-row {
    gap: 8px;
    margin-top: 12px;
}

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--primary);
    background: rgba(220, 38, 38, 0.08);
    font-size: 0.82rem;
    font-weight: 700;
}

.page-main {
    padding-bottom: 76px;
}

.page-hero {
    padding-top: 72px;
    padding-bottom: 42px;
}

.slim-hero,
.category-page-hero {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-hero p {
    max-width: 760px;
    margin-top: 14px;
}

.breadcrumb {
    gap: 8px;
    color: #6b7280;
    font-size: 0.92rem;
    margin-top: 18px;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 560px);
    gap: 18px;
    align-items: center;
    padding-top: 24px;
    padding-bottom: 24px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
    position: relative;
}

.filter-controls {
    gap: 10px;
}

.filter-controls input,
.filter-controls select {
    min-height: 46px;
    border-radius: 14px;
    padding: 0 14px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

.filter-controls input {
    flex: 1;
    min-width: 180px;
}

.empty-state {
    display: none;
    grid-column: 1 / -1;
    margin: 12px 0 0;
    color: var(--muted);
}

.empty-state.show {
    display: block;
}

.no-top-gap {
    padding-top: 30px;
}

.category-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    padding-bottom: 76px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 168px 1fr;
    gap: 20px;
    align-items: center;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.category-thumb-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.category-thumb-row img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
    background: #111827;
}

.category-overview-card h2 {
    margin: 0 0 10px;
    font-size: 1.35rem;
    font-weight: 900;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(220px, 340px) 1fr;
    gap: 40px;
    align-items: center;
    padding-top: 56px;
    padding-bottom: 46px;
}

.detail-poster img {
    aspect-ratio: 3 / 4.25;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: var(--shadow);
    background: #111827;
}

.detail-intro h1 {
    margin: 12px 0 12px;
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    line-height: 1;
}

.lead-text {
    max-width: 850px;
    font-size: 1.12rem;
}

.large-tags {
    margin: 20px 0 26px;
}

.player-section {
    padding-top: 12px;
    padding-bottom: 32px;
}

.player-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    overflow: hidden;
    background: #050505;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: radial-gradient(circle at center, rgba(220, 38, 38, 0.22), rgba(0, 0, 0, 0.58));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover span {
    width: 88px;
    height: 88px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.35);
}

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

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding-top: 20px;
}

.detail-content article {
    padding: 24px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.detail-content article:first-child {
    grid-column: 1 / -1;
}

.detail-content p {
    margin-top: 12px;
}

.info-list {
    margin: 16px 0 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.info-list dt {
    font-weight: 800;
    color: #111827;
}

.info-list dd {
    margin: 0;
}

.related-section {
    padding-top: 48px;
}

.site-footer {
    margin-top: 76px;
    color: #cbd5e1;
    background: #0f1117;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 0.7fr 1fr;
    gap: 34px;
    padding: 44px 24px;
}

.footer-brand {
    color: #ffffff;
    font-size: 1.25rem;
}

.site-footer p {
    margin-top: 12px;
    max-width: 520px;
    line-height: 1.75;
}

.footer-links,
.footer-cats {
    align-items: flex-start;
    gap: 10px;
}

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

.footer-cats a,
.footer-links a {
    color: #cbd5e1;
}

.footer-cats a {
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-cats a:hover,
.footer-links a:hover {
    color: #ffffff;
}

@media (max-width: 1120px) {
    .top-search {
        display: none;
    }

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

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

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

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .hero-slider {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 70px;
        padding-bottom: 110px;
    }

    .hero-poster {
        max-width: 280px;
        margin: 0 auto;
        transform: none;
    }

    .search-hero,
    .filter-panel,
    .detail-hero,
    .detail-content,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .category-overview-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-content article:first-child {
        grid-column: auto;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .mobile-panel,
    .search-hero,
    .content-section,
    .filter-panel,
    .page-hero,
    .detail-hero,
    .detail-content,
    .player-section,
    .category-overview-grid,
    .footer-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .brand span:last-child {
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .large-search,
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .large-search button {
        min-height: 48px;
    }

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

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

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