:root {
    --pink: #ec4899;
    --rose: #f43f5e;
    --orange: #f97316;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #fbcfe8;
    --soft: #fff1f2;
    --white: #ffffff;
    --shadow: 0 18px 40px rgba(219, 39, 119, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #fff7fb 0%, #ffffff 28%, #fff7ed 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(251, 207, 232, 0.9);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px);
    box-shadow: 0 6px 22px rgba(244, 63, 94, 0.08);
}

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

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 24px;
    font-weight: 800;
    white-space: nowrap;
    color: transparent;
    background: linear-gradient(90deg, var(--pink), var(--rose), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
}

.logo-mark {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--pink), var(--rose));
    box-shadow: 0 10px 26px rgba(236, 72, 153, 0.35);
}

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

.desktop-nav a,
.mobile-panel a {
    font-weight: 650;
    color: #374151;
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
    color: var(--pink);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid #f9a8d4;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
}

.header-search input,
.mobile-search input {
    width: 190px;
    border: 0;
    outline: 0;
    padding: 8px 8px 8px 12px;
    color: var(--text);
    background: transparent;
}

.header-search button,
.mobile-search button,
.primary-btn,
.outline-link {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(90deg, var(--pink), var(--rose));
    box-shadow: 0 14px 26px rgba(244, 63, 94, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-btn:hover,
.outline-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(244, 63, 94, 0.34);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 14px;
    padding: 10px 12px;
    color: var(--pink);
    background: #fdf2f8;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid #fbcfe8;
    padding: 14px 16px 18px;
    background: rgba(255, 255, 255, 0.96);
}

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

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

.mobile-panel nav a {
    padding: 12px;
    border-radius: 14px;
    background: #fff7fb;
}

.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #111827;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(88, 28, 135, 0.54), rgba(244, 63, 94, 0.12));
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-text {
    width: min(670px, 100%);
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #fef3c7;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-text h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.hero-text p {
    margin: 22px 0 0;
    color: #f3f4f6;
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.8;
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 750;
}

.hero-tags span,
.detail-tags span {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

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

.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    padding: 10px 18px;
    color: #ffffff;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

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

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

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

.section {
    padding: 58px 0;
}

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

.section-title h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(26px, 3.5vw, 38px);
    line-height: 1.1;
}

.section-title p {
    margin: 9px 0 0;
    color: var(--muted);
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(251, 207, 232, 0.85);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.1;
    overflow: hidden;
    background: linear-gradient(135deg, #fce7f3, #fff7ed);
}

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

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

.play-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--pink), var(--rose));
    box-shadow: 0 14px 28px rgba(244, 63, 94, 0.35);
}

.card-body {
    padding: 17px;
}

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--pink);
    font-size: 12px;
    font-weight: 800;
}

.card-body h3 {
    margin: 10px 0 8px;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--pink);
}

.card-body p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row span {
    color: #be185d;
    background: #fdf2f8;
}

.soft-block {
    background: linear-gradient(135deg, rgba(255, 241, 242, 0.92), rgba(255, 247, 237, 0.92));
}

.blue-block {
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(245, 243, 255, 0.95));
}

.poster-rail {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scroll-snap-type: x mandatory;
}

.rail-item {
    flex: 0 0 285px;
    scroll-snap-align: start;
}

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

.category-tile,
.category-panel {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    border-radius: var(--radius);
    color: #ffffff;
    box-shadow: var(--shadow);
    background: #111827;
}

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

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

.category-tile::after,
.category-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.1), rgba(190, 24, 93, 0.86));
}

.category-tile span,
.category-tile small,
.category-panel div {
    position: relative;
    z-index: 2;
}

.category-tile {
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 22px;
}

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

.category-tile small {
    margin-top: 8px;
    color: #ffe4e6;
    font-size: 14px;
    line-height: 1.6;
}

.category-panel {
    min-height: 240px;
}

.category-panel div {
    position: absolute;
    right: 22px;
    bottom: 22px;
    left: 22px;
}

.category-panel h2 {
    margin: 0 0 8px;
    font-size: 30px;
}

.category-panel p {
    margin: 0;
    color: #ffe4e6;
    line-height: 1.7;
}

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

.rank-card {
    position: sticky;
    top: 100px;
    border: 1px solid #fbcfe8;
    border-radius: var(--radius);
    padding: 24px;
    background: linear-gradient(145deg, #ffffff, #fff1f2);
    box-shadow: var(--shadow);
}

.rank-card h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.rank-card ol {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-card li a {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 4px 10px;
    align-items: center;
    border-radius: 16px;
    padding: 10px;
    transition: background 0.2s ease;
}

.rank-card li a:hover {
    background: #fdf2f8;
}

.rank-num {
    grid-row: span 2;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--pink), var(--rose));
}

.rank-title {
    overflow: hidden;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-meta {
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.outline-link {
    display: inline-flex;
    margin-top: 20px;
}

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

.page-hero {
    padding: 82px 0;
    color: #ffffff;
}

.gradient-page-hero,
.category-hero {
    background: radial-gradient(circle at 20% 10%, rgba(251, 113, 133, 0.65), transparent 28%), linear-gradient(135deg, #831843, #be185d 45%, #f97316);
}

.page-hero p {
    width: min(760px, 100%);
    margin: 18px 0 0;
    color: #ffe4e6;
    font-size: 18px;
    line-height: 1.8;
}

.filter-panel {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
    border: 1px solid #fbcfe8;
    border-radius: 22px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 28px rgba(244, 63, 94, 0.08);
}

.filter-search {
    flex: 1;
}

.filter-search label {
    display: block;
    margin-bottom: 8px;
    color: #be185d;
    font-weight: 850;
}

.filter-search input,
.filter-group select {
    width: 100%;
    border: 1px solid #f9a8d4;
    border-radius: 16px;
    outline: 0;
    padding: 12px 14px;
    background: #ffffff;
}

.filter-search input:focus,
.filter-group select:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12);
}

.filter-group {
    display: grid;
    grid-template-columns: repeat(3, 150px);
    gap: 12px;
    align-items: end;
}

.movie-card.is-hidden {
    display: none;
}

.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 30px;
}

.side-rank {
    position: sticky;
    top: 100px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.detail-bg,
.detail-overlay {
    position: absolute;
    inset: 0;
}

.detail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) saturate(1.05);
    transform: scale(1.05);
    opacity: 0.42;
}

.detail-overlay {
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.95), rgba(88, 28, 135, 0.7), rgba(244, 63, 94, 0.35));
}

.detail-hero-inner {
    position: relative;
    padding: 34px 0 64px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    color: #ffe4e6;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

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

.detail-poster {
    overflow: hidden;
    border: 6px solid rgba(255, 255, 255, 0.28);
    border-radius: 30px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

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

.detail-one-line {
    margin: 18px 0 20px;
    color: #f9fafb;
    font-size: 20px;
    line-height: 1.8;
}

.player-section h2 {
    margin: 0 0 18px;
    font-size: 30px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.74));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-icon {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 32px;
    background: linear-gradient(135deg, var(--pink), var(--rose));
    box-shadow: 0 24px 52px rgba(244, 63, 94, 0.45);
}

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

.story-card {
    border: 1px solid #fbcfe8;
    border-radius: var(--radius);
    padding: 28px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(244, 63, 94, 0.08);
}

.story-card h2 {
    margin: 0 0 16px;
    color: #111827;
    font-size: 28px;
}

.story-card p {
    margin: 0;
    color: #4b5563;
    font-size: 17px;
    line-height: 1.9;
}

.accent-card {
    background: linear-gradient(145deg, #fff1f2, #fff7ed);
}

.info-table {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 24px;
}

.info-table div {
    border: 1px solid #fbcfe8;
    border-radius: 18px;
    padding: 18px;
    background: #ffffff;
}

.info-table strong,
.info-table span {
    display: block;
}

.info-table strong {
    margin-bottom: 8px;
    color: #be185d;
}

.site-footer {
    margin-top: 50px;
    color: #ffffff;
    background: linear-gradient(135deg, #881337, #be185d 58%, #9a3412);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 28px;
    padding: 46px 0;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
    color: #ffe4e6;
    line-height: 1.75;
}

.footer-grid h2 {
    margin: 0 0 12px;
    font-size: 19px;
}

.footer-grid ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-grid a:hover {
    color: #ffffff;
}

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

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

    .menu-toggle {
        display: inline-flex;
    }

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

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

    .rank-card,
    .side-rank {
        position: static;
    }
}

@media (max-width: 820px) {
    .hero-slider {
        height: 540px;
    }

    .hero-text h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 42px;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .category-panels,
    .footer-grid,
    .detail-content .content-grid,
    .info-table {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .filter-group {
        grid-template-columns: 1fr;
    }

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

    .detail-poster {
        width: min(280px, 100%);
    }
}

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

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

    .logo {
        font-size: 20px;
    }

    .hero-slider {
        height: 520px;
    }

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

    .primary-btn,
    .ghost-btn,
    .outline-link {
        justify-content: center;
        text-align: center;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .category-panels,
    .footer-grid,
    .detail-content .content-grid,
    .info-table {
        grid-template-columns: 1fr;
    }

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

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