:root {
    --pink: #ec4899;
    --rose: #f43f5e;
    --blue: #3b82f6;
    --cyan: #06b6d4;
    --green: #10b981;
    --orange: #f97316;
    --yellow: #f59e0b;
    --black: #0f172a;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--gray-800);
    background: linear-gradient(180deg, var(--gray-50), var(--white));
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #fee2e2, #dbeafe 52%, #dcfce7);
}

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, rgba(253, 242, 248, 0.96), rgba(239, 246, 255, 0.96), rgba(240, 253, 244, 0.96));
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 76px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--white);
    font-size: 22px;
    font-weight: 900;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #fb923c);
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.26);
}

.brand-text strong {
    display: block;
    font-size: 24px;
    line-height: 1.1;
    color: transparent;
    background: linear-gradient(90deg, #dc2626, #ea580c);
    -webkit-background-clip: text;
    background-clip: text;
}

.brand-text em {
    display: block;
    color: var(--gray-600);
    font-size: 12px;
    font-style: normal;
}

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

.nav-link,
.mobile-link {
    color: var(--gray-700);
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--pink);
}

.header-search {
    display: flex;
    align-items: center;
    width: min(320px, 30vw);
    padding: 3px;
    border-radius: 999px;
    background: var(--white);
    box-shadow: inset 0 0 0 1px rgba(236, 72, 153, 0.12), 0 8px 22px rgba(15, 23, 42, 0.06);
}

.header-search input,
.mobile-nav input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--gray-800);
    background: transparent;
}

.header-search input {
    padding: 10px 14px;
}

.header-search button,
.mobile-nav button,
.filter-bar button,
.primary-button,
.secondary-button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    color: var(--white);
    font-weight: 800;
    background: linear-gradient(90deg, var(--pink), var(--blue));
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
    padding: 10px 16px;
}

.header-search button:hover,
.mobile-nav button:hover,
.filter-bar button:hover,
.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(236, 72, 153, 0.25);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    color: var(--gray-800);
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.mobile-nav {
    display: none;
    padding: 0 16px 18px;
    background: rgba(255, 255, 255, 0.96);
}

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

.mobile-nav form {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-radius: 18px;
    background: var(--gray-50);
}

.mobile-nav input {
    padding: 10px;
}

.mobile-nav button {
    padding: 10px 14px;
}

.hero {
    position: relative;
    height: 600px;
    min-height: 540px;
    overflow: hidden;
    color: var(--white);
    background: var(--black);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    filter: saturate(1.08) contrast(1.02);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.1));
}

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

.hero-copy {
    max-width: 680px;
    padding-top: 24px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #f9a8d4;
    font-weight: 800;
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 660px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2.4vw, 22px);
}

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

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
}

.secondary-button {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

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

.hero-tags span,
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    color: var(--white);
    font-size: 13px;
    font-weight: 800;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

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

.hero-dot {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

.hero-dot.active {
    background: var(--white);
}

.hero-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 110px;
    background: linear-gradient(0deg, var(--gray-50), transparent);
    z-index: 4;
}

.section {
    padding: 64px 0;
}

.section-soft {
    background: linear-gradient(90deg, #fdf2f8, #eff6ff, #f0fdf4);
}

.section-white {
    background: var(--white);
}

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

.title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-bar {
    width: 5px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--pink), var(--blue));
}

.section h2,
.page-hero h1,
.movie-info h1,
.player-info h1 {
    margin: 0;
    color: var(--gray-800);
    font-size: clamp(26px, 3.6vw, 38px);
    line-height: 1.15;
}

.section-head p,
.page-hero p {
    margin: 8px 0 0;
    color: var(--gray-600);
}

.more-link {
    color: var(--pink);
    font-weight: 800;
}

.grid {
    display: grid;
    gap: 24px;
}

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

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

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

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

.movie-card {
    position: relative;
    min-width: 0;
    border-radius: 20px;
    background: var(--white);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.movie-card-link,
.compact-link {
    display: block;
    height: 100%;
}

.movie-thumb {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #fdf2f8, #dbeafe);
}

.movie-thumb-wide {
    aspect-ratio: 16 / 10;
}

.movie-thumb img {
    transition: transform 0.45s ease;
}

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

.movie-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.54));
    opacity: 0.65;
}

.duration,
.rank-badge {
    position: absolute;
    z-index: 2;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    border-radius: 999px;
}

.duration {
    right: 10px;
    bottom: 10px;
    padding: 4px 9px;
    background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--orange), var(--rose));
    box-shadow: 0 10px 18px rgba(249, 115, 22, 0.35);
}

.play-mark {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    color: var(--pink);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-mark,
.related-item:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-meta-line,
.movie-card-foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--gray-500);
    font-size: 12px;
}

.movie-meta-line span,
.movie-card-foot span {
    max-width: 100%;
}

.movie-card h3 {
    display: -webkit-box;
    margin: 8px 0;
    min-height: 2.8em;
    color: var(--gray-800);
    font-size: 18px;
    line-height: 1.4;
    font-weight: 900;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: var(--pink);
}

.movie-card p {
    display: -webkit-box;
    min-height: 3.2em;
    margin: 0 0 12px;
    color: var(--gray-600);
    font-size: 14px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card-foot {
    justify-content: space-between;
}

.movie-card-horizontal .movie-card-link {
    display: grid;
    grid-template-columns: 42% 1fr;
}

.movie-card-horizontal .movie-card-body {
    padding: 18px;
}

.movie-card-horizontal h3 {
    font-size: 20px;
}

.movie-card-compact {
    border-radius: 16px;
}

.movie-card-compact h3 {
    min-height: 0;
    margin: 12px 12px 4px;
    font-size: 15px;
}

.movie-card-compact p {
    min-height: 0;
    margin: 0 12px 14px;
    font-size: 12px;
}

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

.category-card {
    display: block;
    padding: 24px;
    border-radius: 22px;
    background: linear-gradient(135deg, #fdf2f8, #eff6ff);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    margin-bottom: 16px;
    color: var(--white);
    font-size: 26px;
    font-weight: 900;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--pink), var(--blue));
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
    color: var(--gray-800);
}

.category-card p {
    margin: 0;
    color: var(--gray-600);
    font-size: 14px;
}

.page-hero {
    padding: 62px 0;
    color: var(--white);
    background: linear-gradient(90deg, var(--pink), var(--blue), var(--green));
}

.page-hero h1,
.page-hero p {
    color: var(--white);
}

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

.breadcrumb a:hover {
    color: var(--white);
}

.content-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 30px;
    padding: 46px 0 70px;
}

.sidebar-panel,
.filter-panel,
.movie-info,
.player-info,
.related-panel {
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.sidebar-panel {
    position: sticky;
    top: 100px;
    padding: 20px;
}

.sidebar-panel h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.sidebar-panel a {
    display: block;
    margin-bottom: 8px;
    padding: 10px 12px;
    color: var(--gray-700);
    font-weight: 700;
    border-radius: 14px;
}

.sidebar-panel a.active,
.sidebar-panel a:hover {
    color: var(--white);
    background: linear-gradient(90deg, var(--pink), var(--blue));
}

.filter-panel {
    margin-bottom: 24px;
    padding: 18px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1.2fr 180px 160px 130px;
    gap: 12px;
}

.filter-bar input,
.filter-bar select {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    background: var(--gray-50);
    box-shadow: inset 0 0 0 1px var(--gray-200);
}

.filter-bar button {
    min-height: 46px;
}

.no-results {
    display: none;
    padding: 34px;
    color: var(--gray-600);
    text-align: center;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.no-results.show {
    display: block;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 68px 190px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    color: var(--white);
    font-size: 22px;
    font-weight: 900;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--orange), var(--rose));
}

.rank-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 16px;
}

.rank-info h2 {
    margin: 0 0 8px;
    color: var(--gray-800);
    font-size: 21px;
}

.rank-info p {
    margin: 0;
    color: var(--gray-600);
}

.rank-score {
    color: var(--yellow);
    font-size: 24px;
    font-weight: 900;
}

.movie-detail-page {
    background: var(--gray-50);
}

.player-top {
    padding: 24px 0;
    background: #020617;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--white);
    font-weight: 800;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
    position: absolute;
    inset: 0;
    opacity: 0.5;
    filter: blur(1px) saturate(1.08);
}

.play-button {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 999px;
    color: var(--pink);
    font-size: 34px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 22px 50px rgba(236, 72, 153, 0.35);
    cursor: pointer;
}

.player-message {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 3;
    display: none;
    padding: 10px 14px;
    color: var(--white);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.78);
}

.player-message.show {
    display: block;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 28px;
    padding: 40px 0 72px;
}

.movie-info {
    padding: 28px;
}

.info-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 22px;
}

.info-meta span,
.tag-list span {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--gray-700);
    font-weight: 700;
    background: var(--gray-100);
}

.gradient-pill {
    color: var(--white) !important;
    background: linear-gradient(90deg, var(--pink), var(--blue)) !important;
}

.article-block {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.article-block h2 {
    margin: 0 0 12px;
    font-size: 23px;
}

.article-block p {
    margin: 0;
    color: var(--gray-700);
    font-size: 16px;
}

.review-box {
    padding: 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fdf2f8, #eff6ff);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.related-panel {
    position: sticky;
    top: 100px;
    padding: 20px;
}

.related-panel h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.related-item {
    display: grid;
    grid-template-columns: 116px 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.related-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
}

.related-info h3 {
    display: -webkit-box;
    margin: 0 0 6px;
    color: var(--gray-800);
    font-size: 14px;
    line-height: 1.4;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-info p {
    margin: 0;
    color: var(--gray-500);
    font-size: 12px;
}

.more-recommend {
    padding-bottom: 72px;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 42px;
    padding: 46px 0;
}

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

.footer-brand strong {
    color: var(--white);
    font-size: 22px;
}

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

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

.site-footer a {
    display: block;
    margin-bottom: 8px;
    color: #9ca3af;
}

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

.footer-bottom {
    padding: 18px 0;
    color: #9ca3af;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

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

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

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

    .sidebar-panel,
    .related-panel {
        position: static;
    }

    .filter-bar {
        grid-template-columns: 1fr 1fr;
    }

    .rank-row {
        grid-template-columns: 54px 150px 1fr;
    }

    .rank-score {
        grid-column: 3;
        justify-self: start;
    }
}

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

    .header-inner {
        min-height: 66px;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
    }

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

    .hero {
        height: 560px;
        min-height: 520px;
    }

    .hero-copy {
        padding-top: 10px;
    }

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

    .primary-button,
    .secondary-button {
        width: 100%;
    }

    .section {
        padding: 44px 0;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .grid-5,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-horizontal .movie-card-link {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 48px 1fr;
    }

    .rank-cover {
        grid-column: 1 / -1;
        order: -1;
    }

    .rank-score {
        grid-column: 2;
    }

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

    .related-item {
        grid-template-columns: 104px 1fr;
    }
}
