:root {
    --bg: #f7f8fb;
    --panel: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --soft: #eef2f7;
    --line: #e5e7eb;
    --red: #dc2626;
    --red-dark: #b91c1c;
    --pink: #db2777;
    --blue: #2563eb;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
    min-height: 100vh;
}

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

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

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

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--pink));
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(-3deg);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 20px;
    font-weight: 800;
}

.brand-text em {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
    font-style: normal;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    font-size: 15px;
    font-weight: 700;
    color: #374151;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--red);
}

.nav-link:hover {
    transform: translateY(-1px);
}

.nav-lite {
    color: #6b7280;
    font-weight: 600;
}

.mobile-toggle {
    display: none;
    border: 0;
    background: #f3f4f6;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 22px;
    color: #374151;
}

.mobile-nav {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 18px 14px;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav .nav-link {
    padding: 12px 14px;
    border-radius: 12px;
    background: #f9fafb;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #0f172a;
}

.hero-title-block {
    position: absolute;
    top: 86px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    width: min(1280px, calc(100% - 32px));
    color: #fff;
    pointer-events: none;
}

.hero-title-block h1 {
    margin: 0;
    font-size: clamp(26px, 4vw, 46px);
    line-height: 1.1;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
}

.hero-title-block p {
    margin: 12px 0 0;
    max-width: 620px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 16px;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.18));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 70px;
    transform: translateX(-50%);
    width: min(1280px, calc(100% - 32px));
    color: #fff;
    max-width: 1280px;
}

.hero-content h2 {
    margin: 16px 0;
    max-width: 720px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.04em;
    text-shadow: 0 16px 32px rgba(0, 0, 0, 0.38);
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 28px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-badges,
.detail-meta,
.tag-row,
.mini-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
}

.hero-badges span,
.tag-pill,
.mini-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hero-badges span:first-child {
    background: var(--red);
}

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

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

.btn-primary {
    color: #fff;
    background: linear-gradient(90deg, var(--red), var(--pink));
    box-shadow: 0 14px 28px rgba(220, 38, 38, 0.28);
}

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

.btn-primary.small {
    min-height: 42px;
    white-space: nowrap;
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 6;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-50%) scale(1.04);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

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

.inner-page {
    padding-top: 36px;
    padding-bottom: 56px;
}

.content-section {
    margin: 44px 0;
}

.section-card,
.gradient-panel,
.catalog-panel,
.detail-info-card,
.side-card,
.player-card {
    border-radius: 24px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.section-card,
.gradient-panel {
    padding: 28px;
}

.gradient-panel {
    background: linear-gradient(135deg, #eff6ff, #faf5ff);
}

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

.section-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--red);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.section-head h2,
.page-hero h1,
.detail-info-card h1 {
    margin: 0;
    color: #111827;
}

.section-head h2 {
    font-size: clamp(24px, 3vw, 34px);
}

.section-link {
    color: var(--red);
    min-height: auto;
    padding: 0;
}

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

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

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

.movie-card {
    min-width: 0;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 22px 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 18px 40px rgba(15, 23, 42, 0.16);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #374151);
}

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

.movie-card:hover .poster-wrap img {
    transform: scale(1.06);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.54), transparent 54%);
    opacity: 0.82;
}

.quality-badge,
.rank-badge {
    position: absolute;
    top: 10px;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 900;
    color: #fff;
}

.quality-badge {
    left: 10px;
    background: var(--red);
}

.rank-badge {
    right: 10px;
    background: rgba(17, 24, 39, 0.72);
    backdrop-filter: blur(10px);
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.88);
    width: 50px;
    height: 50px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    background: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.35;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.movie-line {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-card p {
    margin: 0 0 10px;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mini-tags span {
    color: #4b5563;
    background: #f3f4f6;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    backdrop-filter: none;
}

.wide-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    min-height: 180px;
}

.wide-card .poster-wrap {
    aspect-ratio: auto;
    min-height: 180px;
}

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

.wide-card h3 {
    font-size: 18px;
    min-height: auto;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    border-radius: 22px;
    overflow: hidden;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 44px rgba(15, 23, 42, 0.22);
}

.category-card img,
.category-mask {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.category-card img {
    object-fit: cover;
    z-index: 0;
}

.category-mask {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.28));
    z-index: 1;
}

.category-card strong,
.category-card p,
.category-card div {
    position: relative;
    z-index: 2;
}

.category-card strong {
    font-size: 24px;
    margin-bottom: 8px;
}

.category-card p {
    margin: 0 0 12px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
}

.category-card div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-card div span {
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 12px;
}

.quick-search,
.catalog-panel {
    padding: 24px;
    margin: 36px 0;
}

.quick-search {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.filter-row {
    display: flex;
    gap: 12px;
    align-items: center;
    width: min(620px, 100%);
}

.multi-filter {
    width: 100%;
    display: grid;
    grid-template-columns: 1.5fr repeat(3, minmax(140px, 0.5fr));
}

input,
select {
    width: 100%;
    min-height: 46px;
    border: 1px solid #e5e7eb;
    border-radius: 13px;
    padding: 0 14px;
    font: inherit;
    color: #111827;
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
    border-color: rgba(220, 38, 38, 0.45);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

.empty-state {
    display: none;
    margin: 16px 0 0;
    color: var(--muted);
    font-weight: 700;
}

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

.page-hero {
    padding: 42px;
    border-radius: 28px;
    color: #fff;
    background: radial-gradient(circle at top left, rgba(239, 68, 68, 0.9), rgba(124, 58, 237, 0.9)), linear-gradient(135deg, #111827, #1f2937);
    box-shadow: var(--shadow);
}

.compact-hero p,
.category-hero p {
    max-width: 760px;
    margin: 14px 0 0;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.82);
}

.page-hero .section-kicker {
    color: rgba(255, 255, 255, 0.86);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    margin-bottom: 18px;
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: var(--red);
}

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

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

.player-card {
    padding: 12px;
    background: #0f172a;
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    overflow: hidden;
    background: #000;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.54));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
    width: 76px;
    height: 76px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    font-size: 30px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
}

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

.player-message {
    position: absolute;
    left: 18px;
    bottom: 18px;
    border-radius: 12px;
    padding: 10px 12px;
    color: #fff;
    background: rgba(17, 24, 39, 0.72);
    display: none;
}

.player-message.show {
    display: block;
}

.detail-info-card {
    padding: 28px;
}

.detail-info-card h1 {
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
}

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

.detail-meta span {
    border-radius: 999px;
    padding: 8px 12px;
    color: #4b5563;
    background: #f3f4f6;
    font-weight: 800;
    font-size: 13px;
}

.lead-text {
    color: #374151;
    font-size: 18px;
    line-height: 1.8;
    margin: 0 0 24px;
}

.detail-info-card section {
    margin-top: 26px;
}

.detail-info-card h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.detail-info-card section p {
    margin: 0;
    color: #374151;
    line-height: 1.9;
}

.tag-pill {
    color: #991b1b;
    background: #fee2e2;
    backdrop-filter: none;
}

.detail-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 30px;
}

.detail-pager a {
    border-radius: 16px;
    padding: 14px;
    background: #f9fafb;
    color: #374151;
    font-weight: 800;
}

.detail-pager a:last-child {
    text-align: right;
}

.detail-pager a:hover {
    color: var(--red);
    background: #fff1f2;
}

.detail-side {
    display: grid;
    gap: 20px;
    position: sticky;
    top: 92px;
}

.side-card {
    padding: 20px;
}

.poster-side {
    overflow: hidden;
    padding: 0;
}

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

.poster-side div {
    padding: 18px;
    display: grid;
    gap: 6px;
}

.poster-side strong {
    font-size: 20px;
}

.poster-side span {
    color: var(--muted);
}

.side-links {
    display: grid;
    gap: 10px;
}

.side-links a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: #f9fafb;
    color: #374151;
    font-weight: 800;
}

.side-links a:hover {
    color: var(--red);
    background: #fff1f2;
}

.side-links span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-links em {
    font-style: normal;
    color: var(--muted);
}

.site-footer {
    border-top: 1px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.78);
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: #6b7280;
    flex-wrap: wrap;
}

.footer-brand {
    color: #111827;
    font-size: 18px;
    font-weight: 900;
}

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-links a:hover {
    color: var(--red);
}

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

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

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

    .desktop-nav {
        gap: 12px;
    }
}

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

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

    .hero-carousel {
        height: 72vh;
        min-height: 560px;
    }

    .hero-title-block {
        top: 74px;
    }

    .hero-content {
        bottom: 72px;
    }

    .hero-arrow {
        display: none;
    }

    .quick-search {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-row,
    .multi-filter {
        width: 100%;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

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

    .movie-list-grid {
        grid-template-columns: 1fr;
    }

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

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

    .detail-side {
        position: static;
        grid-template-columns: 1fr;
    }

    .poster-side {
        display: none;
    }
}

@media (max-width: 640px) {
    .brand-text em {
        display: none;
    }

    .brand-text strong {
        font-size: 17px;
    }

    .hero-carousel {
        min-height: 600px;
    }

    .hero-title-block h1 {
        font-size: 25px;
    }

    .hero-content h2 {
        font-size: 42px;
    }

    .hero-content p {
        font-size: 16px;
        -webkit-line-clamp: 3;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .page-shell {
        width: min(100% - 22px, 1280px);
    }

    .section-card,
    .gradient-panel,
    .catalog-panel,
    .detail-info-card,
    .page-hero {
        padding: 20px;
        border-radius: 20px;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .wide-card {
        grid-template-columns: 96px 1fr;
        min-height: 146px;
    }

    .wide-card .poster-wrap {
        min-height: 146px;
    }

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

    .detail-pager a:last-child {
        text-align: left;
    }
}
