:root {
    --rose: #f43f5e;
    --pink: #ec4899;
    --orange: #f97316;
    --amber: #f59e0b;
    --slate: #0f172a;
    --muted: #64748b;
    --line: rgba(15, 23, 42, 0.08);
    --card: rgba(255, 255, 255, 0.92);
    --shadow: 0 24px 80px rgba(244, 63, 94, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: #111827;
    background: linear-gradient(135deg, #fff1f2 0%, #fdf2f8 45%, #fff7ed 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

img.is-missing {
    opacity: 0;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, var(--rose), var(--pink), var(--orange));
    box-shadow: 0 14px 40px rgba(244, 63, 94, 0.28);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--rose);
    background: #fff;
    box-shadow: 0 10px 28px rgba(255, 255, 255, 0.32);
}

.brand-text {
    font-size: 1.5rem;
    white-space: nowrap;
}

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

.nav-link,
.mobile-nav-link {
    padding: 9px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

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

.header-search input,
.mobile-search input {
    width: 220px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    outline: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 10px 14px;
    backdrop-filter: blur(16px);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.header-search button,
.mobile-search button {
    border: 0;
    border-radius: 999px;
    color: #be123c;
    background: #fff;
    padding: 10px 16px;
    font-weight: 800;
    cursor: pointer;
}

.menu-toggle {
    width: 42px;
    height: 42px;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    border-radius: 999px;
    background: #fff;
}

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

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

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

main {
    overflow: hidden;
}

.hero-shell {
    position: relative;
    min-height: 650px;
    color: #fff;
    background: #111827;
}

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

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(251, 113, 133, 0.52), transparent 30%), linear-gradient(135deg, #881337, #111827 62%, #7c2d12);
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    filter: blur(2px) saturate(1.2);
}

.hero-backdrop::after,
.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.55), rgba(190, 18, 60, 0.42));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 650px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 56px;
    align-items: center;
    padding: 74px 0;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 5.2rem);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-intro {
    max-width: 760px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    margin-bottom: 18px;
    border-radius: 999px;
    padding: 7px 14px;
    color: #fff;
    background: linear-gradient(90deg, var(--rose), var(--orange));
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.eyebrow.dark {
    color: #be123c;
    background: #ffe4e6;
}

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

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

.hero-tags span,
.tag-row span {
    border-radius: 999px;
    padding: 6px 11px;
    color: #9f1239;
    background: #ffe4e6;
    font-size: 0.82rem;
    font-weight: 700;
}

.hero-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

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

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

.primary-button {
    color: #fff;
    background: linear-gradient(90deg, var(--rose), var(--orange));
    box-shadow: 0 18px 44px rgba(244, 63, 94, 0.34);
}

.ghost-button {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(12px);
}

.section-more {
    color: #be123c;
    border: 1px solid rgba(244, 63, 94, 0.18);
    background: #fff;
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 54px rgba(244, 63, 94, 0.24);
}

.hero-poster,
.page-hero-poster,
.detail-cover {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: radial-gradient(circle at 30% 20%, rgba(251, 113, 133, 0.75), rgba(249, 115, 22, 0.24)), #111827;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.hero-poster {
    aspect-ratio: 3 / 4;
    transform: rotate(2deg);
}

.hero-poster img,
.page-hero-poster img,
.detail-cover img,
.poster-frame img,
.list-poster img,
.player-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.hero-dot {
    width: 42px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

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

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

.soft-section {
    width: 100%;
    padding-left: max(16px, calc((100% - 1180px) / 2));
    padding-right: max(16px, calc((100% - 1180px) / 2));
    background: rgba(255, 255, 255, 0.48);
}

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

.section-heading h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

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

.category-tile,
.category-panel {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    border-radius: 28px;
    padding: 24px;
    color: #fff;
    background: linear-gradient(135deg, #f43f5e, #fb923c);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-panel:hover,
.movie-card:hover,
.list-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 70px rgba(244, 63, 94, 0.22);
}

.category-tile strong,
.category-panel h2 {
    display: block;
    margin: 10px 0;
    font-size: 1.35rem;
    line-height: 1.2;
}

.category-tile small,
.category-panel p {
    display: block;
    color: rgba(255, 255, 255, 0.82);
}

.category-tile em {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 22px;
    color: rgba(255, 255, 255, 0.92);
    font-style: normal;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-icon,
.category-panel-link span {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

.rose { background: linear-gradient(135deg, #f43f5e, #fb7185); }
.orange { background: linear-gradient(135deg, #f97316, #fb923c); }
.pink { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.violet { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.fuchsia { background: linear-gradient(135deg, #d946ef, #f43f5e); }
.slate { background: linear-gradient(135deg, #0f172a, #475569); }
.amber { background: linear-gradient(135deg, #f59e0b, #f97316); }
.sky { background: linear-gradient(135deg, #0ea5e9, #6366f1); }
.emerald { background: linear-gradient(135deg, #10b981, #14b8a6); }
.indigo { background: linear-gradient(135deg, #6366f1, #8b5cf6); }

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

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

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: radial-gradient(circle at 28% 18%, rgba(251, 113, 133, 0.76), rgba(249, 115, 22, 0.24)), #111827;
}

.poster-frame img {
    transition: transform 0.45s ease, opacity 0.25s ease;
}

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

.card-type,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 6px 10px;
    color: #fff;
    background: linear-gradient(90deg, var(--rose), var(--orange));
    font-size: 0.75rem;
    font-weight: 900;
}

.card-type {
    left: 12px;
    top: 12px;
}

.rank-badge {
    right: 12px;
    top: 12px;
}

.card-body {
    padding: 18px;
}

.card-title {
    display: block;
    color: #111827;
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 0.86rem;
}

.card-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    background: #f8fafc;
}

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

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

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

.list-card {
    display: grid;
    grid-template-columns: auto 92px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.list-rank {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    font-weight: 900;
}

.list-poster {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 18px;
    background: #111827;
}

.list-title {
    display: inline-block;
    color: #111827;
    font-size: 1.15rem;
    font-weight: 900;
}

.list-info p {
    margin: 6px 0 10px;
    color: var(--muted);
}

.page-hero,
.detail-hero {
    position: relative;
    color: #fff;
    background: linear-gradient(135deg, #881337, #be123c 42%, #f97316);
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 42px auto 0;
    min-height: 340px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 32px;
    align-items: center;
    border-radius: 36px;
    padding: 42px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.page-hero-poster {
    aspect-ratio: 3 / 4;
}

.crumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 800;
}

.crumb a:hover {
    color: #fff;
}

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

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

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.category-samples a {
    border-radius: 999px;
    padding: 8px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 900;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 18px;
    outline: none;
    background: #fff;
    padding: 12px 14px;
}

.empty-state {
    display: none;
    margin-top: 24px;
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    color: #64748b;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

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

.detail-hero {
    min-height: 620px;
    overflow: hidden;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background: #111827;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    filter: blur(2px) saturate(1.15);
}

.detail-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0 70px;
}

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

.detail-cover {
    aspect-ratio: 3 / 4;
}

.detail-copy h1 {
    max-width: 820px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.detail-meta span,
.side-meta span {
    display: inline-flex;
    border-radius: 999px;
    padding: 8px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    font-weight: 800;
}

.detail-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

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

.player-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: stretch;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.52), rgba(190, 18, 60, 0.36));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
    width: 88px;
    height: 88px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: 0 24px 70px rgba(244, 63, 94, 0.34);
    font-size: 2rem;
}

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

.player-side,
.text-card {
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.player-side h2,
.text-card h2 {
    margin: 0 0 12px;
    color: #111827;
    font-size: 1.45rem;
}

.player-side p,
.text-card p {
    color: #475569;
}

.side-meta {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.side-meta span {
    color: #be123c;
    background: #ffe4e6;
}

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

.site-footer {
    margin-top: 40px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #1e293b, #111827);
}

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

.footer-brand {
    color: #fff;
    font-size: 1.35rem;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 1.1rem;
}

.site-footer p {
    max-width: 460px;
    color: #94a3b8;
}

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

.footer-links a {
    border-radius: 999px;
    padding: 8px 12px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #94a3b8;
}

[data-card].hidden {
    display: none;
}

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

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

    .hero-content,
    .detail-grid,
    .player-layout,
    .page-hero {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .page-hero-poster {
        max-width: 360px;
    }

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

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

@media (max-width: 760px) {
    .header-inner {
        width: min(100% - 24px, 1180px);
    }

    .brand-text {
        font-size: 1.15rem;
    }

    .hero-shell,
    .hero-content {
        min-height: 720px;
    }

    .hero-content,
    .section,
    .detail-inner {
        width: min(100% - 24px, 1180px);
    }

    .hero-content {
        gap: 28px;
        padding: 42px 0 70px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: clamp(2rem, 12vw, 3.2rem);
    }

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

    .category-grid,
    .category-panel-grid,
    .movie-grid,
    .ranking-list,
    .detail-text-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .list-card {
        grid-template-columns: 42px 74px minmax(0, 1fr);
        gap: 10px;
    }

    .page-hero {
        width: min(100% - 24px, 1180px);
        margin-top: 24px;
        padding: 28px;
        border-radius: 28px;
    }

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

    .player-side,
    .text-card {
        border-radius: 24px;
        padding: 22px;
    }
}

@media (max-width: 520px) {
    .movie-grid {
        gap: 16px;
    }

    .card-body {
        padding: 14px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .primary-button,
    .ghost-button,
    .section-more {
        width: 100%;
    }
}
