:root {
    --rose-50: #fff1f2;
    --rose-100: #ffe4e6;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    --rose-700: #be123c;
    --amber-50: #fffbeb;
    --orange-50: #fff7ed;
    --blue-500: #3b82f6;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-soft: 0 16px 40px rgba(17, 24, 39, 0.10);
    --shadow-strong: 0 24px 70px rgba(17, 24, 39, 0.22);
    --radius-xl: 24px;
    --max-width: 1180px;
}

* {
    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(--gray-900);
    background: linear-gradient(180deg, var(--rose-50) 0%, #ffffff 34%, #ffffff 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(18px);
}

.site-header-inner {
    max-width: var(--max-width);
    height: 68px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.site-logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--rose-500), #fb7185);
    box-shadow: 0 10px 24px rgba(244, 63, 94, 0.36);
    font-size: 14px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

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

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--gray-100);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--gray-800);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 8px 20px 20px;
    border-top: 1px solid var(--gray-200);
    background: #ffffff;
}

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

.mobile-nav-link {
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--gray-700);
    background: var(--gray-50);
    font-weight: 700;
}

.home-hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #0f172a;
    isolation: isolate;
}

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

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

.hero-inner {
    position: relative;
    z-index: 2;
    min-height: 72vh;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 72px 20px 96px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    align-items: center;
    gap: 52px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.06);
    filter: saturate(1.1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 18% 28%, rgba(244, 63, 94, 0.42), transparent 34%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.52) 42%, rgba(15, 23, 42, 0.88));
}

.hero-content {
    color: #ffffff;
    max-width: 760px;
}

.hero-kicker,
.section-heading p,
.page-hero p {
    margin: 0 0 12px;
    color: var(--rose-500);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 0;
    font-size: clamp(44px, 7vw, 82px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero-summary {
    margin: 22px 0 0;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.75;
}

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

.hero-tags span,
.tag-list span,
.year-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    backdrop-filter: blur(12px);
}

.hero-actions,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 900;
    cursor: pointer;
    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-600), #fb7185);
    box-shadow: 0 14px 30px rgba(244, 63, 94, 0.34);
}

.btn-ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
}

.btn-soft {
    color: var(--rose-700);
    background: var(--rose-50);
    border-color: var(--rose-100);
}

.wide-btn {
    width: 100%;
    margin-top: 18px;
}

.hero-poster {
    display: block;
    transform: rotate(2deg);
    filter: drop-shadow(0 28px 60px rgba(0, 0, 0, 0.42));
}

.hero-poster .poster-frame {
    aspect-ratio: 2 / 3;
    border: 8px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
}

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

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

.hero-dot.is-active {
    width: 44px;
    background: #ffffff;
}

.intro-strip {
    max-width: var(--max-width);
    margin: -46px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.intro-item {
    padding: 24px;
    border-radius: 22px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-soft);
}

.intro-item strong {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
}

.intro-item span {
    color: rgba(255, 255, 255, 0.76);
}

.section-wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 72px 20px;
}

.section-heading {
    max-width: 720px;
    margin: 0 auto 36px;
    text-align: center;
}

.section-heading.align-left {
    margin-left: 0;
    text-align: left;
}

.section-heading h2,
.page-hero h1 {
    margin: 0;
    color: var(--gray-900);
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-heading span,
.page-hero span {
    display: block;
    margin-top: 12px;
    color: var(--gray-600);
    font-size: 17px;
    line-height: 1.7;
}

.light-heading h2,
.light-heading span {
    color: #ffffff;
}

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

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

.movie-card {
    min-width: 0;
}

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.10);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-frame {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background:
        radial-gradient(circle at 30% 20%, rgba(251, 113, 133, 0.78), transparent 28%),
        linear-gradient(135deg, #111827, #4c0519 48%, #fb7185);
}

.poster-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.25s ease;
}

.poster-frame.is-empty img {
    opacity: 0;
}

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

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

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

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: var(--rose-500);
    border-radius: 999px;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.25s ease;
    box-shadow: 0 14px 30px rgba(244, 63, 94, 0.36);
}

.movie-card-link:hover .play-badge,
.hero-poster:hover .play-badge {
    transform: translate(-50%, -50%) scale(1);
}

.card-labels {
    position: absolute;
    left: 12px;
    top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-labels span {
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: var(--rose-500);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.card-labels span + span {
    background: var(--blue-500);
}

.card-body {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.card-body strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--gray-900);
    font-size: 18px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-card-link:hover .card-body strong {
    color: var(--rose-600);
}

.card-meta {
    overflow: hidden;
    color: var(--gray-500);
    font-size: 14px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.card-desc {
    display: -webkit-box;
    overflow: hidden;
    color: var(--gray-700);
    font-size: 14px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.large-card {
    grid-row: span 2;
}

.large-card .movie-card-link {
    display: grid;
    grid-template-rows: 1fr auto;
}

.hot-section {
    padding: 72px 0;
    background: linear-gradient(135deg, #881337, #fb7185 48%, #f59e0b);
    overflow: hidden;
}

.movie-row {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px 16px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 300px);
    gap: 22px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
}

.movie-row .movie-card {
    scroll-snap-align: start;
}

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

.category-card {
    min-height: 210px;
    padding: 24px;
    border-radius: 22px;
    color: var(--gray-900);
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.09);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card strong {
    display: block;
    color: var(--rose-700);
    font-size: 23px;
    margin-bottom: 10px;
}

.category-card p {
    color: var(--gray-600);
    line-height: 1.65;
    margin: 0 0 16px;
}

.category-mini {
    display: grid;
    gap: 6px;
    color: var(--gray-500);
    font-size: 13px;
}

.category-mini span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.split-section,
.two-column-layout,
.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
    gap: 28px;
    align-items: start;
}

.rank-panel,
.year-panel,
.side-panel,
.detail-card,
.player-card,
.poster-panel {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.rank-panel,
.year-panel,
.side-panel,
.detail-card {
    padding: 28px;
}

.compact-list {
    display: grid;
    gap: 10px;
}

.compact-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.compact-link:last-child {
    border-bottom: 0;
}

.rank-num {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #ffffff;
    background: var(--rose-500);
    font-weight: 900;
}

.compact-title {
    overflow: hidden;
    color: var(--gray-900);
    font-weight: 900;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.compact-meta {
    color: var(--gray-500);
    font-size: 13px;
}

.text-link {
    display: inline-flex;
    margin-top: 22px;
    color: var(--rose-600);
    font-weight: 900;
}

.year-tags a {
    color: var(--rose-700);
    background: var(--rose-50);
}

.home-search,
.filter-bar {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.home-search input,
.filter-bar input {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 18px;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    background: #ffffff;
    color: var(--gray-900);
    outline: none;
}

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

.home-search button {
    min-width: 96px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--rose-600);
    font-weight: 900;
    cursor: pointer;
}

.page-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at 18% 20%, rgba(251, 113, 133, 0.5), transparent 30%),
        linear-gradient(135deg, #111827, #4c0519 56%, #9f1239);
}

.page-hero > div {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 82px 20px;
}

.page-hero h1,
.page-hero span {
    color: #ffffff;
}

.small-hero > div {
    padding: 72px 20px;
}

.category-hero .btn-ghost,
.rank-hero .btn-ghost {
    background: rgba(255, 255, 255, 0.16);
}

.sticky-filter {
    position: sticky;
    top: 84px;
    z-index: 20;
    margin: 0 0 30px;
    padding: 14px;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

.side-sticky {
    position: sticky;
    top: 96px;
}

.detail-wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 28px 20px 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--gray-600);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--rose-600);
    font-weight: 800;
}

.detail-main {
    min-width: 0;
}

.player-card {
    padding: 12px;
    margin-bottom: 24px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #000000;
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000000;
}

.player-start {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.68));
    cursor: pointer;
}

.player-start span {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--rose-500);
    box-shadow: 0 16px 36px rgba(244, 63, 94, 0.38);
    font-size: 30px;
    padding-left: 4px;
}

.player-shell.is-playing .player-start {
    opacity: 0;
    pointer-events: none;
}

.detail-card h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.detail-meta span {
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--rose-700);
    background: var(--rose-50);
    font-weight: 800;
    font-size: 14px;
}

.detail-line {
    color: var(--gray-800);
    font-size: 18px;
    line-height: 1.75;
    margin: 0 0 20px;
}

.detail-card h2,
.side-panel h2,
.footer-group h2 {
    margin: 26px 0 12px;
    color: var(--gray-900);
    font-size: 22px;
}

.detail-card h2:first-child,
.side-panel h2:first-child,
.footer-group h2:first-child {
    margin-top: 0;
}

.detail-card p {
    color: var(--gray-700);
    line-height: 1.9;
    margin: 0 0 12px;
}

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

.poster-panel {
    padding: 14px;
}

.poster-panel .poster-frame {
    border-radius: 18px;
}

.info-list {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
    margin: 0;
}

.info-list dt {
    color: var(--gray-500);
}

.info-list dd {
    margin: 0;
    color: var(--gray-900);
    font-weight: 800;
}

.related-wrap {
    padding: 34px 0 0;
}

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

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

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 54px 20px 34px;
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    gap: 34px;
}

.footer-logo {
    color: #ffffff;
}

.footer-brand p {
    color: #9ca3af;
    line-height: 1.75;
}

.footer-group {
    display: grid;
    align-content: start;
    gap: 10px;
}

.footer-group h2 {
    color: #ffffff;
    font-size: 17px;
}

.footer-group a,
.footer-group span {
    color: #9ca3af;
}

.footer-group a:hover {
    color: #fb7185;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 22px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    text-align: center;
    font-size: 14px;
}

.movie-card.is-hidden {
    display: none;
}

@media (max-width: 1080px) {
    .movie-grid,
    .featured-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .hero-inner {
        grid-template-columns: 1fr 280px;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .home-hero {
        min-height: 84vh;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        justify-items: start;
        gap: 28px;
        padding-top: 56px;
    }

    .hero-poster {
        max-width: 190px;
        transform: rotate(0deg);
    }

    .intro-strip,
    .split-section,
    .two-column-layout,
    .detail-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .intro-strip {
        margin-top: 0;
        padding-top: 20px;
        background: #111827;
    }

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

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

    .side-sticky,
    .sticky-filter {
        position: static;
    }
}

@media (max-width: 560px) {
    .site-header-inner {
        height: 62px;
    }

    .site-logo {
        font-size: 19px;
    }

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

    .hero-summary {
        font-size: 16px;
    }

    .hero-actions,
    .home-search,
    .filter-bar {
        flex-direction: column;
    }

    .movie-grid,
    .featured-grid,
    .related-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .section-wrap {
        padding: 50px 16px;
    }

    .page-hero > div {
        padding: 56px 16px;
    }

    .detail-wrap {
        padding: 20px 16px 52px;
    }

    .compact-link {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .compact-meta {
        grid-column: 2;
    }
}
