:root {
    --rose-50: #fff1f2;
    --rose-100: #ffe4e6;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    --pink-500: #ec4899;
    --purple-600: #9333ea;
    --blue-50: #eff6ff;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(17, 24, 39, 0.13);
    --soft-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, 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, var(--rose-50) 0%, #ffffff 36%, var(--blue-50) 100%);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
}

.nav-wrap {
    height: 72px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--rose-600);
    font-weight: 900;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand {
    font-size: 21px;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--rose-500), var(--pink-500), var(--purple-600));
    box-shadow: 0 10px 24px rgba(244, 63, 94, 0.35);
}

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

.desktop-nav a,
.mobile-panel a {
    color: #374151;
    font-weight: 700;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
    color: var(--rose-500);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.mobile-panel input,
.wide-search input,
.filter-bar input,
.filter-bar select,
.search-tools select {
    border: 1px solid #f3c4ce;
    background: #ffffff;
    color: var(--ink);
    border-radius: 999px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
    width: 220px;
    padding: 10px 14px;
}

.nav-search input:focus,
.mobile-panel input:focus,
.wide-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.search-tools select:focus {
    border-color: var(--rose-500);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.13);
}

.nav-search button,
.mobile-panel button,
.wide-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 17px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
    cursor: pointer;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(244, 63, 94, 0.26);
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: #374151;
    font-size: 28px;
    cursor: pointer;
}

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

.mobile-panel[hidden] {
    display: none;
}

.mobile-panel form {
    display: flex;
    gap: 8px;
}

.mobile-panel input {
    flex: 1;
    padding: 11px 14px;
}

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: #111827;
}

.hero-stage {
    position: relative;
    min-height: 640px;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.06);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(244, 63, 94, 0.62), transparent 34%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.94) 0%, rgba(17, 24, 39, 0.78) 46%, rgba(17, 24, 39, 0.24) 100%),
        linear-gradient(0deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.12));
}

.hero-content {
    position: relative;
    min-height: 640px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 380px;
    gap: 56px;
    align-items: center;
    color: #ffffff;
    padding: 86px 0 120px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    color: #be123c;
    background: rgba(255, 255, 255, 0.9);
    font-weight: 900;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.12);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 20px 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.hero-summary {
    width: min(660px, 100%);
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
    line-height: 1.85;
}

.hero-tags,
.detail-meta,
.meta-line,
.tag-row,
.quick-links,
.hero-actions,
.next-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags a,
.hero-tags span,
.detail-meta span,
.meta-line span,
.tag-row span {
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.14);
    color: inherit;
    font-size: 13px;
    font-weight: 800;
}

.hero-actions {
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 0 24px;
    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: #ffffff;
    background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
    box-shadow: 0 16px 32px rgba(244, 63, 94, 0.34);
}

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

.hero-poster {
    display: block;
    height: 500px;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.48);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-rail {
    position: absolute;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.hero-thumb {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 18px;
    padding: 8px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(14px);
    cursor: pointer;
    text-align: left;
}

.hero-thumb.active {
    background: rgba(244, 63, 94, 0.62);
    border-color: rgba(255, 255, 255, 0.64);
}

.hero-thumb img {
    width: 46px;
    height: 60px;
    object-fit: cover;
    border-radius: 12px;
    flex: 0 0 auto;
}

.hero-thumb span {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 13px;
    font-weight: 900;
}

.page-main {
    padding-bottom: 72px;
}

.page-section {
    padding: 52px 0;
}

.section-panel {
    position: relative;
    z-index: 3;
    margin-top: -46px;
    border-radius: var(--radius);
    padding: 26px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.quick-search-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
}

.wide-search label {
    display: block;
    margin-bottom: 10px;
    color: var(--rose-600);
    font-weight: 900;
}

.wide-search div {
    display: flex;
    gap: 10px;
}

.wide-search input {
    flex: 1;
    padding: 15px 18px;
}

.quick-links a,
.section-link,
.next-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    border-radius: 999px;
    color: var(--rose-600);
    background: var(--rose-50);
    font-weight: 900;
    transition: transform 0.2s ease, background 0.2s ease;
}

.quick-links a:hover,
.section-link:hover,
.next-links a:hover {
    transform: translateY(-2px);
    background: var(--rose-100);
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(28px, 3.4vw, 42px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.section-head p {
    max-width: 700px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

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

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

.compact-grid.one-col {
    grid-template-columns: 1fr;
}

.movie-card {
    min-width: 0;
    border-radius: 22px;
    background: var(--card);
    overflow: hidden;
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card .poster {
    position: relative;
    display: block;
    height: 285px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--rose-100), var(--blue-50));
}

.movie-card.compact .poster {
    height: 220px;
}

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

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 58%;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.68), transparent);
}

.region-badge,
.rank-num {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
}

.region-badge {
    right: 12px;
    top: 12px;
    padding: 7px 11px;
    background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
    font-size: 12px;
}

.rank-num {
    left: 12px;
    top: 12px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: rgba(17, 24, 39, 0.72);
    backdrop-filter: blur(12px);
}

.movie-info {
    padding: 16px;
}

.movie-title,
.rank-title {
    display: block;
    color: var(--ink);
    font-weight: 900;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-title {
    min-height: 44px;
    font-size: 17px;
}

.movie-title:hover,
.rank-title:hover {
    color: var(--rose-500);
}

.movie-info p,
.rank-body p,
.category-tile p,
.page-hero p,
.content-card p {
    color: var(--muted);
    line-height: 1.75;
}

.movie-info p {
    min-height: 50px;
    margin: 10px 0 12px;
    font-size: 14px;
}

.meta-line {
    color: var(--muted);
    gap: 7px;
}

.meta-line span {
    color: var(--muted);
    background: #f9fafb;
    padding: 5px 9px;
    font-size: 12px;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    color: #be123c;
    background: var(--rose-50);
}

.tag-row.large span {
    padding: 9px 13px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 34px;
    align-items: start;
}

.ranking-box,
.side-recommend,
.content-card {
    border-radius: var(--radius);
    padding: 24px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

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

.rank-list.small .rank-card {
    grid-template-columns: 64px 78px 1fr;
    padding: 10px;
}

.rank-card {
    display: grid;
    grid-template-columns: 58px 110px 1fr;
    gap: 16px;
    align-items: center;
    border-radius: 20px;
    padding: 14px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.ranking-index {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--rose-500), var(--purple-600));
    font-weight: 900;
}

.rank-poster {
    height: 128px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--rose-50);
}

.rank-list.small .rank-poster {
    height: 88px;
}

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

.rank-body p {
    margin: 8px 0 10px;
}

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

.category-tile {
    border-radius: var(--radius);
    padding: 16px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.tile-covers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.tile-covers img {
    width: 100%;
    height: 116px;
    border-radius: 16px;
    object-fit: cover;
}

.category-tile span {
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 20px;
    font-weight: 900;
}

.category-tile p {
    margin: 0;
    font-size: 14px;
}

.page-hero {
    margin-top: 34px;
    border-radius: 34px;
    padding: 58px;
    color: #ffffff;
    background:
        radial-gradient(circle at 14% 20%, rgba(255, 255, 255, 0.3), transparent 30%),
        linear-gradient(135deg, var(--rose-500), var(--pink-500), var(--purple-600));
    box-shadow: var(--shadow);
}

.page-hero.slim-hero h1,
.page-hero.category-hero h1 {
    font-size: clamp(38px, 6vw, 64px);
}

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

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 800;
}

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

.filter-bar,
.search-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 12px;
    margin-bottom: 26px;
    padding: 18px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.filter-bar input,
.filter-bar select,
.search-tools select {
    min-height: 46px;
    padding: 0 16px;
}

.empty-state {
    margin: 24px 0;
    padding: 22px;
    border-radius: 18px;
    color: var(--muted);
    background: #ffffff;
    text-align: center;
    box-shadow: var(--soft-shadow);
}

.stacked-sections {
    display: grid;
    gap: 42px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background-image: var(--detail-bg);
    background-size: cover;
    background-position: center;
}

.detail-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.7), rgba(17, 24, 39, 0.38)),
        radial-gradient(circle at 18% 18%, rgba(244, 63, 94, 0.55), transparent 34%);
    backdrop-filter: blur(4px);
}

.detail-hero-inner {
    position: relative;
    padding: 54px 0 64px;
}

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

.detail-cover {
    height: 470px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.48);
}

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

.detail-copy h1 {
    max-width: 760px;
}

.detail-one-line {
    max-width: 780px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
    line-height: 1.8;
}

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

.detail-copy .btn {
    margin-top: 26px;
}

.player-section h2 {
    margin-top: 0;
    font-size: clamp(28px, 4vw, 44px);
}

.player-shell {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #0f172a;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.24));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--rose-500), var(--pink-500));
    box-shadow: 0 20px 48px rgba(244, 63, 94, 0.36);
    font-size: 34px;
}

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

.prose-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.content-card h2 {
    margin-top: 0;
    font-size: 28px;
}

.content-card p {
    font-size: 17px;
}

.next-links {
    justify-content: space-between;
    padding-top: 10px;
    padding-bottom: 10px;
}

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

.search-page-form {
    margin-top: 28px;
    max-width: 800px;
}

.site-footer {
    margin-top: 40px;
    padding: 54px 0;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 46px;
    align-items: start;
}

.footer-brand {
    color: #ffffff;
    font-size: 22px;
}

.site-footer p {
    max-width: 520px;
    margin: 14px 0 0;
    color: #9ca3af;
    line-height: 1.8;
}

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

.footer-links a {
    color: #d1d5db;
}

.footer-links a:hover {
    color: #ffffff;
}

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

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

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

    .hero-content,
    .split-section,
    .ranking-layout,
    .prose-section,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

    .hero-rail {
        grid-template-columns: repeat(5, 1fr);
        overflow-x: auto;
    }

    .hero-thumb {
        min-width: 160px;
    }

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

    .detail-cover {
        height: 360px;
    }
}

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

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

    .nav-wrap {
        height: 66px;
    }

    .brand {
        font-size: 18px;
    }

    .hero,
    .hero-stage,
    .hero-content {
        min-height: 590px;
    }

    .hero-content {
        padding: 64px 0 130px;
    }

    .hero-summary,
    .detail-one-line {
        font-size: 16px;
    }

    .hero-rail {
        width: calc(100% - 28px);
        bottom: 18px;
    }

    .section-panel,
    .quick-search-panel,
    .wide-search div,
    .filter-bar,
    .search-tools,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .quick-links {
        justify-content: flex-start;
    }

    .section-head {
        display: grid;
        align-items: start;
    }

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

    .movie-card .poster {
        height: 230px;
    }

    .movie-card.compact .poster {
        height: 210px;
    }

    .movie-info {
        padding: 13px;
    }

    .rank-card,
    .rank-list.small .rank-card {
        grid-template-columns: 46px 82px 1fr;
        gap: 10px;
    }

    .rank-poster,
    .rank-list.small .rank-poster {
        height: 92px;
    }

    .page-hero {
        padding: 34px 22px;
        border-radius: 24px;
    }

    .detail-hero-inner {
        padding: 34px 0 44px;
    }

    .detail-cover {
        width: min(260px, 100%);
        height: 360px;
    }
}

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

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

    .movie-card .poster,
    .movie-card.compact .poster {
        height: 330px;
    }

    .rank-card,
    .rank-list.small .rank-card {
        grid-template-columns: 42px 72px 1fr;
    }

    .rank-body p {
        display: none;
    }

    .tile-covers img {
        height: 150px;
    }

    .footer-grid {
        gap: 24px;
    }
}
