:root {
    color-scheme: light;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #fff7ed;
    --text: #111827;
    --muted: #64748b;
    --muted-strong: #475569;
    --line: #e2e8f0;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --brand: #dc2626;
    --brand-2: #f97316;
    --brand-dark: #991b1b;
    --shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(220, 38, 38, 0.08), transparent 36rem),
        linear-gradient(180deg, #fff 0%, var(--bg) 42rem);
    color: var(--text);
    min-height: 100vh;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 12px 32px rgba(220, 38, 38, 0.38);
}

.logo-text {
    font-size: 22px;
}

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

.nav-link {
    padding: 10px 12px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.compact {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.search-form,
.mobile-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-form input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
    min-height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 999px;
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-form input::placeholder,
.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.58);
}

.search-form input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(248, 113, 113, 0.95);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.18);
}

.search-form button,
.mobile-search button,
.btn-primary,
.btn-ghost,
.section-more {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-form button,
.mobile-search button,
.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 12px 28px rgba(220, 38, 38, 0.32);
}

.search-form button,
.mobile-search button {
    min-height: 42px;
    padding: 0 16px;
}

.search-form button:hover,
.mobile-search button:hover,
.btn-primary:hover,
.btn-ghost:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    font-size: 22px;
}

.mobile-menu {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding: 16px;
    background: var(--dark);
}

.mobile-menu.is-open {
    display: block;
}

.mobile-search {
    width: min(640px, 100%);
    margin: 0 auto 16px;
}

.mobile-search input {
    flex: 1;
}

.mobile-links {
    width: min(640px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 8px;
}

.mobile-links a {
    padding: 12px 14px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.06);
}

main {
    overflow: hidden;
}

.hero-carousel {
    position: relative;
    min-height: 660px;
    color: #fff;
    background: var(--dark);
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(16px) saturate(1.12);
    transform: scale(1.08);
    opacity: 0.48;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.28)),
        radial-gradient(circle at 25% 30%, rgba(220, 38, 38, 0.34), transparent 28rem),
        linear-gradient(180deg, transparent 65%, var(--bg) 100%);
}

.hero-content {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    min-height: 660px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
    gap: 56px;
    align-items: center;
    padding: 80px 0 110px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fb7185;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 14px 0 18px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 0.95;
    letter-spacing: -0.08em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

.hero-tags,
.detail-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags a,
.tag-row span,
.category-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span,
.detail-tags a {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 24px;
}

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-poster {
    display: block;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: linear-gradient(135deg, #1e293b, #7f1d1d);
}

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

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
    font-size: 26px;
}

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

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

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

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

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

.section-heading.slim {
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.1;
    letter-spacing: -0.06em;
}

.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    color: var(--brand-dark);
    background: #fee2e2;
}

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

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

.category-card {
    position: relative;
    min-height: 200px;
    overflow: hidden;
    border-radius: var(--radius);
    color: #fff;
    background: var(--dark);
    box-shadow: var(--shadow);
}

.category-card img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    opacity: 0.62;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.86));
}

.category-card span,
.category-card p {
    position: absolute;
    left: 20px;
    right: 20px;
    z-index: 1;
}

.category-card span {
    bottom: 58px;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    bottom: 18px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 1.55;
}

.category-card:hover img {
    transform: scale(1.08);
    opacity: 0.78;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(220, 38, 38, 0.26);
    box-shadow: 0 24px 58px rgba(15, 23, 42, 0.15);
}

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

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.76));
    opacity: 0.9;
}

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: #fff;
    background: rgba(220, 38, 38, 0.92);
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.35);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    font-weight: 900;
}

.movie-info {
    padding: 16px;
}

.meta-line,
.card-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
}

.category-pill {
    color: var(--brand-dark);
    background: #fee2e2;
}

.movie-info h3 {
    margin: 12px 0 8px;
    font-size: 18px;
    line-height: 1.3;
    letter-spacing: -0.03em;
}

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

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

.tag-row span {
    color: #b91c1c;
    background: #fff1f2;
}

.card-stats {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.card-stats strong {
    color: #f59e0b;
    font-size: 14px;
}

.page-hero {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    margin: 38px auto 0;
    overflow: hidden;
    border-radius: 30px;
    color: #fff;
    background:
        radial-gradient(circle at 18% 22%, rgba(248, 113, 113, 0.32), transparent 24rem),
        linear-gradient(135deg, #0f172a, #1e293b 56%, #7f1d1d);
    box-shadow: var(--shadow);
}

.page-hero > div {
    padding: clamp(34px, 7vw, 78px);
}

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

.page-hero p {
    max-width: 820px;
}

.category-preview-block {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 180px;
    gap: 12px;
    margin-bottom: 26px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

.filter-panel.wide {
    grid-template-columns: minmax(280px, 1fr) 170px 170px 170px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    background: #fff;
    color: var(--text);
    border-color: var(--line);
}

.empty-state {
    display: none;
    margin: 42px 0 0;
    padding: 22px;
    border-radius: 18px;
    color: var(--muted-strong);
    background: #fff;
    text-align: center;
}

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

.breadcrumb {
    width: min(1280px, calc(100% - 32px));
    margin: 28px auto 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-hero {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 48px;
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 34px;
    border-radius: 30px;
    color: #fff;
    background:
        radial-gradient(circle at 20% 10%, rgba(248, 113, 113, 0.34), transparent 26rem),
        linear-gradient(135deg, #0f172a, #1e293b 58%, #7f1d1d);
    box-shadow: var(--shadow);
}

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

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: linear-gradient(135deg, #1e293b, #7f1d1d);
}

.detail-info h1 {
    font-size: clamp(34px, 5.4vw, 70px);
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 28px 0;
}

.detail-meta div {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.detail-meta dt {
    color: rgba(255, 255, 255, 0.58);
    font-size: 12px;
}

.detail-meta dd {
    margin: 6px 0 0;
    font-weight: 800;
}

.detail-tags {
    margin-bottom: 26px;
}

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

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 30px 86px rgba(15, 23, 42, 0.28);
}

.video-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
    object-fit: contain;
}

.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(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

.player-overlay.is-hidden {
    display: none;
}

.play-icon {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 18px 52px rgba(220, 38, 38, 0.45);
    font-size: 34px;
    text-indent: 4px;
}

.player-status {
    min-height: 24px;
    margin: 12px 0 0;
    color: var(--muted);
}

.text-panel {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #fff;
    padding: clamp(24px, 4vw, 42px);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.text-panel h2 {
    margin: 0 0 12px;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.text-panel h2:not(:first-child) {
    margin-top: 32px;
}

.text-panel p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 17px;
    line-height: 1.9;
}

.site-footer {
    margin-top: 64px;
    color: rgba(255, 255, 255, 0.78);
    background: var(--dark);
}

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

.footer-logo {
    color: #fff;
    font-size: 24px;
}

.footer-inner p {
    max-width: 620px;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 14px;
}

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

.footer-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 18px 16px;
    text-align: center;
    font-size: 14px;
}

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

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

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

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

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

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

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

    .hero-content {
        gap: 28px;
        padding-top: 54px;
    }

    .hero-poster {
        width: min(300px, 82vw);
        transform: none;
    }

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

    .detail-poster {
        width: min(320px, 100%);
    }

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

    .filter-panel,
    .filter-panel.wide {
        grid-template-columns: 1fr 1fr;
    }

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

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

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

    .logo-text {
        font-size: 20px;
    }

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

    .hero-copy h1,
    .page-hero h1,
    .detail-info h1 {
        letter-spacing: -0.06em;
    }

    .hero-copy p,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .hero-actions,
    .section-heading,
    .footer-inner {
        align-items: stretch;
        flex-direction: column;
    }

    .section-heading {
        display: flex;
    }

    .filter-panel,
    .filter-panel.wide {
        grid-template-columns: 1fr;
    }

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

    .movie-info {
        padding: 12px;
    }

    .movie-info h3 {
        font-size: 16px;
    }

    .movie-info p,
    .tag-row,
    .card-stats span {
        display: none;
    }

    .detail-hero {
        padding: 18px;
    }

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

    .play-icon {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }

    .footer-links {
        flex-wrap: wrap;
    }
}
