:root {
    --color-primary: #e11d48;
    --color-primary-dark: #9f1239;
    --color-accent: #ef4444;
    --color-text: #111827;
    --color-muted: #6b7280;
    --color-soft: #fff1f2;
    --color-line: #ffe4e6;
    --color-card: #ffffff;
    --shadow-soft: 0 18px 50px rgba(190, 18, 60, 0.14);
    --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.10);
    --radius-large: 28px;
    --radius-card: 20px;
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #fff7f8 0%, #ffffff 38%, #fff8f8 100%);
    color: var(--color-text);
    line-height: 1.7;
}

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.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 228, 230, 0.9);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 24px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--color-primary-dark);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.logo-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(225, 29, 72, 0.25);
}

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

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

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary-dark);
    background: #ffe4e6;
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #fff1f2;
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: var(--color-primary-dark);
    border-radius: 2px;
}

.hero-carousel {
    position: relative;
    overflow: hidden;
    min-height: 680px;
    color: #ffffff;
    background: #111827;
}

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

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.08);
    filter: saturate(1.15);
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 18%, rgba(244, 63, 94, 0.42), transparent 28%),
        linear-gradient(105deg, rgba(17, 24, 39, 0.94) 0%, rgba(127, 29, 29, 0.72) 52%, rgba(17, 24, 39, 0.36) 100%);
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.55fr);
    align-items: center;
    gap: 56px;
    min-height: 680px;
    padding: 88px 0;
}

.hero-copy {
    max-width: 740px;
}

.eyebrow {
    margin: 0 0 14px;
    color: #fecdd3;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.06;
    letter-spacing: -0.07em;
}

.hero-copy h2 {
    margin: 24px 0 12px;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.12;
}

.hero-summary,
.page-hero p,
.detail-one-line {
    max-width: 720px;
    margin: 0 0 22px;
    color: #ffe4e6;
    font-size: 18px;
}

.hero-tags,
.detail-meta,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.hero-tags span,
.detail-meta span,
.detail-tags span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 26px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(225, 29, 72, 0.34);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.36);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.ghost-button.dark {
    color: var(--color-primary-dark);
    border-color: #fecdd3;
    background: #ffffff;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-soft);
    min-height: 500px;
    background: rgba(255, 255, 255, 0.16);
}

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

.hero-poster:hover img {
    transform: scale(1.05);
}

.hero-poster span {
    position: absolute;
    left: 20px;
    bottom: 20px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-primary-dark);
    font-weight: 900;
}

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

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

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

.search-strip {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: -36px;
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
}

.global-search,
.filter-controls {
    display: flex;
    gap: 12px;
    width: 100%;
}

.global-search input,
.filter-controls input,
.filter-controls select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #fecdd3;
    border-radius: 999px;
    background: #ffffff;
    padding: 0 18px;
    color: var(--color-text);
    outline: none;
}

.filter-controls select {
    max-width: 180px;
}

.global-search button {
    min-width: 110px;
    border: 0;
    border-radius: 999px;
    background: var(--color-primary);
    color: #ffffff;
    font-weight: 900;
    cursor: pointer;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    white-space: nowrap;
}

.quick-links a {
    padding: 9px 13px;
    border-radius: 999px;
    background: #fff1f2;
    color: var(--color-primary-dark);
    font-weight: 800;
}

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

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

.section-title p {
    margin: 0 0 4px;
    color: var(--color-primary);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-title h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: -0.05em;
}

.section-title a {
    color: var(--color-primary-dark);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-card);
    background: var(--color-card);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111827;
}

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

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

.cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(17, 24, 39, 0.82) 100%);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 900;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-primary-dark);
}

.rank-badge {
    left: 12px;
    top: 12px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #ffffff;
}

.movie-info {
    padding: 16px;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 800;
}

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

.movie-info h2 a:hover {
    color: var(--color-primary);
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span,
.tag-row a {
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff1f2;
    color: var(--color-primary-dark);
    font-size: 12px;
    font-weight: 900;
}

.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-tile {
    display: block;
    min-height: 150px;
    padding: 24px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(244, 63, 94, 0.18), transparent 38%),
        #ffffff;
    border: 1px solid var(--color-line);
    box-shadow: 0 8px 28px rgba(225, 29, 72, 0.08);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: #fda4af;
}

.category-tile span {
    color: var(--color-primary-dark);
    font-size: 22px;
    font-weight: 900;
}

.category-tile p {
    margin: 10px 0 0;
    color: var(--color-muted);
}

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

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

.ranking-panel {
    position: sticky;
    top: 98px;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(180deg, #9f1239, #e11d48);
    color: #ffffff;
    box-shadow: var(--shadow-soft);
}

.ranking-panel .section-title p,
.ranking-panel .section-title a {
    color: #fecdd3;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 8px 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
}

.ranking-item span {
    grid-row: span 2;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #ffffff;
    color: var(--color-primary-dark);
    font-weight: 900;
}

.ranking-item strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ranking-item em {
    color: #ffe4e6;
    font-size: 13px;
    font-style: normal;
}

.page-hero {
    padding: 86px 0;
    background:
        radial-gradient(circle at 84% 18%, rgba(244, 63, 94, 0.24), transparent 32%),
        linear-gradient(135deg, #9f1239, #e11d48 58%, #ef4444);
    color: #ffffff;
}

.page-hero.simple-hero,
.page-hero.category-hero,
.page-hero.ranking-hero {
    border-bottom-left-radius: 36px;
    border-bottom-right-radius: 36px;
}

.ranking-hero-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

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

.filter-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 18px;
}

.filter-heading h2 {
    margin: 0;
    font-size: 28px;
}

.filter-heading p {
    margin: 0;
    color: var(--color-muted);
}

.filter-controls {
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--color-line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(225, 29, 72, 0.08);
}

.empty-state {
    display: none;
    padding: 30px;
    border-radius: 20px;
    background: #fff1f2;
    color: var(--color-primary-dark);
    text-align: center;
    font-weight: 900;
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 70px 0;
    background:
        radial-gradient(circle at top left, rgba(244, 63, 94, 0.22), transparent 30%),
        linear-gradient(135deg, #111827 0%, #7f1d1d 55%, #111827 100%);
    color: #ffffff;
}

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

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow-soft);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: #fecdd3;
    font-weight: 800;
}

.detail-tags span {
    background: rgba(255, 255, 255, 0.12);
}

.player-section {
    margin-top: 46px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow-card);
    aspect-ratio: 16 / 9;
}

.movie-video {
    display: block;
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background:
        linear-gradient(135deg, rgba(17, 24, 39, 0.72), rgba(127, 29, 29, 0.42)),
        var(--player-poster) center / cover;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--color-primary-dark);
    padding: 14px 22px 14px 14px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.play-button span {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #ffffff;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
    gap: 24px;
    margin-top: 34px;
}

.story-card {
    padding: 28px;
    border: 1px solid var(--color-line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(225, 29, 72, 0.08);
}

.story-card h2 {
    margin: 0 0 12px;
    color: var(--color-primary-dark);
    font-size: 24px;
}

.story-card p {
    margin: 0;
    color: #374151;
    font-size: 16px;
}

.accent-card {
    background: #fff1f2;
}

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

.compact.movie-card .movie-info p {
    min-height: 44px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 30px;
    padding: 52px 0;
}

.footer-logo {
    color: #ffffff;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

.site-footer p {
    margin: 12px 0 0;
    color: #9ca3af;
}

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

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

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

.footer-bottom p {
    margin: 0;
}

@media (max-width: 1100px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .hero-poster {
        max-width: 420px;
    }

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

    .ranking-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .menu-button {
        display: block;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--color-line);
        border-radius: 18px;
        background: #ffffff;
        box-shadow: var(--shadow-card);
    }

    .site-nav.is-open {
        display: flex;
    }

    .nav-link {
        border-radius: 14px;
    }

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

    .hero-poster {
        display: none;
    }

    .search-strip,
    .ranking-hero-inner,
    .filter-heading,
    .filter-controls,
    .global-search {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-controls select {
        max-width: none;
    }

    .movie-grid,
    .category-grid,
    .category-grid.large,
    .split-layout .movie-grid,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .detail-poster {
        max-width: 330px;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .header-inner {
        min-height: 68px;
    }

    .logo {
        font-size: 18px;
    }

    .logo-mark {
        width: 34px;
        height: 34px;
    }

    .site-nav {
        top: 68px;
    }

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

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

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

    .movie-grid,
    .category-grid,
    .category-grid.large,
    .split-layout .movie-grid,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-block {
        padding-top: 48px;
    }

    .page-hero,
    .detail-hero {
        padding: 56px 0;
    }

    .story-card {
        padding: 22px;
    }
}
