:root {
    --pink: #ec4899;
    --pink-dark: #db2777;
    --purple: #8b5cf6;
    --purple-dark: #5b21b6;
    --yellow: #facc15;
    --blue: #2563eb;
    --green: #16a34a;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(148, 163, 184, 0.32);
    --card: rgba(255, 255, 255, 0.92);
    --shadow: 0 18px 45px rgba(88, 28, 135, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 8%, rgba(236, 72, 153, 0.18), transparent 30%),
        radial-gradient(circle at 88% 18%, rgba(139, 92, 246, 0.2), transparent 34%),
        linear-gradient(135deg, #fdf2f8 0%, #faf5ff 45%, #fdf2f8 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--pink), var(--purple), #f472b6);
    box-shadow: 0 12px 30px rgba(219, 39, 119, 0.28);
}

.nav-shell {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.brand {
    font-size: 24px;
    white-space: nowrap;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #7c2d12;
    background: var(--yellow);
    box-shadow: 0 10px 18px rgba(250, 204, 21, 0.35);
}

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

.nav-links a {
    padding: 9px 14px;
    color: #ffffff;
    border-radius: 999px;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--pink-dark);
    background: #ffffff;
    transform: translateY(-1px);
}

.nav-search {
    position: relative;
    display: flex;
    width: min(300px, 32vw);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.nav-search input,
.big-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: #ffffff;
    color: var(--text);
}

.nav-search input {
    padding: 10px 14px;
    background: transparent;
}

.nav-search button,
.big-search button {
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(90deg, var(--pink), var(--purple));
    font-weight: 700;
}

.nav-search button {
    padding: 0 16px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
    border-radius: 4px;
}

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

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

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

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

.hero-slide.is-active img {
    animation: slowZoom 8s ease forwards;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08)),
        linear-gradient(0deg, rgba(88, 28, 135, 0.34), transparent 55%);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    width: min(680px, calc(100vw - 48px));
    transform: translateY(-50%);
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 32px;
    padding: 7px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--pink);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 12px 24px rgba(236, 72, 153, 0.28);
}

.hero-content h1 {
    margin: 18px 0 16px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
    text-shadow: 0 10px 24px rgba(0, 0, 0, 0.36);
}

.hero-content p {
    max-width: 620px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.7;
}

.hero-tags,
.detail-meta,
.meta-line,
.tag-row,
.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags a,
.hero-tags span,
.detail-meta span {
    padding: 7px 12px;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.17);
    backdrop-filter: blur(12px);
}

.hero-actions {
    margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.text-link,
.side-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn {
    padding: 13px 28px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--pink), var(--purple));
    box-shadow: 0 16px 32px rgba(236, 72, 153, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover {
    transform: translateY(-2px) scale(1.02);
}

.ghost-btn {
    padding: 12px 24px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
}

.hero-control {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.quick-panel,
.content-section,
.detail-layout,
.player-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px 0;
}

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

.quick-search-card,
.quick-category-card,
.detail-main-card,
.detail-side-card,
.category-overview-card {
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search-card,
.quick-category-card {
    padding: 32px;
}

.quick-search-card span,
.quick-category-card span {
    color: var(--pink-dark);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.quick-search-card h2,
.quick-category-card h2 {
    margin: 10px 0 22px;
    font-size: clamp(24px, 3vw, 34px);
}

.big-search {
    display: flex;
    min-height: 54px;
    border-radius: 999px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(139, 92, 246, 0.14);
}

.big-search input {
    padding: 0 20px;
}

.big-search button {
    min-width: 110px;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-chips a,
.filter-bar button,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--pink-dark);
    background: #fce7f3;
    font-weight: 700;
}

.category-chips a:hover,
.filter-bar button.active,
.filter-bar button:hover {
    color: #ffffff;
    background: linear-gradient(90deg, var(--pink), var(--purple));
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading span {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--pink-dark);
    font-weight: 900;
    letter-spacing: 0.12em;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

.section-heading p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.glass-section {
    padding-top: 42px;
    padding-bottom: 42px;
    margin-top: 56px;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.movie-grid,
.featured-grid,
.category-overview-grid {
    display: grid;
    gap: 24px;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(88, 28, 135, 0.12);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 42px rgba(88, 28, 135, 0.2);
}

.movie-card-featured .poster {
    aspect-ratio: 16 / 10;
}

.poster,
.wide-thumb {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

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

.poster img,
.wide-thumb img,
.detail-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster img,
.wide-thumb img {
    transition: transform 0.42s ease, filter 0.42s ease;
}

.movie-card:hover .poster img,
.wide-card:hover .wide-thumb img {
    transform: scale(1.09);
    filter: saturate(1.08);
}

.play-icon,
.wide-thumb span {
    position: absolute;
    top: 50%;
    left: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(236, 72, 153, 0.88);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.84);
    transition: opacity 0.26s ease, transform 0.26s ease;
}

.movie-card:hover .play-icon,
.wide-card:hover .wide-thumb span {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.poster-region,
.poster-year,
.rank-badge {
    position: absolute;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.poster-region {
    top: 10px;
    left: 10px;
    background: var(--pink);
}

.poster-year {
    right: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.66);
}

.rank-badge {
    top: 10px;
    right: 10px;
    background: var(--yellow);
    color: #713f12;
}

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

.movie-card-body h2,
.wide-card h2,
.category-overview-card h2 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card-body h2 a:hover,
.wide-card h2 a:hover,
.category-overview-card h2 a:hover {
    color: var(--pink-dark);
}

.movie-card-body p,
.wide-card p,
.category-overview-card p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.65;
}

.meta-line {
    color: var(--muted);
    font-size: 13px;
}

.meta-line span {
    display: inline-flex;
    align-items: center;
}

.meta-line span + span::before {
    content: "";
    width: 4px;
    height: 4px;
    margin-right: 10px;
    border-radius: 999px;
    background: var(--pink);
}

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

.tag-row span {
    min-height: 28px;
    padding: 4px 9px;
    font-size: 12px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.filter-bar button {
    border: 0;
    cursor: pointer;
}

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

.wide-card {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 18px;
    padding: 12px;
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(88, 28, 135, 0.12);
}

.wide-thumb {
    aspect-ratio: 16 / 10;
    border-radius: 16px;
}

.section-more {
    margin-top: 28px;
    text-align: center;
}

.section-more a,
.text-link {
    padding: 10px 18px;
    color: var(--pink-dark);
    background: #fce7f3;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(120deg, rgba(219, 39, 119, 0.94), rgba(88, 28, 135, 0.92));
}

.page-hero {
    min-height: 320px;
    display: flex;
    align-items: center;
    padding: 70px 24px;
}

.page-hero > div {
    width: min(1280px, 100%);
    margin: 0 auto;
}

.page-hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(38px, 6vw, 64px);
}

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

.ranking-hero {
    background:
        radial-gradient(circle at 78% 26%, rgba(250, 204, 21, 0.36), transparent 24%),
        linear-gradient(120deg, rgba(219, 39, 119, 0.94), rgba(88, 28, 135, 0.95));
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
}

.category-cover-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    overflow: hidden;
    border-radius: 18px;
}

.category-cover-strip img {
    width: 100%;
    height: 118px;
    object-fit: cover;
}

.detail-hero {
    min-height: 520px;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--cover-image);
    background-size: cover;
    background-position: center;
    filter: blur(20px) saturate(1.1);
    transform: scale(1.08);
    opacity: 0.4;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.86), rgba(88, 28, 135, 0.58), rgba(236, 72, 153, 0.38)),
        linear-gradient(0deg, rgba(17, 24, 39, 0.92), transparent 60%);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px 56px;
}

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

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

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

.detail-poster {
    aspect-ratio: 3 / 4;
    border: 4px solid rgba(255, 255, 255, 0.55);
    border-radius: 24px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.32);
}

.detail-intro h1 {
    margin: 18px 0 14px;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.06;
}

.detail-one-line {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 20px;
    line-height: 1.8;
}

.large-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #050816;
    box-shadow: 0 30px 70px rgba(17, 24, 39, 0.34);
    aspect-ratio: 16 / 9;
}

.video-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.18));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    font-size: 42px;
    box-shadow: 0 18px 38px rgba(236, 72, 153, 0.36);
}

.player-overlay strong {
    font-size: clamp(20px, 3vw, 34px);
    text-shadow: 0 10px 22px rgba(0, 0, 0, 0.5);
}

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

.detail-main-card,
.detail-side-card {
    padding: 28px;
}

.detail-main-card h2,
.detail-side-card h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.detail-main-card h2:not(:first-child) {
    margin-top: 28px;
}

.detail-main-card p {
    margin: 0;
    color: #374151;
    font-size: 17px;
    line-height: 2;
}

.detail-side-card dl {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px 16px;
    margin: 0 0 24px;
}

.detail-side-card dt {
    color: var(--muted);
}

.detail-side-card dd {
    margin: 0;
    font-weight: 700;
}

.side-btn {
    width: 100%;
}

.page-search {
    max-width: 620px;
    margin-top: 26px;
}

.site-footer {
    margin-top: 72px;
    color: #ffffff;
    background: linear-gradient(90deg, #581c87, #831843, #581c87);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
    gap: 30px;
}

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

.footer-grid p,
.footer-grid a {
    display: block;
    margin: 0 0 10px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.75;
}

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

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

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

@keyframes slowZoom {
    from {
        transform: scale(1.02);
    }
    to {
        transform: scale(1.08);
    }
}

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

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

    .category-overview-grid,
    .quick-panel,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .nav-shell {
        height: auto;
        min-height: 64px;
        padding: 12px 18px;
        flex-wrap: wrap;
    }

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

    .nav-links {
        order: 3;
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding-top: 8px;
    }

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

    .nav-links a {
        border-radius: 14px;
    }

    .nav-search {
        order: 4;
        display: none;
        width: 100%;
        margin-top: 10px;
    }

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

    .hero-carousel {
        height: 620px;
    }

    .hero-content {
        top: auto;
        bottom: 72px;
        transform: none;
    }

    .hero-control {
        display: none;
    }

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

    .wide-card,
    .category-overview-card,
    .detail-intro {
        grid-template-columns: 1fr;
    }

    .wide-thumb {
        aspect-ratio: 16 / 9;
    }

    .detail-poster {
        width: min(260px, 82vw);
    }
}

@media (max-width: 540px) {
    .brand {
        font-size: 20px;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-content h1,
    .detail-intro h1,
    .page-hero h1 {
        font-size: 36px;
    }

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

    .quick-panel,
    .content-section,
    .detail-layout,
    .player-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .quick-search-card,
    .quick-category-card,
    .detail-main-card,
    .detail-side-card {
        padding: 22px;
        border-radius: 22px;
    }

    .movie-grid,
    .featured-grid,
    .compact-grid {
        grid-template-columns: 1fr;
    }

    .big-search {
        border-radius: 18px;
        flex-direction: column;
    }

    .big-search input {
        min-height: 52px;
    }

    .big-search button {
        min-height: 50px;
    }

    .player-start {
        width: 72px;
        height: 72px;
        font-size: 32px;
    }
}
