:root {
    color-scheme: light;
    --brand: #dc2626;
    --brand-dark: #b91c1c;
    --blue: #2563eb;
    --purple: #9333ea;
    --pink: #db2777;
    --text: #111827;
    --muted: #6b7280;
    --soft: #f9fafb;
    --line: #e5e7eb;
    --dark: #111827;
    --radius: 18px;
    --shadow: 0 18px 48px rgba(17, 24, 39, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.container {
    width: min(1280px, 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);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 8px 26px rgba(17, 24, 39, 0.06);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 22px;
    color: var(--text);
    white-space: nowrap;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--pink));
    box-shadow: 0 12px 30px rgba(220, 38, 38, 0.28);
    font-size: 15px;
}

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

.nav-link,
.mobile-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #4b5563;
    font-weight: 700;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--brand);
    background: #fee2e2;
}

.header-search {
    position: relative;
    margin-left: auto;
    width: min(360px, 32vw);
}

.header-search input,
.mobile-search input,
.home-search input,
.catalog-toolbar input,
.catalog-toolbar select {
    width: 100%;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f3f4f6;
    padding: 0 18px;
    outline: none;
    color: var(--text);
    transition: 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.home-search input:focus,
.catalog-toolbar input:focus,
.catalog-toolbar select:focus {
    background: #fff;
    border-color: rgba(220, 38, 38, 0.55);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.search-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    max-height: 430px;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 8px;
    z-index: 80;
}

.search-item {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
}

.search-item:hover {
    background: #fef2f2;
}

.search-item img {
    width: 48px;
    height: 66px;
    object-fit: cover;
    border-radius: 10px;
    background: #e5e7eb;
}

.search-item strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.search-item span {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

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

.mobile-nav {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-search {
    position: relative;
    margin-top: 12px;
}

.hero-carousel {
    background: #111827;
}

.hero-stage {
    position: relative;
    min-height: 500px;
    height: min(62vw, 620px);
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.8s ease;
}

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

.hero-slide > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.12)),
        linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.08) 48%, rgba(0, 0, 0, 0.32));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 1280px;
    color: #fff;
    padding: 72px 0;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fecaca;
    background: rgba(220, 38, 38, 0.22);
    border: 1px solid rgba(254, 202, 202, 0.32);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.hero-content h1 {
    width: min(760px, 100%);
    margin: 22px 0 14px;
    font-size: clamp(36px, 5vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content h2 {
    margin: 0 0 16px;
    font-size: clamp(26px, 3.5vw, 46px);
}

.hero-content p {
    width: min(690px, 100%);
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.tag-row,
.detail-tags,
.rank-meta,
.category-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.rank-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.tag-row span {
    background: #f3f4f6;
    color: #6b7280;
}

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

.primary-btn,
.ghost-btn,
.light-more,
.section-more,
.home-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 0 20px;
    font-weight: 800;
    transition: 0.22s ease;
}

.primary-btn,
.home-search button {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--pink));
    box-shadow: 0 18px 38px rgba(220, 38, 38, 0.32);
    cursor: pointer;
}

.primary-btn:hover,
.home-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(220, 38, 38, 0.4);
}

.ghost-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

.ghost-btn.dark {
    color: var(--brand);
    border-color: #fecaca;
    background: #fff;
}

.slim-actions {
    margin-top: 20px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(0, 0, 0, 0.32);
    color: #fff;
    font-size: 40px;
    line-height: 40px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(220, 38, 38, 0.78);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.quick-search-block {
    padding: 30px 0 10px;
}

.home-search {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 16px;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow);
}

.home-search .search-panel {
    left: 16px;
    right: 110px;
    top: calc(100% + 8px);
}

.category-pills {
    margin-top: 20px;
}

.category-pills a {
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff;
    color: #4b5563;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06);
}

.category-pills a:hover {
    color: var(--brand);
    background: #fee2e2;
}

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

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

.section-head h2 {
    margin: 0 0 8px;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.02em;
}

.section-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-more {
    color: var(--brand);
    background: #fff;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06);
}

.section-more:hover {
    color: #fff;
    background: var(--brand);
}

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

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

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
    transition: 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 42px rgba(17, 24, 39, 0.15);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

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

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 50%);
    opacity: 0.78;
}

.score-badge,
.play-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.score-badge {
    left: 10px;
    top: 10px;
    min-width: 42px;
    height: 28px;
    border-radius: 999px;
    color: #fff;
    background: rgba(220, 38, 38, 0.92);
    font-weight: 900;
    font-size: 13px;
}

.play-badge {
    right: 10px;
    bottom: 10px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.card-body h3 a:hover,
.rank-info h3 a:hover,
.breadcrumb a:hover,
.side-card a:hover {
    color: var(--brand);
}

.card-meta {
    margin: 0 0 8px;
    color: #6b7280;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.card-compact .card-body h3 {
    font-size: 15px;
}

.card-compact .card-desc {
    font-size: 13px;
}

.gradient-panel {
    margin-top: 56px;
    padding: 34px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    box-shadow: var(--shadow);
}

.section-head-light h2,
.section-head-light p {
    color: #fff;
}

.light-more {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.light-grid .movie-card {
    background: rgba(255, 255, 255, 0.98);
}

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

.rank-page-grid {
    padding: 10px 0 20px;
}

.rank-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 82px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
}

.rank-num {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--pink));
    font-weight: 900;
}

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

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.rank-info p {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-meta span {
    color: var(--brand);
    background: #fee2e2;
}

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

.page-hero {
    margin-top: 30px;
    border-radius: 28px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.18), transparent 28%),
        linear-gradient(135deg, #111827, #991b1b 52%, #db2777);
    padding: clamp(32px, 5vw, 62px);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 16px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -0.04em;
}

.page-hero p {
    width: min(760px, 100%);
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.8;
    font-size: 17px;
}

.small-hero,
.category-hero,
.rank-hero {
    min-height: 260px;
    display: flex;
    align-items: center;
}

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

.category-tile {
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow);
    transition: 0.24s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
}

.tile-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    height: 190px;
    background: #111827;
}

.tile-covers img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tile-body {
    padding: 22px;
}

.tile-body h2 {
    margin: 0 0 10px;
}

.tile-body p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.7;
}

.tile-body span {
    color: var(--brand);
    font-weight: 900;
}

.catalog-toolbar {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin-top: 24px;
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
}

.breadcrumb {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding: 24px 0 14px;
    color: #6b7280;
    font-size: 14px;
}

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

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow);
}

.movie-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    cursor: pointer;
}

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

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-dim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.big-play {
    position: relative;
    z-index: 3;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--pink));
    box-shadow: 0 18px 42px rgba(220, 38, 38, 0.38);
    font-size: 34px;
    cursor: pointer;
    transition: 0.2s ease;
}

.big-play:hover {
    transform: scale(1.08);
}

.detail-card,
.side-card {
    margin-top: 18px;
    padding: 24px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
}

.detail-tags span {
    background: #fee2e2;
    color: var(--brand);
}

.detail-card h1 {
    margin: 16px 0 12px;
    font-size: clamp(30px, 4vw, 44px);
    letter-spacing: -0.03em;
}

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

.detail-card p {
    color: #374151;
    line-height: 1.9;
    font-size: 16px;
}

.lead-text {
    font-size: 18px !important;
    color: #111827 !important;
    font-weight: 700;
}

.detail-tag-row span {
    background: #f3f4f6;
    color: #4b5563;
}

.side-poster {
    overflow: hidden;
    border-radius: 22px;
    box-shadow: var(--shadow);
}

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

.side-card dl {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 12px 14px;
    margin: 0;
}

.side-card dt {
    color: #6b7280;
}

.side-card dd {
    margin: 0;
    color: #111827;
    font-weight: 700;
    line-height: 1.55;
}

.site-footer {
    margin-top: 64px;
    background: #111827;
    color: #d1d5db;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 34px 0;
}

.footer-logo {
    color: #fff;
}

.footer-inner p {
    margin: 0;
    color: #9ca3af;
}

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

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

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

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

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

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

    .hero-stage {
        min-height: 620px;
        height: auto;
    }

    .hero-content {
        padding: 96px 0 84px;
    }

    .hero-arrow {
        display: none;
    }

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

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

    .rank-grid,
    .rank-page-grid,
    .category-grid,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-side {
        display: grid;
        grid-template-columns: 220px 1fr;
        gap: 18px;
    }

    .detail-card,
    .side-card {
        margin-top: 0;
    }

    .catalog-toolbar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .container,
    .header-inner,
    .mobile-nav,
    .hero-content {
        width: min(100% - 24px, 1280px);
    }

    .site-logo,
    .footer-logo {
        font-size: 19px;
    }

    .hero-content h1 {
        font-size: 36px;
    }

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

    .hero-content p {
        font-size: 16px;
    }

    .home-search {
        grid-template-columns: 1fr;
    }

    .home-search .search-panel {
        left: 16px;
        right: 16px;
    }

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

    .gradient-panel {
        padding: 22px;
    }

    .rank-card {
        grid-template-columns: 34px 72px 1fr;
        gap: 10px;
        padding: 10px;
    }

    .rank-poster img {
        width: 72px;
        height: 98px;
    }

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

    .rank-info p {
        font-size: 13px;
    }

    .tile-covers {
        height: 140px;
    }

    .detail-side {
        display: block;
    }

    .side-card {
        margin-top: 18px;
    }

    .big-play {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
}
