:root {
    --rose: #e11d48;
    --rose-dark: #be123c;
    --orange: #ea580c;
    --orange-soft: #ffedd5;
    --rose-soft: #fff1f2;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --page: #fff7ed;
    --card: #ffffff;
    --shadow: 0 18px 48px rgba(17, 24, 39, 0.12);
    --shadow-soft: 0 10px 28px rgba(225, 29, 72, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

img {
    display: block;
    max-width: 100%;
    background: linear-gradient(135deg, #f43f5e, #fb923c);
}

button,
input,
select {
    font: inherit;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(225, 29, 72, 0.08);
}

.header-inner {
    height: 74px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: var(--ink);
    white-space: nowrap;
}

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

.logo-text {
    font-size: 20px;
    letter-spacing: -0.02em;
}

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

.nav-link {
    padding: 10px 14px;
    color: #374151;
    font-weight: 700;
    border-radius: 999px;
    transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--rose);
    background: var(--rose-soft);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.04);
}

.header-search input {
    width: 220px;
    border: 0;
    outline: 0;
    padding: 9px 8px 9px 14px;
    background: transparent;
}

.header-search button,
.inline-search button {
    border: 0;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--rose), var(--orange));
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--rose-soft);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: var(--rose);
}

.mobile-nav {
    display: none;
    padding: 0 16px 18px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.mobile-nav.open {
    display: grid;
    gap: 10px;
}

.mobile-nav a,
.mobile-sub-link {
    padding: 12px 14px;
    border-radius: 14px;
    font-weight: 700;
    background: #fff7ed;
}

.mobile-category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.hero {
    position: relative;
    height: 620px;
    overflow: hidden;
    background: #111827;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 24%, rgba(251, 146, 60, 0.55), transparent 36%),
        linear-gradient(90deg, rgba(190, 18, 60, 0.92), rgba(234, 88, 12, 0.82) 52%, rgba(17, 24, 39, 0.28));
    z-index: 1;
}

.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 120px;
    z-index: 4;
    background: linear-gradient(0deg, var(--page), transparent);
}

.hero-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    align-items: center;
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: var(--rose);
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #ffe4e6;
    margin-bottom: 18px;
}

.hero h1 {
    margin: 0 0 24px;
    font-size: clamp(42px, 7vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero h1 span {
    color: #ffe4e6;
}

.hero p {
    margin: 0 0 30px;
    max-width: 620px;
    color: #fff1f2;
    font-size: 20px;
    line-height: 1.8;
}

.hero-actions,
.cta-inner,
.detail-info .btn {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

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

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

.btn.primary {
    color: var(--rose);
    background: #fff;
    box-shadow: 0 20px 46px rgba(17, 24, 39, 0.24);
}

.btn.ghost {
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.78);
}

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

.hero-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 26px;
}

.hero-tags span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

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

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

.hero-dots button.active {
    width: 32px;
    background: #fff;
}

.quick-search-panel {
    position: relative;
    z-index: 8;
    margin-top: -38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search-panel h2 {
    margin: 8px 0 0;
    font-size: clamp(24px, 3vw, 34px);
}

.inline-search {
    flex: 1;
    max-width: 560px;
    display: flex;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}

.inline-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0 16px;
    background: transparent;
}

.content-section {
    padding: 72px 0;
}

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

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

.section-head p {
    margin: 10px 0 0;
    color: var(--muted);
}

.section-more {
    flex: 0 0 auto;
    color: var(--rose);
    font-weight: 900;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--rose-soft);
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 8px 26px rgba(17, 24, 39, 0.08);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #f43f5e, #fb923c);
}

.movie-card.compact .poster-link,
.featured-grid .poster-link {
    aspect-ratio: 4 / 3;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 60%);
    transition: opacity 0.28s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

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

.play-pill {
    left: 16px;
    bottom: 16px;
    opacity: 0;
    padding: 9px 14px;
    background: rgba(225, 29, 72, 0.92);
    transform: translateY(8px);
    transition: 0.28s ease;
}

.movie-card:hover .play-pill {
    opacity: 1;
    transform: translateY(0);
}

.rating-pill {
    right: 12px;
    top: 12px;
    padding: 7px 10px;
    background: #eab308;
    box-shadow: 0 8px 18px rgba(234, 179, 8, 0.24);
}

.rank-badge {
    left: 12px;
    top: 12px;
    padding: 7px 10px;
    background: linear-gradient(135deg, var(--rose), var(--orange));
}

.card-body {
    padding: 18px;
}

.card-category {
    display: inline-flex;
    color: var(--rose);
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 8px;
}

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

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

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

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

.card-meta span,
.detail-meta span,
.tag-row span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #f9fafb;
}

.tag-row {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.tag-row span {
    color: var(--rose);
    background: var(--rose-soft);
    font-size: 12px;
    font-weight: 800;
}

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

.category-chip {
    min-height: 132px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(17, 24, 39, 0.07);
    border: 1px solid rgba(225, 29, 72, 0.06);
    transition: 0.25s ease;
}

.category-chip:hover {
    color: #fff;
    transform: translateY(-5px);
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: var(--shadow-soft);
}

.category-chip strong {
    font-size: 20px;
}

.category-chip span {
    color: var(--muted);
    line-height: 1.7;
}

.category-chip:hover span {
    color: #fff1f2;
}

.cta-band {
    padding: 80px 0;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--orange));
}

.cta-inner {
    flex-direction: column;
    text-align: center;
}

.cta-inner h2 {
    margin: 0;
    font-size: clamp(32px, 5vw, 50px);
}

.cta-inner p {
    max-width: 720px;
    margin: 0;
    color: #fff1f2;
    font-size: 18px;
    line-height: 1.8;
}

.toolbar {
    position: sticky;
    top: 82px;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px;
    border: 1px solid rgba(225, 29, 72, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
    backdrop-filter: blur(14px);
}

.toolbar input,
.toolbar select {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 16px;
    outline: 0;
    background: #fff;
}

.toolbar input {
    flex: 1;
    min-width: 180px;
}

.toolbar span {
    color: var(--rose);
    font-weight: 900;
}

.page-hero {
    color: #fff;
    background:
        radial-gradient(circle at 76% 20%, rgba(251, 146, 60, 0.5), transparent 30%),
        linear-gradient(135deg, #be123c, #ea580c);
}

.compact-hero {
    padding: 86px 0 76px;
}

.compact-hero h1 {
    max-width: 860px;
    margin: 12px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.compact-hero p {
    max-width: 760px;
    color: #fff1f2;
    font-size: 18px;
    line-height: 1.8;
}

.compact-hero .section-kicker {
    color: #ffe4e6;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    color: #ffe4e6;
    font-weight: 800;
}

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

.category-overview {
    display: grid;
    gap: 44px;
}

.category-overview-block {
    padding: 26px;
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(17, 24, 39, 0.07);
}

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

.category-overview-head h2 {
    margin: 8px 0;
}

.category-overview-head p {
    color: var(--muted);
}

.table-wrap {
    overflow-x: auto;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(17, 24, 39, 0.07);
}

.rank-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 840px;
}

.rank-table th,
.rank-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.rank-table th {
    color: var(--rose);
    background: var(--rose-soft);
}

.rank-table td p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.rank-number {
    color: var(--rose);
    font-size: 20px;
    font-weight: 900;
}

.detail-hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    color: #fff;
    background: #111827;
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(3px);
    transform: scale(1.04);
}

.detail-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(190, 18, 60, 0.72), rgba(234, 88, 12, 0.55)),
        linear-gradient(0deg, rgba(17, 24, 39, 0.88), transparent 60%);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 54px 0 70px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4);
}

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

.detail-info h1 {
    margin: 12px 0 18px;
    font-size: clamp(38px, 6vw, 74px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.detail-one-line {
    max-width: 820px;
    margin: 0 0 20px;
    color: #fff1f2;
    font-size: 20px;
    line-height: 1.8;
}

.detail-meta span {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

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

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.player-card video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f172a;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    color: #fff;
    cursor: pointer;
    border: 0;
    background: radial-gradient(circle at center, rgba(225, 29, 72, 0.44), rgba(15, 23, 42, 0.76));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.player-overlay span {
    width: 80px;
    height: 80px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--rose);
    font-size: 28px;
    background: #fff;
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.32);
}

.player-overlay strong {
    font-size: 20px;
}

.player-status {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 3;
    color: #fff;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

.detail-text {
    display: grid;
    gap: 22px;
}

.text-panel,
.info-grid {
    padding: 28px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(17, 24, 39, 0.07);
}

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

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

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

.info-grid div {
    padding: 18px;
    border-radius: 18px;
    background: #fff7ed;
}

.info-grid strong,
.info-grid span {
    display: block;
}

.info-grid strong {
    color: var(--rose);
    margin-bottom: 8px;
}

.site-footer {
    padding: 54px 0;
    color: #ffe4e6;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
}

.footer-logo {
    color: #fff;
    margin-bottom: 16px;
}

.site-footer p {
    max-width: 520px;
    color: #d1d5db;
    line-height: 1.8;
}

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

.site-footer a:not(.logo) {
    display: block;
    margin: 8px 0;
    color: #d1d5db;
}

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

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

.no-results {
    grid-column: 1 / -1;
    padding: 40px;
    text-align: center;
    color: var(--muted);
    border-radius: 24px;
    background: #fff;
}

@media (max-width: 1100px) {
    .header-search {
        display: none;
    }

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

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

@media (max-width: 900px) {
    .desktop-nav {
        display: none;
    }

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

    .hero {
        height: 560px;
    }

    .quick-search-panel,
    .section-head,
    .category-overview-head {
        align-items: stretch;
        flex-direction: column;
    }

    .inline-search,
    .toolbar {
        flex-direction: column;
        border-radius: 24px;
    }

    .inline-search input,
    .toolbar input,
    .toolbar select,
    .inline-search button {
        width: 100%;
        min-height: 46px;
    }

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

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

    .detail-poster {
        width: min(280px, 80%);
    }

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

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

    .header-inner {
        height: 66px;
    }

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

    .hero {
        height: 610px;
    }

    .hero p,
    .detail-one-line {
        font-size: 17px;
    }

    .category-chip-grid,
    .movie-grid,
    .featured-grid,
    .small-grid,
    .all-grid {
        grid-template-columns: 1fr;
    }

    .card-body p {
        min-height: 0;
    }

    .content-section {
        padding: 48px 0;
    }

    .quick-search-panel {
        padding: 20px;
    }

    .player-overlay span {
        width: 66px;
        height: 66px;
    }
}
