:root {
    --rose: #fb7185;
    --rose-dark: #e11d48;
    --teal: #14b8a6;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: rgba(244, 114, 182, 0.22);
    --card: rgba(255, 255, 255, 0.84);
    --soft: #fff1f2;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 10% 5%, rgba(251, 113, 133, 0.18), transparent 28rem),
        radial-gradient(circle at 90% 10%, rgba(20, 184, 166, 0.20), transparent 26rem),
        linear-gradient(180deg, #fff7f9 0%, #f8ffff 48%, #ffffff 100%);
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: transparent;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--rose), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
}

.logo-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    fill: none;
    stroke: var(--rose);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 10px 16px rgba(251, 113, 133, 0.22));
}

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

.nav-link {
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease;
}

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #fff1f2;
    color: var(--ink);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--rose-dark);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

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

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

.mobile-link {
    padding: 12px 14px;
    border-radius: 14px;
    color: #374151;
    font-weight: 650;
    background: rgba(255, 255, 255, 0.70);
}

.mobile-link:hover,
.mobile-link.active {
    color: var(--rose-dark);
    background: #fff1f2;
}

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

.page-container {
    padding-top: 34px;
}

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

.hero-stage {
    position: relative;
    min-height: 520px;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    padding: 72px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 6s ease;
}

.hero-slide.active .hero-image {
    transform: scale(1.10);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.94) 0%, rgba(17, 24, 39, 0.72) 45%, rgba(17, 24, 39, 0.18) 100%),
        radial-gradient(circle at 24% 30%, rgba(251, 113, 133, 0.35), transparent 24rem),
        radial-gradient(circle at 75% 20%, rgba(20, 184, 166, 0.28), transparent 22rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
    color: white;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: #fecdd3;
    font-size: 14px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

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

.hero-content p,
.detail-copy p {
    margin: 22px 0 0;
    max-width: 700px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.tag-row span {
    color: var(--rose-dark);
    background: #fff1f2;
}

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

.primary-button,
.secondary-button,
.ghost-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    color: white;
    background: linear-gradient(135deg, var(--rose), var(--teal));
    box-shadow: 0 16px 30px rgba(251, 113, 133, 0.25);
}

.secondary-button {
    color: white;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(8px);
}

.ghost-button,
.section-link {
    border: 1px solid var(--line);
    color: var(--rose-dark);
    background: #ffffff;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.section-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.14);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    color: white;
    font-size: 32px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    transform: translateY(-50%);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    z-index: 5;
    left: 72px;
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
    width: 34px;
    background: white;
}

.stat-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 28px 0 0;
}

.stat-strip a,
.category-tile,
.movie-card,
.prose-card,
.info-card,
.rank-card {
    border: 1px solid rgba(244, 114, 182, 0.18);
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
}

.stat-strip a {
    padding: 22px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-strip a:hover,
.category-tile:hover,
.movie-card:hover,
.rank-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.stat-strip strong {
    display: block;
    color: #111827;
    font-size: 20px;
}

.stat-strip span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
}

.content-section {
    margin-top: 48px;
}

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

.section-heading h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link img,
.category-thumbs img,
.rank-cover img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-link img {
    transition: transform 0.45s ease;
}

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

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(17, 24, 39, 0.64);
    backdrop-filter: blur(8px);
}

.movie-card-body {
    padding: 16px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.movie-meta span:not(:last-child)::after {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-left: 8px;
    border-radius: 50%;
    background: #fecdd3;
    vertical-align: middle;
}

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

.movie-card h3 a:hover,
.rank-card h2 a:hover,
.info-card a:hover {
    color: var(--rose-dark);
}

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

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

.category-tile {
    display: block;
    padding: 14px;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-thumbs {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    grid-template-rows: repeat(2, 84px);
    gap: 8px;
    margin-bottom: 14px;
}

.category-thumbs img {
    border-radius: 16px;
    background: linear-gradient(135deg, #fff1f2, #ccfbf1);
}

.category-thumbs img:first-child {
    grid-row: span 2;
}

.category-tile h3 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 18px;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.ranking-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ranking-strip a {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 10px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.80);
    border: 1px solid rgba(20, 184, 166, 0.12);
}

.ranking-strip span {
    grid-row: span 2;
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--rose), var(--teal));
}

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

.ranking-strip em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.catalog-toolbar {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
    padding: 16px;
    border: 1px solid rgba(244, 114, 182, 0.18);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.search-box input,
.filter-group select {
    width: 100%;
    height: 44px;
    border: 1px solid rgba(244, 114, 182, 0.24);
    border-radius: 14px;
    outline: none;
    color: var(--ink);
    background: #ffffff;
}

.search-box input {
    padding: 0 16px;
}

.search-box input:focus,
.filter-group select:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.12);
}

.filter-group {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
    gap: 12px;
    align-items: end;
}

.filter-group label span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.filter-group select {
    padding: 0 12px;
}

.filter-count {
    min-height: 20px;
    color: var(--muted);
    font-size: 13px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background:
        radial-gradient(circle at 15% 20%, rgba(251, 113, 133, 0.24), transparent 24rem),
        radial-gradient(circle at 85% 0%, rgba(20, 184, 166, 0.28), transparent 24rem),
        linear-gradient(135deg, #111827, #312e81 48%, #0f766e);
    box-shadow: var(--shadow);
}

.small-hero {
    padding: 52px;
    color: #ffffff;
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--rose-dark);
}

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

.rank-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    padding: 14px;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.rank-cover {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff1f2, #ccfbf1);
}

.rank-cover span {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--rose), var(--teal));
}

.rank-card h2 {
    margin: 4px 0 10px;
    color: #111827;
    font-size: 24px;
}

.rank-card p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.8;
}

.detail-hero {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 36px;
    align-items: center;
    padding: 36px;
    color: #ffffff;
}

.detail-poster {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 26px;
    background: linear-gradient(135deg, #fff1f2, #ccfbf1);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

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

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

.video-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.50), rgba(15, 23, 42, 0.22));
    cursor: pointer;
}

.play-overlay[hidden],
.video-shell.is-playing .play-overlay {
    display: none;
}

.play-overlay span {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rose), var(--teal));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    position: relative;
}

.play-overlay span::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 54%;
    width: 0;
    height: 0;
    border-top: 17px solid transparent;
    border-bottom: 17px solid transparent;
    border-left: 26px solid white;
    transform: translate(-50%, -50%);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    margin-top: 34px;
}

.prose-card,
.info-card {
    padding: 28px;
}

.prose-card h2,
.info-card h2 {
    margin: 0 0 14px;
    color: #111827;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.prose-card p {
    margin: 0 0 22px;
    color: #4b5563;
    line-height: 1.95;
}

.prose-card p:last-child {
    margin-bottom: 0;
}

.info-card dl {
    margin: 0;
    display: grid;
    gap: 14px;
}

.info-card div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(244, 114, 182, 0.15);
}

.info-card div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.info-card dt {
    color: var(--muted);
    font-weight: 800;
}

.info-card dd {
    margin: 0;
    color: #111827;
}

.site-footer {
    margin-top: 72px;
    padding: 46px 0 24px;
    border-top: 1px solid rgba(244, 114, 182, 0.16);
    background: rgba(255, 255, 255, 0.68);
}

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

.footer-grid p {
    max-width: 520px;
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

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

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto 0;
    padding-top: 18px;
    border-top: 1px solid rgba(244, 114, 182, 0.16);
    color: var(--muted);
    font-size: 14px;
}

[hidden],
.movie-card.hidden,
.rank-card.hidden {
    display: none !important;
}

@media (max-width: 1080px) {
    .featured-grid,
    .all-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

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

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

@media (max-width: 820px) {
    .desktop-nav {
        display: none;
    }

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

    .brand,
    .footer-brand {
        font-size: 20px;
    }

    .hero-stage {
        min-height: 560px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 42px 24px 80px;
        align-items: end;
    }

    .hero-overlay {
        background:
            linear-gradient(0deg, rgba(17, 24, 39, 0.96) 0%, rgba(17, 24, 39, 0.72) 58%, rgba(17, 24, 39, 0.24) 100%),
            radial-gradient(circle at 24% 30%, rgba(251, 113, 133, 0.35), transparent 24rem);
    }

    .hero-control {
        display: none;
    }

    .hero-dots {
        left: 24px;
        bottom: 28px;
    }

    .stat-strip,
    .ranking-strip,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

    .small-hero,
    .detail-hero {
        padding: 30px;
        border-radius: 24px;
    }

    .rank-card {
        grid-template-columns: 128px 1fr;
    }
}

@media (max-width: 560px) {
    .container,
    .hero-carousel,
    .nav-wrap,
    .mobile-nav,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-content h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 38px;
    }

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

    .featured-grid,
    .all-grid,
    .related-grid,
    .category-grid,
    .filter-group {
        grid-template-columns: 1fr;
    }

    .category-thumbs {
        grid-template-rows: repeat(2, 72px);
    }

    .rank-card {
        grid-template-columns: 1fr;
    }

    .rank-cover {
        max-width: none;
    }

    .prose-card,
    .info-card {
        padding: 22px;
    }

    .info-card div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
