:root {
    --red: #ef4444;
    --red-dark: #dc2626;
    --orange: #f97316;
    --yellow: #f59e0b;
    --green: #10b981;
    --text: #111827;
    --muted: #6b7280;
    --soft: #f9fafb;
    --line: #e5e7eb;
    --card: #ffffff;
    --shadow: 0 18px 50px rgba(17, 24, 39, 0.10);
    --shadow-soft: 0 10px 25px rgba(17, 24, 39, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

button,
input {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(17, 24, 39, 0.08), 0 8px 28px rgba(17, 24, 39, 0.05);
}

.nav-wrap {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: #fff;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
    font-size: 13px;
}

.brand-text {
    font-size: 21px;
    letter-spacing: -0.04em;
}

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

.nav-link {
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    color: #4b5563;
    font-weight: 650;
    transition: 0.2s ease;
}

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

.top-search {
    width: min(330px, 30vw);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 5px 16px rgba(17, 24, 39, 0.04);
}

.top-search input,
.search-page-form input {
    width: 100%;
    border: 0;
    outline: 0;
    min-width: 0;
    background: transparent;
    padding: 8px 10px;
    color: var(--text);
}

.top-search button,
.search-page-form button {
    border: 0;
    color: #fff;
    background: var(--red);
    border-radius: 999px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.2s ease;
}

.top-search button:hover,
.search-page-form button:hover {
    background: var(--red-dark);
}

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

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 12px 16px 18px;
    background: #fff;
}

.mobile-panel a {
    display: block;
    padding: 12px;
    border-radius: 12px;
    color: #374151;
    font-weight: 700;
}

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

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

.hero-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #fff7ed 0%, #fff1f2 50%, #fefce8 100%);
}

.hero-bg::before,
.hero-bg::after {
    content: "";
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    filter: blur(55px);
    opacity: 0.28;
}

.hero-bg::before {
    top: -120px;
    left: -80px;
    background: #fb7185;
}

.hero-bg::after {
    right: -70px;
    bottom: -130px;
    background: #fdba74;
}

.hero-shell {
    position: relative;
    padding: 72px 0 42px;
}

.hero-slider {
    min-height: 520px;
    position: relative;
}

.hero-slide {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.95fr);
    gap: 46px;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition: opacity 0.45s ease, transform 0.45s ease;
    position: absolute;
    inset: 0;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: var(--red);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.eyebrow.orange {
    color: var(--orange);
}

.eyebrow.green {
    color: var(--green);
}

.white-text {
    color: rgba(255, 255, 255, 0.88);
}

.hero-copy h1 {
    margin: 0;
    max-width: 720px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero-desc {
    max-width: 680px;
    margin: 24px 0 0;
    color: #4b5563;
    font-size: 19px;
    line-height: 1.8;
}

.tag-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.tag-strip span,
.detail-meta span,
.detail-meta a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    color: #374151;
    box-shadow: 0 1px 0 rgba(17, 24, 39, 0.04);
    font-size: 14px;
    font-weight: 700;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.2s ease;
}

.btn.primary {
    color: #fff;
    background: var(--red);
    box-shadow: 0 14px 30px rgba(239, 68, 68, 0.28);
}

.btn.primary:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
}

.btn.ghost {
    color: #374151;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-soft);
}

.btn.ghost:hover {
    transform: translateY(-2px);
    background: #fff;
}

.hero-visual {
    min-height: 430px;
    border-radius: 28px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.02)), var(--poster-image), linear-gradient(135deg, #ef4444, #f97316);
    background-size: cover;
    background-position: center;
    color: #fff;
    box-shadow: 0 28px 60px rgba(17, 24, 39, 0.22);
    transition: transform 0.35s ease;
}

.hero-visual:hover {
    transform: scale(1.02) rotate(0.3deg);
}

.hero-badge,
.poster-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    color: #fff;
    background: var(--red);
    font-size: 13px;
    font-weight: 800;
}

.hero-visual-title {
    display: block;
    margin-top: 16px;
    font-size: 26px;
    line-height: 1.25;
    font-weight: 800;
}

.hero-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
}

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

.hero-dot {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.22);
    cursor: pointer;
    transition: 0.2s ease;
}

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

.hero-arrows {
    display: flex;
    gap: 10px;
}

.hero-arrows button {
    border: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    color: var(--red);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.stats-band {
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding: 28px 0;
}

.stats-grid a {
    display: block;
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, #fff1f2, #fff7ed);
    transition: 0.2s ease;
}

.stats-grid a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
}

.stats-grid strong {
    display: block;
    margin-bottom: 5px;
    color: var(--red);
    font-size: 22px;
}

.stats-grid span {
    color: var(--muted);
    font-weight: 650;
}

.section-block {
    padding: 70px 0;
}

.section-block.light {
    background: #f9fafb;
}

.section-block.white {
    background: #fff;
}

.section-block.gradient {
    background: linear-gradient(135deg, #fff7ed, #fff1f2);
}

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

.section-head.compact {
    align-items: center;
}

.section-head.centered {
    justify-content: center;
    text-align: center;
}

.section-head h2,
.category-panel h2,
.detail-article h2,
.detail-side h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(26px, 4vw, 34px);
    letter-spacing: -0.04em;
}

.more-link {
    color: var(--red);
    font-weight: 800;
}

.more-link:hover {
    color: var(--red-dark);
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 0 rgba(17, 24, 39, 0.08), 0 12px 28px rgba(17, 24, 39, 0.07);
    transition: 0.25s ease;
}

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

.poster,
.row-poster,
.side-cover {
    position: relative;
    background-image: linear-gradient(135deg, rgba(239, 68, 68, 0.48), rgba(249, 115, 22, 0.42)), var(--poster-image);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.poster {
    display: block;
    aspect-ratio: 16 / 10;
}

.poster::after,
.row-poster::after,
.side-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.46), transparent 58%);
}

.poster-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 2;
    border-radius: 8px;
    padding: 4px 9px;
    font-size: 12px;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 16px;
    flex: 1;
}

.card-title,
.row-title {
    color: var(--text);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
}

.movie-card:hover .card-title,
.movie-row:hover .row-title {
    color: var(--red);
}

.card-desc,
.row-desc {
    color: #5f6673;
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta,
.row-meta {
    margin-top: auto;
    color: #8b95a1;
    font-size: 13px;
    font-weight: 650;
}

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

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

.row-list {
    display: grid;
    gap: 16px;
}

.row-list.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.movie-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    border-radius: 18px;
    background: #fff;
    padding: 12px;
    box-shadow: 0 1px 0 rgba(17, 24, 39, 0.08), 0 8px 22px rgba(17, 24, 39, 0.06);
    transition: 0.2s ease;
}

.movie-row:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
}

.row-poster {
    min-height: 96px;
    border-radius: 14px;
}

.row-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 8px;
    padding: 4px 0;
}

.rank-no,
.list-rank {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 10px;
    min-width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    font-weight: 900;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) 360px;
    gap: 36px;
    align-items: start;
}

.category-panel {
    position: sticky;
    top: 92px;
    padding: 28px;
    border-radius: 24px;
    background: linear-gradient(135deg, #fff, #fff7ed);
    box-shadow: var(--shadow-soft);
}

.pill-cloud,
.filter-bar,
.detail-tag-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.pill,
.filter-chip,
.detail-tag-links a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid #fee2e2;
    color: #b91c1c;
    background: #fff1f2;
    font-weight: 760;
    transition: 0.2s ease;
}

.pill.light {
    color: #9a3412;
    background: #ffedd5;
    border-color: #fed7aa;
}

.pill:hover,
.filter-chip:hover,
.filter-chip.active,
.detail-tag-links a:hover {
    color: #fff;
    border-color: var(--red);
    background: var(--red);
}

.page-hero {
    padding: 64px 0;
    color: #fff;
}

.page-hero.red {
    background: linear-gradient(135deg, var(--red), var(--orange));
}

.page-hero.orange {
    background: linear-gradient(135deg, var(--orange), #ec4899);
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 6vw, 56px);
    letter-spacing: -0.06em;
}

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

.search-hero-content {
    max-width: 880px;
}

.search-page-form {
    display: flex;
    gap: 10px;
    margin-top: 26px;
    padding: 8px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.14);
}

.filter-chip {
    border: 0;
    cursor: pointer;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 36px;
}

.page-link {
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #374151;
    background: #fff;
    border: 1px solid var(--line);
    font-weight: 750;
}

.page-link:hover,
.page-link.active {
    color: #fff;
    background: var(--red);
    border-color: var(--red);
}

.detail-hero {
    padding: 46px 0;
    background: radial-gradient(circle at 20% 0%, rgba(248, 113, 113, 0.36), transparent 32%), linear-gradient(135deg, #111827, #7f1d1d 55%, #f97316);
    color: #fff;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 34px;
    align-items: center;
}

.player-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

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

.player-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.24));
}

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

.play-symbol {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding-left: 5px;
    color: var(--red);
    background: #fff;
    font-size: 34px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.player-layer strong {
    font-size: 18px;
    letter-spacing: 0.1em;
}

.detail-copy h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.detail-lead {
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.85;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.detail-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: none;
}

.detail-content-block {
    padding-top: 54px;
}

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

.detail-article,
.detail-side {
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.detail-article {
    padding: 34px;
}

.detail-article h2 {
    margin-top: 0;
    margin-bottom: 14px;
}

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

.detail-article p {
    margin: 0;
    color: #374151;
    font-size: 17px;
    line-height: 2;
}

.detail-side {
    position: sticky;
    top: 92px;
    overflow: hidden;
    padding-bottom: 24px;
}

.side-cover {
    aspect-ratio: 16 / 10;
}

.detail-side h2 {
    padding: 22px 24px 12px;
    font-size: 24px;
}

.detail-side dl {
    margin: 0;
    padding: 0 24px;
}

.detail-side div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 13px 0;
    border-top: 1px solid var(--line);
}

.detail-side dt {
    color: #9ca3af;
    font-weight: 800;
}

.detail-side dd {
    margin: 0;
    color: #374151;
    font-weight: 700;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 36px;
    padding: 48px 0;
}

.footer-brand {
    color: #fff;
    font-size: 20px;
}

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

.site-footer h2 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 17px;
}

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 10px 0;
    color: #d1d5db;
}

.site-footer a:hover {
    color: #fca5a5;
}

.footer-bottom {
    padding: 20px 0 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    font-size: 14px;
}

.is-filtered-out {
    display: none !important;
}

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

    .hero-slide,
    .detail-grid,
    .detail-layout,
    .split-layout {
        grid-template-columns: 1fr;
    }

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

    .hero-visual {
        min-height: 360px;
    }

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

    .category-panel,
    .detail-side {
        position: static;
    }
}

@media (max-width: 760px) {
    .nav-wrap {
        height: 62px;
    }

    .nav-links {
        display: none;
    }

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

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

    .hero-shell {
        padding: 42px 0 30px;
    }

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

    .hero-slide {
        gap: 26px;
    }

    .hero-copy h1 {
        font-size: clamp(34px, 11vw, 48px);
    }

    .hero-desc,
    .detail-lead,
    .page-hero p {
        font-size: 16px;
    }

    .hero-visual {
        min-height: 320px;
        border-radius: 22px;
    }

    .stats-grid,
    .movie-grid,
    .row-list.two-col,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .movie-row {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .row-poster {
        min-height: 112px;
    }

    .page-hero {
        padding: 46px 0;
    }

    .search-page-form {
        border-radius: 24px;
        flex-direction: column;
    }

    .pagination {
        justify-content: flex-start;
    }

    .detail-article {
        padding: 24px;
    }
}

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

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

    .hero-arrows {
        justify-content: flex-start;
    }
}
