* {
    box-sizing: border-box;
}

:root {
    --bg: #fff7fb;
    --panel: #ffffff;
    --text: #231826;
    --muted: #746474;
    --primary: #ec4899;
    --primary-dark: #be185d;
    --accent: #f472b6;
    --soft: #fdf2f8;
    --line: #f9cfe3;
    --shadow: 0 18px 45px rgba(190, 24, 93, 0.16);
    --radius: 24px;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(180deg, #fff7fb 0%, #ffffff 42%, #fff7fb 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(249, 207, 227, 0.75);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 72px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--primary-dark);
}

.logo-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #fb7185);
    box-shadow: 0 10px 24px rgba(236, 72, 153, 0.3);
}

.logo-text {
    white-space: nowrap;
    font-size: 20px;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #6b5264;
    font-weight: 600;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-dark);
    background: var(--soft);
}

.top-search,
.mobile-search,
.side-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-search input,
.side-search input,
.filter-controls input,
.filter-controls select {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    padding: 0 16px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.side-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12);
}

.top-search button,
.mobile-search button,
.side-search button,
.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 0 20px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.mobile-search button,
.side-search button,
.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #fb7185);
    box-shadow: 0 12px 25px rgba(236, 72, 153, 0.25);
}

.top-search button:hover,
.mobile-search button:hover,
.side-search button:hover,
.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
}

.ghost-btn {
    color: var(--primary-dark);
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.ghost-btn.light {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.38);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: var(--soft);
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: var(--primary-dark);
}

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

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

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.mobile-panel nav a {
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--soft);
    color: var(--primary-dark);
    font-weight: 700;
}

.hero-shell {
    position: relative;
    overflow: hidden;
    padding: 56px 0 42px;
    background:
        radial-gradient(circle at 10% 20%, rgba(244, 114, 182, 0.45), transparent 32%),
        radial-gradient(circle at 80% 0%, rgba(251, 113, 133, 0.35), transparent 28%),
        linear-gradient(135deg, #831843 0%, #be185d 42%, #f472b6 100%);
}

.hero-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(20px);
    opacity: 0.8;
}

.hero-glow.one {
    width: 220px;
    height: 220px;
    left: 8%;
    bottom: -80px;
    background: rgba(255, 255, 255, 0.25);
}

.hero-glow.two {
    width: 300px;
    height: 300px;
    right: -80px;
    top: 40px;
    background: rgba(255, 255, 255, 0.18);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 44px;
    align-items: center;
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-copy {
    color: #ffffff;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--primary-dark);
    background: #fce7f3;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-kicker {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-copy h1 {
    max-width: 760px;
    margin: 24px 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.hero-tags,
.detail-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

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

.hero-poster {
    position: relative;
    display: block;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(35, 24, 38, 0.32);
    transform: rotate(2deg);
}

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

.hero-poster span,
.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(236, 72, 153, 0.84);
    transform: translate(-50%, -50%);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.25);
}

.hero-dots {
    position: absolute;
    left: 0;
    bottom: 8px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 36px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.35);
}

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

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

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

.section-heading h2,
.filter-panel h2,
.side-card h2,
.content-card h2 {
    margin: 10px 0 8px;
    color: var(--text);
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.1;
}

.section-heading p,
.side-card p,
.content-card p,
.page-hero p,
.detail-copy p,
.movie-info p,
.rank-item p,
.category-card p,
.category-tile strong {
    color: var(--muted);
}

.section-more {
    white-space: nowrap;
    color: var(--primary-dark);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(249, 207, 227, 0.8);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 12px 35px rgba(190, 24, 93, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #fce7f3, #fff1f2);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.28s ease;
}

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    border-radius: 999px;
    padding: 4px 10px;
    color: #ffffff;
    background: rgba(190, 24, 93, 0.85);
    font-size: 12px;
    font-weight: 800;
}

.poster-play {
    width: 52px;
    height: 52px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

.movie-info {
    padding: 16px;
}

.movie-info h2 {
    display: -webkit-box;
    min-height: 52px;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--text);
    font-size: 18px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #8a7184;
    font-size: 13px;
}

.movie-meta span,
.detail-meta span {
    border-radius: 999px;
    padding: 4px 8px;
    background: #fff7fb;
}

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

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

.category-tile,
.category-card {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: var(--radius);
    background: #831843;
    box-shadow: var(--shadow);
}

.category-tile img,
.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    transition: transform 0.24s ease;
}

.category-tile:hover img,
.category-card:hover img {
    transform: scale(1.08);
}

.category-tile span,
.category-tile strong,
.category-card div {
    position: relative;
    z-index: 1;
}

.category-tile {
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 20px;
    color: #ffffff;
}

.category-tile span {
    font-size: 24px;
    font-weight: 900;
}

.category-tile strong {
    display: block;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
}

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

.category-card {
    min-height: 260px;
    padding: 28px;
    display: flex;
    align-items: end;
}

.category-card div {
    max-width: 520px;
    color: #ffffff;
}

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

.category-card p {
    color: rgba(255, 255, 255, 0.85);
}

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

.side-card,
.filter-panel,
.content-card {
    border: 1px solid rgba(249, 207, 227, 0.86);
    border-radius: var(--radius);
    background: #ffffff;
    padding: 24px;
    box-shadow: 0 12px 35px rgba(190, 24, 93, 0.08);
}

.side-search {
    margin-top: 20px;
    align-items: stretch;
    flex-direction: column;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    border: 1px solid rgba(249, 207, 227, 0.8);
    border-radius: 22px;
    background: #ffffff;
    padding: 12px;
    box-shadow: 0 8px 26px rgba(190, 24, 93, 0.06);
}

.rank-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 16px;
}

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

.rank-poster span {
    position: absolute;
    left: 6px;
    top: 6px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--primary-dark);
    font-weight: 900;
}

.rank-item h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

.rank-item p {
    display: -webkit-box;
    margin: 0 0 8px;
    overflow: hidden;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 78px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.22), transparent 32%),
        linear-gradient(135deg, #831843, #be185d 52%, #f472b6);
}

.page-hero h1 {
    margin: 16px 0 12px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1;
}

.page-hero p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.filter-panel {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    margin-bottom: 24px;
}

.filter-controls {
    display: flex;
    gap: 10px;
    width: min(560px, 100%);
}

.filter-controls input {
    flex: 1;
}

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

.detail-hero {
    padding: 34px 0 56px;
    background: #831843;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.24;
    filter: blur(10px);
    transform: scale(1.04);
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-head {
    position: relative;
    z-index: 1;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.breadcrumb strong {
    color: #ffffff;
}

.detail-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-cover {
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.22);
    border-radius: 30px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

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

.detail-copy h1 {
    margin: 16px 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.04;
}

.detail-copy p {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

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

.detail-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.detail-tags a {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.detail-copy .primary-btn {
    width: fit-content;
    margin-top: 24px;
}

.player-section {
    padding-top: 42px;
}

.video-player {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #170b14;
    box-shadow: 0 30px 80px rgba(35, 24, 38, 0.22);
}

.video-player video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #170b14;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.36), rgba(23, 11, 20, 0.66));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), #fb7185);
    box-shadow: 0 16px 35px rgba(236, 72, 153, 0.35);
    font-size: 28px;
}

.play-overlay strong {
    font-size: 18px;
}

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

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 42px 0 10px;
}

.content-card p {
    margin: 0 0 14px;
}

.prev-next {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.prev-next a,
.prev-next span {
    display: flex;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    color: var(--primary-dark);
    font-weight: 800;
}

.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 32px;
    padding: 44px 0;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--primary-dark);
    font-size: 18px;
}

.site-footer p {
    max-width: 420px;
    color: var(--muted);
}

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

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

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

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 18px;
    color: var(--muted);
    text-align: center;
}

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

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

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

    .side-card {
        order: -1;
    }
}

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

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

    .hero-container {
        min-height: 740px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .hero-poster {
        max-width: 320px;
        transform: none;
    }

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

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

    .detail-content,
    .footer-grid,
    .full-rank,
    .category-card-grid {
        grid-template-columns: 1fr;
    }

    .filter-panel {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 22px, 1200px);
    }

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

    .logo-text {
        font-size: 17px;
    }

    .hero-shell {
        padding-top: 34px;
    }

    .hero-container {
        min-height: 680px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        letter-spacing: -0.03em;
    }

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

    .movie-info {
        padding: 12px;
    }

    .movie-info h2 {
        min-height: 48px;
        font-size: 16px;
    }

    .filter-controls {
        flex-direction: column;
    }

    .rank-item {
        grid-template-columns: 78px minmax(0, 1fr);
    }

    .prev-next {
        grid-template-columns: 1fr;
    }
}
