:root {
    --bg: #fff7ed;
    --bg-soft: #fff1f2;
    --panel: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #fed7aa;
    --primary: #f97316;
    --primary-dark: #ea580c;
    --secondary: #ec4899;
    --purple: #8b5cf6;
    --shadow: 0 18px 50px rgba(249, 115, 22, 0.14);
    --radius: 24px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.16), transparent 34rem),
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.12), transparent 32rem),
        linear-gradient(180deg, #fff7ed 0%, #fff 48%, #fff7ed 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(254, 215, 170, 0.82);
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.08);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.brand span:last-child {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 12px 25px rgba(236, 72, 153, 0.25);
    font-size: 16px;
}

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

.desktop-nav a {
    position: relative;
    transition: color 0.2s ease;
}

.desktop-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.desktop-nav a:hover {
    color: var(--primary);
}

.desktop-nav a:hover::after {
    transform: scaleX(1);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #fff7ed;
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: var(--text);
}

.mobile-nav {
    display: none;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px 18px;
}

.mobile-nav a {
    display: block;
    padding: 12px 0;
    border-top: 1px solid #ffedd5;
    font-weight: 700;
}

.nav-open .mobile-nav {
    display: block;
}

main {
    overflow: hidden;
}

.hero {
    max-width: var(--container);
    margin: 30px auto 0;
    padding: 0 20px;
}

.hero-stage {
    position: relative;
    min-height: 620px;
    border-radius: 36px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #fb923c, #ec4899 55%, #8b5cf6);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(22px) saturate(1.15);
    transform: scale(1.08);
    opacity: 0.3;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.18)),
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.22), transparent 26rem);
}

.hero-content {
    position: relative;
    z-index: 1;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
    align-items: center;
    gap: 44px;
    padding: 64px;
    color: #fff;
}

.hero-copy h1 {
    margin: 14px 0 18px;
    max-width: 760px;
    font-size: clamp(42px, 7vw, 80px);
    line-height: 0.95;
    letter-spacing: -0.08em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 19px;
    line-height: 1.8;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #fed7aa;
}

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

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

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

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

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    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: #fff;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    box-shadow: 0 16px 32px rgba(236, 72, 153, 0.28);
}

.btn-ghost {
    color: var(--primary);
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.hero .btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.24);
}

.btn-text {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.hero-poster {
    position: relative;
    justify-self: end;
    width: min(360px, 100%);
    aspect-ratio: 3 / 4;
    border-radius: 30px;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.36);
}

.hero-poster img,
.movie-poster img,
.rank-thumb img,
.category-card img,
.poster-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-poster span,
.poster-panel span,
.movie-score {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 8px 12px;
    color: #fff;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.22);
}

.hero-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: #fed7aa;
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.home-search-panel,
.content-section,
.page-hero,
.detail-hero {
    max-width: var(--container);
    margin: 46px auto 0;
    padding: 0 20px;
}

.home-search-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 32px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
    border: 1px solid #ffedd5;
}

.home-search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.text-card h2 {
    margin: 8px 0 0;
    color: var(--text);
    letter-spacing: -0.04em;
}

.home-search-panel h2 {
    font-size: clamp(24px, 3vw, 36px);
}

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

.section-heading h2 {
    font-size: clamp(28px, 4vw, 46px);
}

.section-heading p,
.page-hero p,
.category-overview-head p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-link {
    flex: 0 0 auto;
    color: var(--primary);
    font-weight: 900;
}

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

.category-card {
    position: relative;
    min-height: 180px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #111827;
}

.category-card img {
    position: absolute;
    inset: 0;
    opacity: 0.62;
    transition: transform 0.35s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.88));
}

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

.category-card div {
    position: absolute;
    z-index: 1;
    left: 18px;
    right: 18px;
    bottom: 16px;
    color: #fff;
}

.category-card span {
    display: block;
    font-size: 20px;
    font-weight: 900;
}

.category-card p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    line-height: 1.6;
}

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

.category-movie-grid {
    margin-top: 26px;
}

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: var(--panel);
    box-shadow: 0 12px 32px rgba(249, 115, 22, 0.1);
    border: 1px solid #ffedd5;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 55px rgba(236, 72, 153, 0.18);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111827;
}

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

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

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

.movie-meta-line,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.movie-meta-line a {
    color: var(--primary);
}

.movie-card h3,
.rank-body h3 {
    margin: 10px 0 8px;
    color: var(--text);
    font-size: 20px;
    line-height: 1.25;
}

.movie-card h3 a:hover,
.rank-body h3 a:hover {
    color: var(--primary);
}

.movie-card p,
.rank-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
}

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

.tag-row span,
.detail-tags span {
    padding: 6px 10px;
    color: #9a3412;
    background: #ffedd5;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 92px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ffedd5;
    box-shadow: 0 10px 28px rgba(249, 115, 22, 0.08);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #fff;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    font-weight: 900;
}

.rank-thumb {
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    overflow: hidden;
    background: #111827;
}

.rank-body h3 {
    font-size: 18px;
}

.side-card-grid {
    display: grid;
    gap: 14px;
}

.movie-card-compact {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    min-height: 132px;
}

.movie-card-compact .movie-poster {
    height: 100%;
    aspect-ratio: auto;
}

.movie-card-compact .movie-card-body {
    padding: 14px;
}

.movie-card-compact h3 {
    font-size: 17px;
}

.movie-card-compact .tag-row {
    display: none;
}

.page-hero {
    padding-top: 36px;
}

.small-hero > div,
.detail-hero {
    border-radius: 34px;
    background:
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.18), transparent 30rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 247, 237, 0.92));
    box-shadow: var(--shadow);
    border: 1px solid #ffedd5;
}

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

.page-hero h1 {
    font-size: clamp(36px, 6vw, 62px);
}

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

.category-overview-card {
    padding: 24px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #ffedd5;
    box-shadow: 0 12px 32px rgba(249, 115, 22, 0.08);
}

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

.category-overview-head h2 {
    margin: 6px 0 0;
    font-size: 28px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(150px, 190px)) auto;
    gap: 14px;
    align-items: end;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #ffedd5;
    box-shadow: 0 12px 32px rgba(249, 115, 22, 0.08);
}

.filter-bar label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    color: var(--text);
    border: 1px solid #fed7aa;
    border-radius: 16px;
    background: #fff;
    outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.filter-bar button {
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    font-weight: 900;
    cursor: pointer;
}

.full-rank-list {
    margin-top: 26px;
}

.detail-hero {
    padding: 28px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 24px;
}

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

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

.player-column {
    display: grid;
    gap: 20px;
}

.poster-panel {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    background: #111827;
    box-shadow: var(--shadow);
}

.player-card {
    border-radius: 24px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.24);
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    color: #fff;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.26), rgba(2, 6, 23, 0.64));
    cursor: pointer;
}

.player-card.is-playing .player-cover,
.player-cover[hidden] {
    display: none;
}

.play-icon {
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 18px 40px rgba(236, 72, 153, 0.35);
    font-size: 26px;
    padding-left: 4px;
}

.play-text {
    font-size: 18px;
    font-weight: 900;
}

.detail-info {
    padding: 10px 0;
}

.detail-info h1 {
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.05;
}

.detail-lead {
    color: #4b5563;
    font-size: 18px;
    line-height: 1.85;
    margin: 20px 0 0;
}

.detail-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0;
}

.detail-stats div {
    padding: 18px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #ffedd5;
}

.detail-stats strong {
    display: block;
    color: var(--text);
    font-size: 18px;
    line-height: 1.3;
}

.detail-stats span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.detail-tags {
    margin: 26px 0 0;
}

.detail-text-section {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.text-card {
    padding: 28px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #ffedd5;
    box-shadow: 0 12px 32px rgba(249, 115, 22, 0.08);
}

.text-card p {
    margin: 14px 0 0;
    color: #4b5563;
    line-height: 1.9;
}

.detail-nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.detail-nav-links a {
    padding: 18px 20px;
    border-radius: 18px;
    background: #fff;
    color: var(--primary);
    font-weight: 900;
    border: 1px solid #ffedd5;
}

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

.site-footer {
    margin-top: 70px;
    background: linear-gradient(135deg, #fff7ed, #fff1f2);
    border-top: 1px solid #ffedd5;
}

.footer-grid {
    max-width: var(--container);
    margin: 0 auto;
    padding: 42px 20px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 34px;
}

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

.site-footer p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.footer-links a {
    color: var(--muted);
    font-weight: 800;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: var(--container);
    margin: 0 auto;
    padding: 20px;
    color: var(--muted);
    border-top: 1px solid #fed7aa;
    font-size: 14px;
}

[data-card].is-hidden {
    display: none;
}

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

    .two-column-section,
    .detail-layout,
    .detail-text-section,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        padding: 48px;
    }

    .hero-poster {
        justify-self: start;
        width: min(280px, 100%);
    }
}

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

    .menu-button {
        display: block;
    }

    .brand {
        font-size: 22px;
    }

    .hero {
        margin-top: 18px;
    }

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

    .hero-content,
    .small-hero > div,
    .detail-hero {
        padding: 26px;
    }

    .hero-copy p,
    .detail-lead {
        font-size: 16px;
    }

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

    .category-grid,
    .movie-grid,
    .related-grid,
    .category-overview-grid,
    .detail-stats,
    .detail-nav-links {
        grid-template-columns: 1fr;
    }

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

    .rank-item {
        grid-template-columns: 44px 74px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-number {
        width: 40px;
        height: 40px;
        border-radius: 14px;
        font-size: 13px;
    }

    .movie-card-compact {
        grid-template-columns: 86px minmax(0, 1fr);
    }
}
