:root {
    --rose: #e11d48;
    --pink: #ec4899;
    --orange: #f97316;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #fff1f5;
    --panel: #ffffff;
    --shadow: 0 20px 50px rgba(17, 24, 39, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #fff7fb 0%, #ffffff 360px, #f9fafb 100%);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.nav-shell,
.footer-shell,
.content-section,
.quick-search,
.hero-content,
.detail-hero-inner,
.page-hero {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.nav-shell {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--rose), var(--pink), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: 0 10px 25px rgba(225, 29, 72, 0.28);
    font-size: 15px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 34px;
    color: #374151;
    font-weight: 700;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #fff1f5;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-button span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--rose);
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 10px 16px 18px;
    background: rgba(255, 255, 255, 0.96);
}

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

.mobile-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff7fb;
    font-weight: 700;
}

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #0f172a;
}

.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-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.04);
    filter: saturate(1.05);
}

.hero-bg::after,
.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    backdrop-filter: blur(12px);
    background: rgba(15, 23, 42, 0.45);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 25%, rgba(244, 63, 94, 0.72), transparent 34%),
        linear-gradient(120deg, rgba(17, 24, 39, 0.95), rgba(225, 29, 72, 0.74) 48%, rgba(249, 115, 22, 0.55));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 420px);
    gap: 70px;
    align-items: center;
    color: #fff;
    padding: 90px 0 70px;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.06em;
    font-weight: 950;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
    margin: 24px 0 0;
    font-size: clamp(17px, 2vw, 22px);
    color: rgba(255, 255, 255, 0.88);
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero-tags,
.tag-row,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    margin-top: 26px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.hero-tags span {
    padding: 7px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

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

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

.primary-button {
    color: var(--rose);
    background: #fff;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.22);
}

.secondary-button {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.36);
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-poster {
    position: relative;
    border-radius: 34px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

.hero-poster img,
.detail-poster img,
.movie-cover,
.category-card-posters img,
.rank-item img,
.rank-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #ffe4e6, #fb7185);
}

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

.hero-dots button {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
}

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

.quick-search {
    margin-top: -50px;
    position: relative;
    z-index: 8;
}

.search-panel,
.filter-panel,
.ranking-box,
.info-panel,
.movie-article,
.category-card-large,
.player-shell {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.search-panel {
    padding: 24px;
}

.search-panel label,
.filter-input label {
    display: block;
    font-weight: 900;
    margin-bottom: 10px;
}

.search-row {
    display: flex;
    gap: 14px;
}

.search-row input,
.filter-input input,
.filter-input select {
    width: 100%;
    height: 52px;
    border: 2px solid #f3f4f6;
    border-radius: 16px;
    padding: 0 18px;
    outline: none;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-row input:focus,
.filter-input input:focus,
.filter-input select:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.1);
}

.search-row button {
    border: 0;
    border-radius: 16px;
    padding: 0 30px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: 0 14px 28px rgba(225, 29, 72, 0.24);
}

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

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

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

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

.section-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--rose);
    font-weight: 900;
}

.movie-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 260px);
    gap: 22px;
    overflow-x: auto;
    padding: 4px 4px 20px;
    scroll-snap-type: x proximity;
}

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

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    border: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 16px 35px rgba(17, 24, 39, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    scroll-snap-align: start;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 50px rgba(225, 29, 72, 0.16);
    border-color: rgba(251, 113, 133, 0.45);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #fff1f2;
}

.movie-cover {
    transition: transform 0.35s ease;
}

.movie-card:hover .movie-cover {
    transform: scale(1.055);
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    background: rgba(17, 24, 39, 0.62);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-meta {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.card-body h3 {
    margin: 8px 0 8px;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 950;
}

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

.card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 14px;
    overflow: hidden;
    color: #4b5563;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row span {
    padding: 5px 8px;
    color: var(--rose);
    background: #fff1f2;
}

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

.category-tile {
    min-height: 148px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    color: #fff;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--rose), var(--pink) 50%, var(--orange));
    box-shadow: 0 18px 38px rgba(225, 29, 72, 0.2);
    transition: transform 0.22s ease;
}

.category-tile:hover,
.category-card-large:hover {
    transform: translateY(-4px);
}

.category-tile span {
    font-size: 22px;
    font-weight: 950;
}

.category-tile small {
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.5;
}

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

.ranking-box {
    position: sticky;
    top: 96px;
    padding: 20px;
}

.ranking-title {
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 950;
}

.rank-item {
    display: grid;
    grid-template-columns: 36px 52px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.rank-item:last-child {
    border-bottom: 0;
}

.rank-num,
.rank-row-num {
    color: var(--rose);
    font-weight: 950;
}

.rank-item img {
    width: 52px;
    height: 70px;
    border-radius: 12px;
}

.rank-item strong {
    font-size: 14px;
    line-height: 1.3;
}

.rank-item em,
.rank-row em {
    color: var(--muted);
    font-style: normal;
    font-weight: 800;
}

.page-hero {
    margin-top: 34px;
    min-height: 320px;
    display: flex;
    align-items: center;
    padding: 54px;
    color: #fff;
    border-radius: 34px;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.28), transparent 28%),
        linear-gradient(135deg, var(--rose), var(--pink) 46%, var(--orange));
    box-shadow: 0 30px 80px rgba(225, 29, 72, 0.22);
}

.compact-hero,
.category-hero,
.search-hero,
.ranking-hero {
    min-height: 280px;
}

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

.category-card-large {
    overflow: hidden;
    transition: transform 0.22s ease;
}

.category-card-link {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
    min-height: 210px;
}

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

.category-card-posters img {
    min-height: 82px;
    border-radius: 14px;
}

.category-card-large h2 {
    margin: 8px 0 10px;
    font-size: 26px;
    font-weight: 950;
}

.category-card-large p {
    color: var(--muted);
    margin: 0 0 20px;
}

.category-card-large span {
    color: var(--rose);
    font-weight: 900;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 220px 180px;
    gap: 16px;
    padding: 22px;
    margin-bottom: 28px;
}

.empty-state {
    display: none;
    padding: 50px;
    text-align: center;
    color: var(--muted);
    font-weight: 900;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 54px 78px minmax(0, 1fr) 70px;
    gap: 18px;
    align-items: center;
    padding: 14px 18px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(251, 113, 133, 0.55);
}

.rank-row img {
    width: 78px;
    height: 104px;
    border-radius: 14px;
}

.rank-row strong {
    font-size: 18px;
    font-weight: 950;
}

.rank-row p {
    margin: 6px 0 0;
    color: var(--muted);
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(225, 29, 72, 0.72), rgba(249, 115, 22, 0.48));
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 34px;
    color: rgba(255, 255, 255, 0.74);
    font-weight: 700;
}

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

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

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    aspect-ratio: 2 / 3;
    box-shadow: 0 32px 70px rgba(0, 0, 0, 0.35);
}

.detail-copy p {
    max-width: 820px;
}

.detail-meta {
    margin: 22px 0 0;
}

.detail-meta span {
    padding: 8px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.player-section {
    margin-top: -54px;
    position: relative;
    z-index: 3;
}

.player-shell {
    position: relative;
    overflow: hidden;
    padding: 0;
    background: #030712;
    aspect-ratio: 16 / 9;
}

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

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(3, 7, 18, 0.15), rgba(3, 7, 18, 0.72));
}

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    box-shadow: 0 22px 44px rgba(225, 29, 72, 0.35);
    font-size: 30px;
    padding-left: 4px;
}

.play-layer strong {
    font-size: 24px;
    font-weight: 950;
}

.movie-player.is-playing .play-layer {
    display: none;
}

.article-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

.movie-article,
.info-panel {
    padding: 30px;
}

.movie-article h2,
.info-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
    font-weight: 950;
}

.movie-article p {
    margin: 0 0 28px;
    color: #374151;
    font-size: 17px;
}

.info-panel dl {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px 14px;
    margin: 0;
}

.info-panel dt {
    color: var(--muted);
    font-weight: 900;
}

.info-panel dd {
    margin: 0;
    font-weight: 800;
}

.site-footer {
    margin-top: 80px;
    padding: 54px 0 26px;
    background: #111827;
    color: #fff;
}

.footer-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 34px;
    align-items: start;
}

.footer-shell p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.72);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    max-width: 360px;
    justify-content: flex-end;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 800;
}

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 30px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.58);
}

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

    .split-section,
    .article-section {
        grid-template-columns: 1fr;
    }

    .ranking-box {
        position: static;
    }
}

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

    .menu-button {
        display: flex;
    }

    .brand {
        font-size: 22px;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 86px;
    }

    .hero-poster {
        width: min(320px, 82vw);
        justify-self: center;
    }

    .search-row,
    .section-head {
        align-items: stretch;
        flex-direction: column;
    }

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

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

    .category-card-link,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(300px, 86vw);
    }

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

    .rank-row {
        grid-template-columns: 42px 64px minmax(0, 1fr);
    }

    .rank-row em {
        display: none;
    }
}

@media (max-width: 560px) {
    .nav-shell,
    .footer-shell,
    .content-section,
    .quick-search,
    .hero-content,
    .detail-hero-inner,
    .page-hero,
    .footer-bottom {
        width: min(100% - 22px, 1200px);
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 36px;
    }

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

    .movie-rail {
        grid-auto-columns: minmax(210px, 74vw);
    }

    .search-row button {
        height: 52px;
    }

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

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

    .play-icon {
        width: 64px;
        height: 64px;
        font-size: 24px;
    }

    .play-layer strong {
        font-size: 18px;
    }
}
