:root {
    color-scheme: light;
    --red: #dc2626;
    --red-dark: #b91c1c;
    --pink: #db2777;
    --stone-950: #1c1917;
    --stone-900: #292524;
    --stone-800: #44403c;
    --stone-700: #57534e;
    --stone-600: #78716c;
    --stone-500: #8b817c;
    --stone-300: #d6d3d1;
    --stone-200: #e7e5e4;
    --stone-100: #f5f5f4;
    --stone-50: #fafaf9;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(41, 37, 36, 0.12);
    --shadow-soft: 0 10px 30px rgba(41, 37, 36, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--stone-50);
    color: var(--stone-900);
    line-height: 1.65;
}

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

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

button,
input,
select {
    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.92);
    border-bottom: 1px solid rgba(231, 229, 228, 0.9);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 22px;
    white-space: nowrap;
    color: var(--stone-950);
}

.brand.dark {
    color: var(--white);
}

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--red), var(--pink));
    color: var(--white);
    box-shadow: 0 10px 22px rgba(220, 38, 38, 0.28);
    font-size: 15px;
}

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

.nav-link {
    color: var(--stone-700);
    font-weight: 650;
    transition: color 0.2s ease;
}

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

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--stone-100);
    border: 1px solid var(--stone-200);
    border-radius: 999px;
    padding: 5px;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--stone-900);
}

.header-search input {
    width: 160px;
    padding: 8px 10px 8px 14px;
}

.header-search button,
.mobile-search button {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--red), var(--pink));
    color: var(--white);
    padding: 8px 14px;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    border: 0;
    background: var(--stone-100);
    color: var(--stone-900);
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12px 0 18px;
    border-top: 1px solid var(--stone-200);
}

.hero {
    position: relative;
    height: 72vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--stone-900);
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.48) 45%, rgba(0, 0, 0, 0.18));
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1180px) / 2));
    right: 32px;
    bottom: 72px;
    max-width: 760px;
    color: var(--white);
}

.eyebrow {
    margin: 0 0 12px;
    color: #fecaca;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-desc,
.page-hero p,
.detail-copy p {
    max-width: 760px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2.4vw, 22px);
}

.hero-tags,
.tag-line,
.meta-line,
.mini-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-tags {
    margin-top: 22px;
}

.hero-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.17);
    color: var(--white);
    backdrop-filter: blur(14px);
}

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

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 13px 24px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px) scale(1.01);
}

.btn.primary,
.btn.slim {
    background: linear-gradient(135deg, var(--red), var(--pink));
    color: var(--white);
    box-shadow: 0 14px 24px rgba(220, 38, 38, 0.28);
}

.btn.ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
}

.btn.slim {
    padding: 9px 18px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: var(--white);
    font-size: 34px;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-arrow.prev {
    left: 18px;
}

.hero-arrow.next {
    right: 18px;
}

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

.hero-dots button {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
}

.hero-dots button.active {
    background: var(--white);
}

.home-flow {
    padding: 56px 0 72px;
    display: grid;
    gap: 70px;
}

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

.section-head div {
    display: grid;
    gap: 7px;
}

.section-icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--red), var(--pink));
}

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-head p {
    margin: 0;
    color: var(--stone-600);
}

.grid {
    display: grid;
    gap: 22px;
}

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

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

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

.movie-card {
    background: var(--white);
    border: 1px solid rgba(231, 229, 228, 0.85);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #7f1d1d, #831843 45%, #292524);
}

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

.movie-card:hover .poster img,
.detail-cover:hover img,
.ranking-poster:hover img {
    transform: scale(1.06);
}

.play-dot {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--white);
    font-size: 42px;
    background: rgba(0, 0, 0, 0.28);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .play-dot {
    opacity: 1;
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red), var(--pink));
    color: var(--white);
    font-weight: 900;
}

.card-info {
    padding: 18px;
}

.movie-card h2 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h2 a:hover,
.ranking-info h2 a:hover,
.overview-links a:hover,
.text-link:hover {
    color: var(--red);
}

.movie-card p {
    display: -webkit-box;
    min-height: 52px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--stone-600);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.meta-line,
.mini-meta {
    color: var(--stone-600);
    font-size: 13px;
}

.meta-line span,
.mini-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    background: var(--stone-100);
}

.tag-line {
    margin-top: 12px;
}

.tag-line span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    color: var(--red-dark);
    background: #fee2e2;
    font-size: 12px;
    font-weight: 700;
}

.movie-card.compact {
    box-shadow: none;
    background: transparent;
    border: 0;
}

.movie-card.compact .poster {
    border-radius: var(--radius-md);
    margin-bottom: 10px;
}

.movie-card.compact h2 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 15px;
}

.movie-card.compact:hover {
    transform: none;
    box-shadow: none;
}

.movie-card.horizontal {
    display: grid;
    grid-template-columns: 220px 1fr;
}

.movie-card.horizontal .poster-wide {
    height: 100%;
    aspect-ratio: auto;
}

.soft-band {
    margin-inline: -24px;
    padding: 42px 24px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #fff1f2, #fdf2f8);
}

.dark-band {
    margin-inline: -24px;
    padding: 42px 24px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--stone-950), var(--stone-800));
    color: var(--white);
}

.dark-band .section-head p,
.dark-band .movie-card p,
.dark-band .meta-line {
    color: rgba(255, 255, 255, 0.72);
}

.dark-band .movie-card {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--white);
}

.panel {
    padding: 32px;
    border-radius: var(--radius-xl);
    background: var(--white);
    border: 1px solid var(--stone-200);
    box-shadow: var(--shadow-soft);
}

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

.category-tile {
    display: grid;
    gap: 9px;
    min-height: 162px;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #fff7ed, #fff1f2);
    border: 1px solid #fed7d7;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile span {
    color: var(--red-dark);
    font-weight: 800;
}

.category-tile strong {
    font-size: 18px;
}

.category-tile p {
    margin: 0;
    color: var(--stone-600);
    font-size: 14px;
}

.category-tile.single {
    min-height: 0;
}

.editor-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 24px;
}

.page-main {
    min-height: 70vh;
}

.page-hero,
.detail-hero {
    background: radial-gradient(circle at top left, rgba(220, 38, 38, 0.92), rgba(219, 39, 119, 0.85) 32%, #1c1917 82%);
    color: var(--white);
}

.compact-hero {
    padding: 74px max(32px, calc((100vw - 1180px) / 2));
}

.compact-hero h1 {
    max-width: 880px;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    color: rgba(255, 255, 255, 0.8);
}

.crumbs a:hover {
    color: var(--white);
}

.overview-grid {
    display: grid;
    gap: 22px;
    padding: 48px 0 70px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    padding: 20px;
    border-radius: var(--radius-xl);
    background: var(--white);
    border: 1px solid var(--stone-200);
    box-shadow: var(--shadow-soft);
}

.overview-cover {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #7f1d1d, #831843);
}

.overview-cover img,
.ranking-poster img,
.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.category-overview-card h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.category-overview-card p {
    margin: 0 0 16px;
    color: var(--stone-600);
}

.overview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.overview-links a,
.text-link {
    color: var(--red-dark);
    font-weight: 800;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 42px 0 24px;
    padding: 14px;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid var(--stone-200);
    box-shadow: var(--shadow-soft);
}

.filter-bar input,
.filter-bar select {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--stone-100);
}

.filter-search {
    flex: 1 1 260px;
}

.catalog-grid {
    padding-bottom: 72px;
}

.ranking-container {
    padding-bottom: 72px;
}

.ranking-list {
    display: grid;
    gap: 14px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 52px 150px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: var(--white);
    border: 1px solid var(--stone-200);
    box-shadow: var(--shadow-soft);
}

.ranking-index {
    font-size: 28px;
    font-weight: 900;
    color: var(--red);
    text-align: center;
}

.ranking-poster {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #7f1d1d, #831843);
}

.ranking-info h2 {
    margin: 0 0 8px;
    font-size: 21px;
}

.ranking-info p {
    margin: 0 0 12px;
    color: var(--stone-600);
}

.detail-hero {
    padding: 58px 0;
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    align-items: center;
    gap: 42px;
}

.detail-copy .crumbs {
    margin: 0 0 24px;
}

.detail-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    background: linear-gradient(135deg, #7f1d1d, #831843);
}

.detail-cover span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--white);
    font-size: 64px;
    background: rgba(0, 0, 0, 0.28);
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    padding: 42px 0 72px;
}

.detail-main,
.detail-side {
    display: grid;
    gap: 24px;
    align-content: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--stone-950);
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: var(--stone-950);
    object-fit: contain;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.16));
    color: var(--white);
    cursor: pointer;
    transition: opacity 0.25s ease;
}

.player-start span {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red), var(--pink));
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.26);
    font-size: 42px;
    padding-left: 6px;
}

.player-shell.is-playing .player-start {
    opacity: 0;
    pointer-events: none;
}

.content-card,
.side-card {
    padding: 28px;
    border-radius: var(--radius-xl);
    background: var(--white);
    border: 1px solid var(--stone-200);
    box-shadow: var(--shadow-soft);
}

.content-card h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.content-card p {
    margin: 0 0 24px;
    color: var(--stone-700);
}

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

.info-list div {
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--stone-100);
}

.info-list dt {
    color: var(--stone-600);
    font-size: 13px;
}

.info-list dd {
    margin: 4px 0 0;
    font-weight: 800;
}

.detail-tags {
    margin-top: 24px;
}

.related-wrap .movie-card.compact .poster {
    aspect-ratio: 4 / 3;
}

.site-footer {
    background: var(--stone-950);
    color: rgba(255, 255, 255, 0.78);
}

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

.footer-brand p {
    max-width: 460px;
    margin: 18px 0 0;
}

.footer-col h2 {
    margin: 0 0 16px;
    color: var(--white);
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 9px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    padding: 18px;
    color: rgba(255, 255, 255, 0.62);
}

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 60;
    display: none;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red), var(--pink));
    color: var(--white);
    font-weight: 900;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.back-to-top.show {
    display: block;
}

.hidden-card {
    display: none !important;
}

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

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

    .mobile-nav.open {
        display: grid;
        gap: 12px;
    }

    .mobile-search {
        display: flex;
        gap: 8px;
        margin-top: 10px;
    }

    .mobile-search input {
        flex: 1;
        padding: 11px 14px;
        border-radius: 999px;
        background: var(--stone-100);
    }

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

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

    .detail-cover {
        max-width: 320px;
    }
}

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

    .brand {
        font-size: 18px;
    }

    .hero {
        height: 78vh;
        min-height: 620px;
    }

    .hero-content {
        left: 20px;
        right: 20px;
        bottom: 78px;
    }

    .hero-arrow {
        width: 40px;
        height: 40px;
        font-size: 26px;
    }

    .grid.two,
    .grid.three,
    .grid.four,
    .category-grid,
    .editor-grid {
        grid-template-columns: 1fr;
    }

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

    .movie-card.horizontal,
    .category-overview-card,
    .ranking-row {
        grid-template-columns: 1fr;
    }

    .movie-card.horizontal .poster-wide {
        aspect-ratio: 16 / 9;
    }

    .soft-band,
    .dark-band {
        margin-inline: 0;
    }

    .panel,
    .content-card,
    .side-card {
        padding: 22px;
    }

    .compact-hero {
        padding: 52px 20px;
    }

    .page-hero p,
    .detail-copy p {
        font-size: 17px;
    }

    .filter-bar {
        border-radius: var(--radius-lg);
    }

    .filter-bar input,
    .filter-bar select {
        width: 100%;
    }

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

@media (max-width: 480px) {
    .grid.four.catalog-grid {
        grid-template-columns: 1fr;
    }

    .hero h1,
    .hero h2,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 36px;
    }
}
