:root {
    --rose: #f43f5e;
    --pink: #ec4899;
    --orange: #f97316;
    --red: #e11d48;
    --ink: #111827;
    --muted: #6b7280;
    --line: #f3d4dc;
    --soft: #fff1f2;
    --bg: #fff7f8;
    --white: #ffffff;
    --shadow: 0 24px 80px rgba(225, 29, 72, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(244, 63, 94, 0.16);
}

.nav-wrap {
    max-width: 1180px;
    margin: 0 auto;
    min-height: 76px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 26px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-icon,
.footer-brand span {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--pink), var(--orange));
    box-shadow: 0 12px 32px rgba(244, 63, 94, 0.3);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 21px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--rose), var(--pink), var(--orange));
    -webkit-background-clip: text;
    color: transparent;
}

.brand-text small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

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

.desktop-nav > a,
.nav-dropdown > button {
    border: 0;
    background: transparent;
    color: #374151;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.desktop-nav > a:hover,
.desktop-nav > a.active,
.nav-dropdown > button:hover {
    color: var(--rose);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 14px);
    left: -18px;
    min-width: 176px;
    padding: 10px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: #4b5563;
}

.dropdown-panel a:hover {
    color: var(--rose);
    background: var(--soft);
}

.top-search,
.mobile-search,
.filter-bar {
    display: flex;
    align-items: center;
}

.top-search input,
.mobile-search input,
.filter-bar input {
    border: 1px solid #f4becb;
    outline: 0;
    background: #fff;
    color: var(--ink);
}

.top-search input {
    width: 190px;
    padding: 11px 16px;
    border-radius: 999px 0 0 999px;
}

.top-search button,
.mobile-search button,
.filter-bar button,
.btn,
.hero-button,
.player-button {
    border: 0;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(90deg, var(--rose), var(--pink));
    box-shadow: 0 12px 30px rgba(244, 63, 94, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.top-search button {
    padding: 11px 18px;
    border-radius: 0 999px 999px 0;
}

.top-search button:hover,
.mobile-search button:hover,
.filter-bar button:hover,
.btn:hover,
.hero-button:hover,
.player-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(244, 63, 94, 0.36);
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: var(--soft);
    color: var(--rose);
    font-size: 22px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(244, 63, 94, 0.14);
    background: #fff;
    padding: 14px 22px 22px;
}

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

.mobile-search input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 999px 0 0 999px;
}

.mobile-search button {
    padding: 12px 18px;
    border-radius: 0 999px 999px 0;
}

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

.mobile-panel a,
.mobile-cats a {
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff7f8;
    color: #4b5563;
}

.mobile-panel a.active,
.mobile-panel a:hover,
.mobile-cats a:hover {
    color: var(--rose);
    background: #ffe4e6;
}

.hero {
    position: relative;
    height: 680px;
    min-height: calc(100vh - 120px);
    overflow: hidden;
    background: #1f0d14;
}

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

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

.hero-slide img.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
    transform: scale(1.03);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 22%, rgba(244, 63, 94, 0.55), transparent 34%),
        linear-gradient(90deg, rgba(23, 9, 15, 0.96), rgba(94, 18, 45, 0.75), rgba(251, 113, 133, 0.24));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    height: 100%;
    margin: 0 auto;
    padding: 0 22px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
    align-items: center;
    gap: 48px;
}

.hero-kicker,
.section-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    color: #be123c;
    background: rgba(255, 228, 230, 0.96);
}

.hero h1 {
    max-width: 760px;
    margin: 22px 0 18px;
    color: #fff;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero h1 span {
    display: block;
    margin-top: 12px;
    font-size: clamp(26px, 4vw, 42px);
    color: #ffe4e6;
    letter-spacing: -0.025em;
}

.hero p {
    max-width: 680px;
    color: #fff1f2;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 34px;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 25px;
    border-radius: 999px;
    font-weight: 800;
}

.hero-button.secondary {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.hero-poster {
    position: relative;
    border-radius: 32px;
    padding: 12px;
    background: linear-gradient(145deg, rgba(255,255,255,0.45), rgba(255,255,255,0.06));
    box-shadow: 0 38px 90px rgba(0, 0, 0, 0.35);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 24px;
}

.hero-poster small {
    position: absolute;
    left: 26px;
    right: 26px;
    bottom: 26px;
    padding: 16px;
    border-radius: 20px;
    color: #fff;
    background: rgba(17, 24, 39, 0.68);
    backdrop-filter: blur(10px);
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-controls button {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 30px;
    height: 8px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.35);
}

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

main,
.page-hero,
.section,
.detail-page {
    position: relative;
}

.section,
.detail-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 72px 22px;
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
    margin: 12px 0 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.detail-title p {
    color: var(--muted);
    line-height: 1.8;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
}

.btn.light {
    color: var(--rose);
    background: #fff;
    border: 1px solid #ffe4e6;
    box-shadow: 0 12px 28px rgba(244, 63, 94, 0.12);
}

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

.movie-card {
    border-radius: 24px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #3f101f;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.poster-badge {
    position: absolute;
    left: 14px;
    top: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(225, 29, 72, 0.92);
    font-size: 12px;
    font-weight: 800;
}

.play-mark {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--rose);
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.card-body {
    padding: 18px;
}

.card-meta,
.rank-meta,
.detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.card-meta a,
.breadcrumb a,
.detail-meta a {
    color: var(--rose);
    font-weight: 800;
}

.card-body h3 {
    margin: 10px 0 8px;
    font-size: 19px;
    line-height: 1.35;
}

.card-body h3 a:hover,
.rank-title:hover,
.breadcrumb a:hover {
    color: var(--rose);
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span,
.detail-tags span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #be123c;
    background: #ffe4e6;
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    min-height: 190px;
    padding: 24px;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--pink), var(--orange));
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.22s ease;
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #a855f7, #ec4899, #fb7185);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #0f172a, #be123c, #fb7185);
}

.category-card:hover {
    transform: translateY(-6px) scale(1.01);
}

.category-card i {
    font-style: normal;
    font-size: 34px;
}

.category-card h3 {
    margin: 18px 0 8px;
    font-size: 24px;
}

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

.page-hero {
    padding: 82px 22px;
    color: #fff;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.25), transparent 32%),
        linear-gradient(125deg, var(--rose), var(--pink), var(--orange));
}

.page-hero .inner {
    max-width: 1180px;
    margin: 0 auto;
}

.page-hero h1 {
    color: #fff;
}

.page-hero p {
    max-width: 740px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

.filter-bar {
    margin-bottom: 26px;
}

.filter-bar input {
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
    border-radius: 999px 0 0 999px;
}

.filter-bar button {
    padding: 14px 22px;
    border-radius: 0 999px 999px 0;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 74px 92px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 14px;
}

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

.rank-poster img {
    width: 92px;
    height: 124px;
    object-fit: cover;
    border-radius: 18px;
}

.rank-title {
    display: inline-block;
    font-size: 21px;
    font-weight: 900;
    margin-bottom: 8px;
}

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

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

.breadcrumb {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.detail-main,
.detail-side,
.text-panel {
    background: #fff;
    border: 1px solid rgba(244, 63, 94, 0.08);
    border-radius: 28px;
    box-shadow: 0 18px 60px rgba(244, 63, 94, 0.12);
    overflow: hidden;
}

.player-shell {
    position: relative;
    background: #12070c;
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #12070c;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.16), rgba(17, 24, 39, 0.72));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-button {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    font-size: 34px;
    display: grid;
    place-items: center;
    padding-left: 6px;
}

.detail-title {
    padding: 28px;
}

.detail-title h1 {
    margin-top: 16px;
}

.detail-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 18px;
}

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

.text-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.text-panel p {
    margin: 0 0 18px;
    color: #4b5563;
    line-height: 1.95;
}

.detail-side {
    padding: 18px;
    height: max-content;
    position: sticky;
    top: 104px;
}

.detail-side h2 {
    margin: 6px 6px 16px;
    font-size: 22px;
}

.mini-list {
    display: grid;
    gap: 12px;
}

.mini-card {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 18px;
    transition: background 0.18s ease;
}

.mini-card:hover {
    background: var(--soft);
}

.mini-card img {
    width: 74px;
    height: 96px;
    object-fit: cover;
    border-radius: 14px;
}

.mini-card strong {
    display: block;
    line-height: 1.35;
}

.mini-card em {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.site-footer {
    color: #fff;
    background: linear-gradient(100deg, #831843, #9d174d, #c2410c);
    margin-top: 36px;
}

.footer-grid {
    max-width: 1180px;
    margin: 0 auto;
    padding: 52px 22px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 36px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-brand strong {
    font-size: 22px;
}

.site-footer p,
.site-footer a,
.footer-bottom {
    color: #ffe4e6;
}

.site-footer h3 {
    margin: 0 0 16px;
}

.site-footer ul {
    padding: 0;
    margin: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.site-footer a:hover {
    color: #fff;
}

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

.empty-message {
    display: none;
    padding: 36px;
    border-radius: 24px;
    text-align: center;
    background: #fff;
    color: var(--muted);
    border: 1px solid rgba(244, 63, 94, 0.12);
}

.empty-message.is-visible {
    display: block;
}

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

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

    .hero-content {
        grid-template-columns: 1fr;
        padding-top: 42px;
        padding-bottom: 90px;
    }

    .hero-poster {
        display: none;
    }

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

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

    .detail-side {
        position: static;
    }

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

@media (max-width: 760px) {
    .nav-wrap {
        min-height: 68px;
        padding: 0 16px;
    }

    .brand-text strong {
        font-size: 18px;
    }

    .brand-text small {
        display: none;
    }

    .hero {
        height: auto;
        min-height: 640px;
    }

    .hero-content {
        min-height: 640px;
        padding-left: 18px;
        padding-right: 18px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .section,
    .detail-page {
        padding: 48px 16px;
    }

    .section-head {
        display: block;
    }

    .section-head .btn {
        margin-top: 16px;
    }

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

    .card-body {
        padding: 14px;
    }

    .rank-item {
        grid-template-columns: 52px 72px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-num {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .rank-poster img {
        width: 72px;
        height: 96px;
    }

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

    .rank-info p {
        display: none;
    }

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

@media (max-width: 480px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 40px;
    }
}
