:root {
    --pink: #ec4899;
    --pink-dark: #db2777;
    --blue: #3b82f6;
    --green: #10b981;
    --orange: #f97316;
    --yellow: #f59e0b;
    --text: #111827;
    --muted: #6b7280;
    --soft: #f9fafb;
    --line: #e5e7eb;
    --shadow: 0 20px 50px rgba(17, 24, 39, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #fdf2f8 0%, #eff6ff 48%, #ecfdf5 100%);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(253, 242, 248, 0.94), rgba(239, 246, 255, 0.94), rgba(236, 253, 245, 0.94));
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 30px rgba(148, 163, 184, 0.2);
}

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

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

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--blue), var(--green));
    box-shadow: 0 14px 30px rgba(236, 72, 153, 0.3);
}

.logo-text,
.footer-logo {
    font-size: 25px;
    background: linear-gradient(90deg, var(--pink), var(--blue), var(--green));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

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

.nav-link:hover,
.nav-link.active {
    color: var(--pink);
    transform: translateY(-1px);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 2px solid #fbcfe8;
    border-radius: 999px;
    padding: 4px;
    box-shadow: 0 10px 24px rgba(236, 72, 153, 0.08);
}

.header-search input,
.mobile-search input {
    width: 210px;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 9px 10px 9px 16px;
    color: #374151;
}

.header-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.ghost-btn {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.primary-btn {
    color: #fff;
    background: linear-gradient(90deg, var(--pink), var(--blue));
    padding: 10px 18px;
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.18);
}

.secondary-btn {
    color: var(--pink-dark);
    background: #fff;
    padding: 12px 20px;
    border: 1px solid #fbcfe8;
}

.ghost-btn {
    color: #374151;
    background: rgba(255, 255, 255, 0.78);
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.header-search button:hover,
.mobile-search button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 16px 35px rgba(236, 72, 153, 0.18);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    color: #111827;
    font-size: 22px;
    cursor: pointer;
}

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

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

.mobile-nav,
.mobile-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.mobile-nav a,
.mobile-genres a {
    padding: 9px 13px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    color: #374151;
    font-weight: 700;
}

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

.hero {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    background: linear-gradient(90deg, #f472b6, #60a5fa, #34d399);
    padding: 1px;
    box-shadow: var(--shadow);
    margin-bottom: 58px;
}

.hero::before {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    right: -120px;
    top: -120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.38);
    filter: blur(18px);
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr);
    gap: 42px;
    align-items: center;
    min-height: 460px;
    padding: 54px;
    border-radius: 33px;
    background: rgba(255, 255, 255, 0.92);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--pink-dark);
    background: #fce7f3;
    padding: 8px 13px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 18px;
}

.hero h1,
.page-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 7vw, 66px);
    line-height: 1.05;
    letter-spacing: -0.06em;
    background: linear-gradient(90deg, var(--pink), var(--blue), var(--green));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p,
.page-hero p {
    margin: 0;
    color: #4b5563;
    font-size: 18px;
    line-height: 1.85;
}

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

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-meta span,
.card-tags span,
.detail-tags span,
.category-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 800;
}

.hero-meta span {
    color: #2563eb;
    background: #dbeafe;
    padding: 8px 12px;
}

.hero-poster {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(17, 24, 39, 0.24);
    transform: rotate(1.2deg);
    transition: transform 0.5s ease;
}

.hero-poster:hover {
    transform: rotate(0deg) scale(1.02);
}

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

.hero-poster-overlay,
.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.72));
}

.hero-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    color: #fff;
    padding: 26px;
}

.hero-caption h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.hero-caption p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    line-height: 1.6;
}

.section {
    margin-bottom: 56px;
}

.section.alt {
    padding: 30px;
    border-radius: 30px;
    background: linear-gradient(90deg, #ffedd5, #fce7f3);
}

.section.soft {
    padding: 30px;
    border-radius: 30px;
    background: linear-gradient(135deg, #ecfdf5, #eff6ff);
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    letter-spacing: -0.04em;
}

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

.section-heading a {
    color: var(--pink-dark);
    font-weight: 900;
    white-space: nowrap;
}

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

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

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

.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 340px);
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
}

.horizontal-scroll .movie-card {
    scroll-snap-align: start;
}

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 35px rgba(17, 24, 39, 0.09);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 55px rgba(17, 24, 39, 0.16);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #fce7f3, #dbeafe);
}

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

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

.duration-badge,
.rank-badge,
.compact-rank {
    position: absolute;
    z-index: 2;
    color: #fff;
    font-weight: 900;
    border-radius: 999px;
}

.duration-badge {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.66);
    font-size: 12px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--orange), var(--pink));
}

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

.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.card-tags span,
.detail-tags span {
    color: var(--pink-dark);
    background: #fce7f3;
    padding: 6px 10px;
    font-size: 12px;
}

.movie-card h2,
.compact-card h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.35;
}

.movie-card h2 a,
.compact-card h2 a {
    transition: color 0.2s ease;
}

.movie-card h2 a:hover,
.compact-card h2 a:hover {
    color: var(--pink);
}

.movie-card p,
.compact-card p {
    color: var(--muted);
    line-height: 1.65;
}

.movie-card p {
    min-height: 52px;
    margin: 10px 0 14px;
}

.card-meta,
.compact-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #6b7280;
    font-size: 14px;
}

.card-meta span,
.compact-meta span,
.detail-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f3f4f6;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 172px minmax(0, 1fr);
    gap: 16px;
    padding: 12px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(17, 24, 39, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.compact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 48px rgba(17, 24, 39, 0.14);
}

.compact-image {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #fce7f3, #dbeafe);
}

.compact-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.compact-rank {
    left: 10px;
    top: 10px;
    min-width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.72);
}

.compact-body p {
    margin: 8px 0 12px;
}

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

.category-card {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    border-radius: 26px;
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--blue));
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:nth-child(3n + 2) {
    background: linear-gradient(135deg, var(--blue), var(--green));
}

.category-card:nth-child(3n + 3) {
    background: linear-gradient(135deg, var(--orange), var(--pink));
}

.category-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 26px 54px rgba(236, 72, 153, 0.22);
}

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

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.6;
}

.category-card span {
    align-self: flex-start;
    margin-top: 18px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 800;
}

.page-hero {
    margin-bottom: 34px;
    padding: 1px;
    border-radius: 30px;
    background: linear-gradient(90deg, var(--pink), var(--blue), var(--green));
    box-shadow: var(--shadow);
}

.page-hero-content {
    border-radius: 29px;
    background: rgba(255, 255, 255, 0.92);
    padding: 42px;
}

.compact-hero h1 {
    font-size: clamp(34px, 5vw, 54px);
}

.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin: 0 0 24px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

.filter-bar input {
    min-width: min(100%, 360px);
    flex: 1;
    border: 2px solid #fbcfe8;
    border-radius: 999px;
    padding: 13px 18px;
    outline: 0;
    background: #fff;
}

.filter-bar input:focus {
    border-color: var(--pink);
}

.empty-result {
    display: none;
    padding: 34px;
    border-radius: 24px;
    background: #fff;
    text-align: center;
    color: var(--muted);
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
}

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

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

.detail-main,
.detail-side,
.text-panel {
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.detail-main {
    overflow: hidden;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-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(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.46));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    border-radius: 50%;
    color: #fff;
    font-size: 36px;
    background: linear-gradient(135deg, var(--pink), var(--blue));
    box-shadow: 0 22px 45px rgba(0, 0, 0, 0.35);
}

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

.detail-content {
    padding: 30px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 14px;
}

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

.detail-content h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 52px);
    letter-spacing: -0.05em;
}

.detail-lead {
    margin: 0 0 22px;
    color: #4b5563;
    line-height: 1.85;
    font-size: 18px;
}

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

.detail-side {
    padding: 18px;
}

.detail-side img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 22px;
    background: linear-gradient(135deg, #fce7f3, #dbeafe);
}

.side-info {
    margin-top: 18px;
    display: grid;
    gap: 10px;
}

.side-info div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #f9fafb;
    color: #4b5563;
}

.side-info strong {
    color: #111827;
}

.text-panel {
    margin-top: 28px;
    padding: 30px;
}

.text-panel h2 {
    margin: 0 0 16px;
    font-size: 28px;
}

.text-panel p {
    margin: 0 0 18px;
    color: #374151;
    line-height: 1.9;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 128px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

.rank-num {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 16px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--pink));
}

.rank-thumb {
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #fce7f3, #dbeafe);
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.rank-score {
    font-size: 24px;
    font-weight: 900;
    color: var(--pink-dark);
}

.site-footer {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.78);
    border-top: 1px solid rgba(229, 231, 235, 0.8);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 38px;
}

.footer-grid p {
    color: var(--muted);
    line-height: 1.8;
}

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

.footer-grid a:not(.footer-logo) {
    display: block;
    color: #4b5563;
    margin: 10px 0;
    font-weight: 700;
}

.footer-grid a:hover {
    color: var(--pink);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: 14px;
}

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

    .menu-toggle {
        display: grid;
        place-items: center;
    }

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

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

    .movie-grid,
    .movie-grid.two,
    .compact-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .header-inner {
        height: 66px;
    }

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

    .container {
        width: min(100% - 22px, 1180px);
        padding-top: 20px;
    }

    .hero-inner,
    .page-hero-content,
    .detail-content,
    .text-panel {
        padding: 24px;
    }

    .hero-inner {
        min-height: auto;
        gap: 24px;
    }

    .hero-caption h2 {
        font-size: 22px;
    }

    .hero-caption {
        padding: 18px;
    }

    .section.alt,
    .section.soft {
        padding: 18px;
    }

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

    .movie-grid,
    .movie-grid.two,
    .movie-grid.four,
    .compact-list,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .rank-score {
        justify-self: start;
    }

    .footer-bottom {
        flex-direction: column;
    }
}
