:root {
    --rose: #f43f5e;
    --pink: #ec4899;
    --orange: #fb923c;
    --slate: #0f172a;
    --slate-soft: #1e293b;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --paper: #ffffff;
    --bg: #fff7ed;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(180deg, #fff7ed 0%, #fff1f2 36%, #ffffff 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

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

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

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--rose);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

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

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-weight: 700;
}

.main-nav a {
    position: relative;
    opacity: 0.96;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.9);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
}

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

.header-search {
    position: relative;
    width: min(280px, 28vw);
}

.header-search input {
    width: 100%;
    height: 40px;
    border: 0;
    outline: 0;
    border-radius: 999px;
    color: #fff;
    padding: 0 16px 0 42px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

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

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.78;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    color: #fff;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
}

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

.mobile-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 700;
}

.mobile-panel a:hover {
    background: rgba(255, 255, 255, 0.16);
}

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

.hero {
    position: relative;
    color: #fff;
    min-height: 560px;
    overflow: hidden;
    background: #be123c;
}

.hero-slide {
    display: none;
    position: relative;
    min-height: 560px;
    isolation: isolate;
}

.hero-slide.is-active {
    display: block;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -3;
    background-image: linear-gradient(90deg, rgba(136, 19, 55, 0.95), rgba(190, 24, 93, 0.8), rgba(251, 146, 60, 0.55)), var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.28), transparent 22%), radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.18), transparent 20%);
}

.hero-content {
    min-height: 560px;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(290px, 0.72fr);
    align-items: center;
    gap: 42px;
    padding: 72px 0;
}

.hero-copy {
    max-width: 720px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    color: #fff;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-weight: 800;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-lead {
    margin: 0 0 24px;
    max-width: 680px;
    font-size: clamp(17px, 2.4vw, 22px);
    color: rgba(255, 255, 255, 0.9);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 30px;
    padding: 0;
    list-style: none;
}

.hero-tags li,
.tag,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #9f1239;
    background: #ffe4e6;
    font-size: 13px;
    font-weight: 800;
}

.hero-tags li {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: var(--rose);
    background: #fff;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.24);
}

.btn-primary:hover {
    background: #fff1f2;
}

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

.hero-poster {
    position: relative;
    border-radius: 34px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.35);
    transform: rotate(2deg);
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 38%;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.86), transparent);
}

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

.hero-dot {
    width: 38px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.42);
}

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

.main-section {
    padding: 54px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.section-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-link {
    color: var(--rose);
    font-weight: 900;
    white-space: nowrap;
}

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

.category-card {
    position: relative;
    min-height: 150px;
    padding: 24px;
    border-radius: var(--radius);
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--pink), var(--orange));
    box-shadow: var(--shadow);
}

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

.category-card h2,
.category-card h3 {
    position: relative;
    margin: 0 0 10px;
    font-size: 24px;
    z-index: 1;
}

.category-card p {
    position: relative;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    z-index: 1;
}

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

.panel {
    border-radius: 30px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.panel-soft {
    background: linear-gradient(90deg, #ffedd5, #ffe4e6, #fce7f3);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 60px rgba(244, 63, 94, 0.2);
}

.poster-link {
    position: relative;
    display: block;
    background: linear-gradient(135deg, #fff1f2, #ffedd5);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

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

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.play-link {
    color: var(--rose);
    font-weight: 900;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin: 0 0 24px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
}

.filter-panel input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 18px;
    outline: 0;
}

.filter-panel input:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.filter-panel .btn {
    min-width: 110px;
    color: #fff;
    background: linear-gradient(90deg, var(--rose), var(--orange));
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 76px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

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

.rank-thumb img {
    width: 76px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.rank-title {
    margin: 0 0 6px;
    font-size: 18px;
}

.rank-desc {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.page-hero {
    padding: 62px 0 46px;
    color: #fff;
    background: linear-gradient(120deg, #be123c, #db2777, #f97316);
    overflow: hidden;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.1;
}

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

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

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

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 32px 74px rgba(15, 23, 42, 0.28);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at center, rgba(244, 63, 94, 0.2), rgba(2, 6, 23, 0.54));
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start {
    pointer-events: auto;
    width: 96px;
    height: 96px;
    border: 0;
    border-radius: 50%;
    color: var(--rose);
    background: rgba(255, 255, 255, 0.96);
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.38);
}

.player-shell.is-playing .player-cover {
    opacity: 0;
    visibility: hidden;
}

.detail-card {
    padding: 24px;
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow);
}

.detail-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-card p {
    margin: 0 0 16px;
    color: #334155;
}

.detail-side {
    overflow: hidden;
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow);
}

.detail-side img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

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

.detail-title {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.12;
}

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

.search-results {
    display: grid;
    gap: 16px;
}

.search-result-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.search-result-card img {
    width: 92px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 16px;
}

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

.footer-inner {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    gap: 28px;
    padding: 46px 0;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
}

.site-footer p {
    margin: 0;
    color: #cbd5e1;
}

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

.footer-bottom {
    padding: 22px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    color: #94a3b8;
}

.hidden-card {
    display: none !important;
}

.empty-state {
    padding: 32px;
    border-radius: 24px;
    color: var(--muted);
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

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

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

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

    .hero-poster {
        max-width: 330px;
        margin: 0 auto;
    }

    .category-strip,
    .movie-grid,
    .movie-grid.compact,
    .category-grid,
    .related-grid,
    .footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .brand-text {
        font-size: 17px;
    }

    .hero,
    .hero-slide,
    .hero-content {
        min-height: auto;
    }

    .hero-content {
        padding: 48px 0 80px;
    }

    .hero-actions,
    .section-head,
    .filter-panel {
        display: grid;
        grid-template-columns: 1fr;
    }

    .category-strip,
    .movie-grid,
    .movie-grid.compact,
    .category-grid,
    .related-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .rank-item,
    .search-result-card {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .rank-thumb,
    .rank-item .play-link,
    .search-result-card img,
    .search-result-card .play-link {
        display: none;
    }
}
