:root {
    --rose: #e11d48;
    --rose-dark: #be123c;
    --pink: #ec4899;
    --purple: #7e22ce;
    --ink: #111827;
    --muted: #6b7280;
    --line: #f3d4df;
    --soft: #fff1f5;
    --paper: #ffffff;
    --shadow: 0 24px 70px rgba(190, 18, 60, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 241, 245, 0.96), rgba(253, 242, 248, 0.96));
    border-bottom: 1px solid rgba(244, 114, 182, 0.25);
    box-shadow: 0 12px 35px rgba(190, 18, 60, 0.08);
    backdrop-filter: blur(18px);
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--rose), var(--pink), var(--purple));
    box-shadow: 0 14px 28px rgba(225, 29, 72, 0.28);
}

.logo-title {
    display: block;
    font-size: 21px;
    font-weight: 900;
    line-height: 1.05;
}

.logo-subtitle {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--muted);
}

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

.main-nav a {
    position: relative;
    padding: 25px 0;
    font-size: 15px;
    font-weight: 700;
    color: #374151;
}

.main-nav a::after {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    height: 3px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--rose), var(--pink));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
    content: "";
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--rose);
}

.main-nav a:hover::after,
.main-nav a.is-active::after {
    transform: scaleX(1);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: var(--rose);
    background: rgba(225, 29, 72, 0.1);
}

.mobile-nav {
    display: none;
    padding: 0 16px 18px;
}

.mobile-nav a {
    display: block;
    padding: 13px 16px;
    margin-top: 8px;
    border-radius: 14px;
    color: #374151;
    background: rgba(255, 255, 255, 0.72);
    font-weight: 750;
}

.home-hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: linear-gradient(90deg, #e11d48, #ec4899);
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    background: linear-gradient(135deg, #be123c, #7e22ce);
}

.hero-mask {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 28%, rgba(255, 255, 255, 0.2), transparent 28%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18) 45%, rgba(0, 0, 0, 0.52));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-panel {
    width: min(760px, 100%);
    color: #fff;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
    font-size: 13px;
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.hero-panel h1 {
    margin: 18px 0 16px;
    font-size: clamp(42px, 6vw, 74px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.hero-panel p {
    width: min(680px, 100%);
    margin: 0 0 28px;
    color: #ffe4ec;
    font-size: clamp(18px, 2.4vw, 24px);
    line-height: 1.65;
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--pink));
    box-shadow: 0 15px 32px rgba(225, 29, 72, 0.24);
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 38px rgba(225, 29, 72, 0.32);
}

.btn.secondary,
.btn.ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(12px);
}

.btn.light {
    color: var(--rose);
    background: #fff;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
}

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

.hero-side-card {
    position: absolute;
    right: max(22px, calc((100vw - 1180px) / 2));
    bottom: 86px;
    width: min(360px, calc(100% - 44px));
    padding: 20px;
    border-radius: 28px;
    color: #fff;
    background: rgba(17, 24, 39, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(18px);
}

.hero-side-card h2 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 900;
}

.hero-side-card p {
    margin: 0;
    color: #ffe4ec;
    line-height: 1.7;
}

.section {
    padding: 58px 0;
}

.section.compact {
    padding-top: 34px;
}

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

.section-title {
    margin: 10px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.035em;
}

.section-desc {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.75;
    max-width: 760px;
}

.search-panel {
    margin-top: -38px;
    position: relative;
    z-index: 5;
}

.search-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 18px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    border: 1px solid rgba(244, 114, 182, 0.28);
    backdrop-filter: blur(14px);
}

.search-card input,
.inline-search input {
    width: 100%;
    border: 1px solid rgba(244, 114, 182, 0.45);
    border-radius: 18px;
    padding: 15px 18px;
    color: #111827;
    outline: none;
    background: #fff;
}

.search-card input:focus,
.inline-search input:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.08);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 8px 13px;
    border-radius: 999px;
    color: var(--rose-dark);
    background: #ffe4ec;
    font-size: 13px;
    font-weight: 850;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(244, 114, 182, 0.22);
    box-shadow: 0 18px 45px rgba(190, 18, 60, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(225, 29, 72, 0.38);
    box-shadow: 0 28px 65px rgba(190, 18, 60, 0.18);
}

.poster {
    position: relative;
    aspect-ratio: 3 / 4.2;
    overflow: hidden;
    background: linear-gradient(135deg, #f43f5e, #db2777, #7e22ce);
}

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

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

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

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--pink));
    font-size: 12px;
    font-weight: 850;
}

.poster .badge {
    position: absolute;
    left: 12px;
    top: 12px;
}

.card-body {
    padding: 16px;
}

.card-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 950;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.card-desc {
    margin: 0;
    color: #4b5563;
    line-height: 1.65;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-card {
    min-height: 180px;
    padding: 24px;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(135deg, #e11d48, #ec4899 54%, #7e22ce);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.category-card::after {
    position: absolute;
    right: -36px;
    bottom: -42px;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    content: "";
}

.category-card h2,
.category-card h3 {
    position: relative;
    margin: 0 0 12px;
    font-size: 25px;
    font-weight: 950;
}

.category-card p {
    position: relative;
    margin: 0;
    color: #ffe4ec;
    line-height: 1.75;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 56px 92px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(244, 114, 182, 0.22);
    box-shadow: 0 16px 38px rgba(190, 18, 60, 0.1);
}

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

.rank-thumb {
    width: 92px;
    height: 58px;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #f43f5e, #7e22ce);
}

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

.rank-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 950;
}

.rank-desc {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.page-hero {
    padding: 70px 0 48px;
    color: #fff;
    background:
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.18), transparent 28%),
        linear-gradient(135deg, #be123c, #e11d48 44%, #7e22ce);
}

.page-hero h1 {
    margin: 14px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.045em;
}

.page-hero p {
    max-width: 840px;
    margin: 0;
    color: #ffe4ec;
    font-size: 18px;
    line-height: 1.75;
}

.inline-search {
    margin-bottom: 24px;
}

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

.player-card,
.detail-card {
    overflow: hidden;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(244, 114, 182, 0.24);
    box-shadow: var(--shadow);
}

.video-wrap {
    position: relative;
    background: #050505;
    aspect-ratio: 16 / 9;
}

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

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.66));
    cursor: pointer;
}

.play-layer.is-hidden {
    display: none;
}

.play-core {
    display: grid;
    place-items: center;
    gap: 16px;
    text-align: center;
}

.play-icon {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--rose), var(--pink));
    box-shadow: 0 20px 45px rgba(225, 29, 72, 0.34);
    font-size: 34px;
    line-height: 1;
}

.play-title {
    font-size: 20px;
    font-weight: 950;
}

.detail-main {
    padding: 26px;
}

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

.detail-title {
    margin: 0 0 14px;
    font-size: clamp(30px, 4.5vw, 52px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 20px;
}

.meta-pill {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--rose-dark);
    background: #ffe4ec;
    font-weight: 850;
    font-size: 13px;
}

.detail-copy {
    color: #374151;
    line-height: 1.88;
    font-size: 16px;
}

.detail-copy h2 {
    margin: 28px 0 10px;
    color: #111827;
    font-size: 24px;
    font-weight: 950;
}

.detail-copy p {
    margin: 0 0 14px;
}

.side-poster {
    overflow: hidden;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(244, 114, 182, 0.24);
    box-shadow: var(--shadow);
}

.side-poster img {
    width: 100%;
    aspect-ratio: 3 / 4.2;
    object-fit: cover;
    background: linear-gradient(135deg, #f43f5e, #7e22ce);
}

.side-poster-body {
    padding: 20px;
}

.side-poster-body h2 {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 950;
}

.side-poster-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

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

.site-footer {
    margin-top: 48px;
    padding: 34px 0;
    color: #ffe4ec;
    background: linear-gradient(135deg, #881337, #be123c 48%, #581c87);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-inner p {
    margin: 0;
    line-height: 1.7;
}

.empty-state {
    display: none;
    padding: 28px;
    border-radius: 24px;
    text-align: center;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(244, 114, 182, 0.22);
}

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

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

    .side-poster {
        max-width: 360px;
    }

    .hero-side-card {
        display: none;
    }
}

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

    .main-nav {
        display: none;
    }

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

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

    .home-hero {
        height: 560px;
    }

    .hero-panel h1 {
        font-size: 42px;
    }

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

    .section-head,
    .footer-inner {
        display: block;
    }

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

    .rank-item {
        grid-template-columns: 44px 72px 1fr;
    }

    .rank-item .btn {
        grid-column: 1 / -1;
    }

    .rank-thumb {
        width: 72px;
        height: 52px;
    }
}

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

    .home-hero {
        height: 520px;
    }

    .movie-grid,
    .category-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .card-title {
        font-size: 17px;
    }

    .detail-main {
        padding: 20px;
    }
}
