:root {
    --page-bg: #fefdfb;
    --panel-bg: rgba(255, 255, 255, 0.82);
    --text-main: #1f2937;
    --text-muted: #667085;
    --line-soft: #eef0f7;
    --pudding: #f0b46f;
    --pudding-deep: #e09d55;
    --moonlight: #7d93d9;
    --moonlight-deep: #6178ca;
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.14);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(253, 232, 245, 0.72), transparent 34rem),
        radial-gradient(circle at top right, rgba(232, 244, 253, 0.76), transparent 30rem),
        linear-gradient(135deg, #fff9f3 0%, #f0f3fb 48%, #fefdfb 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

img {
    max-width: 100%;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(254, 253, 251, 0.86);
    border-bottom: 1px solid rgba(238, 240, 247, 0.9);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 74px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--moonlight-deep);
    background: linear-gradient(135deg, #fefdfb, #f0f3fb);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
}

.brand-name {
    font-size: 22px;
    background: linear-gradient(90deg, var(--pudding-deep), var(--moonlight-deep));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-nav {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.nav-link,
.mobile-nav-link {
    padding: 9px 14px;
    border-radius: 999px;
    color: #4b5563;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--moonlight-deep);
    background: rgba(125, 147, 217, 0.1);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 310px;
    padding: 6px;
    background: rgba(254, 253, 251, 0.9);
    border: 1px solid #f4e6d6;
    border-radius: 999px;
}

.header-search input,
.big-search input,
.filter-panel input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text-main);
    background: transparent;
}

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

.header-search button,
.big-search button,
.primary-button {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--pudding), var(--moonlight));
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
    padding: 8px 13px;
    white-space: nowrap;
}

.header-search button:hover,
.big-search button:hover,
.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 42px -14px rgba(97, 120, 202, 0.55);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #ffffff;
    color: var(--moonlight-deep);
    font-size: 22px;
    box-shadow: var(--shadow-soft);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.hero-carousel {
    position: relative;
    min-height: 600px;
    margin: 32px 0 30px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 36px;
    box-shadow: var(--shadow-soft);
}

.hero-track,
.hero-slide {
    min-height: 600px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.65fr);
    gap: 32px;
    align-items: center;
    padding: 58px;
    color: #ffffff;
    background-position: center;
    background-size: cover;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.75s ease;
}

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

.hero-copy {
    max-width: 650px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    color: var(--pudding);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-content h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.intro-panel p {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.8;
}

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

.primary-button,
.ghost-button,
.text-link,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
}

.primary-button.small {
    min-height: 40px;
    padding: 0 16px;
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 999px;
    font-weight: 750;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

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

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

.hero-tags span,
.tag-row span,
.detail-chips span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

.hero-poster {
    position: relative;
    justify-self: center;
    width: min(320px, 100%);
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

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

.hero-controls {
    position: absolute;
    left: 38px;
    right: 38px;
    bottom: 30px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 28px;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    opacity: 0.65;
}

.hero-dot.active {
    width: 34px;
    background: #ffffff;
    opacity: 1;
}

.page-section {
    margin: 34px 0;
    padding: 28px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.intro-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 24px;
    align-items: center;
}

.intro-panel h2,
.section-heading h2,
.category-card-large h2,
.detail-content h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(24px, 3vw, 36px);
    letter-spacing: -0.03em;
}

.intro-panel p,
.section-heading p,
.category-card-large p,
.detail-content p,
.movie-card p,
.footer-inner p,
.page-hero p {
    color: var(--text-muted);
}

.big-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid #f4e6d6;
    border-radius: 999px;
}

.big-search input {
    padding: 0 16px;
}

.big-search button {
    padding: 13px 20px;
}

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

.section-heading p {
    margin: 8px 0 0;
}

.section-more,
.text-link {
    color: var(--moonlight-deep);
    border-radius: 999px;
    font-weight: 800;
    background: rgba(125, 147, 217, 0.1);
}

.category-grid,
.category-large-grid,
.movie-grid {
    display: grid;
    gap: 18px;
}

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

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

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

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

.category-tile,
.category-card-large,
.movie-card {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 28px -22px rgba(0, 0, 0, 0.45);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover,
.category-card-large:hover,
.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(125, 147, 217, 0.3);
    box-shadow: 0 24px 46px -28px rgba(0, 0, 0, 0.48);
}

.category-tile {
    min-height: 138px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(255, 249, 243, 0.9), rgba(227, 233, 247, 0.88));
}

.category-tile span,
.category-card-large h2 {
    color: #111827;
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
}

.category-card-large {
    padding: 24px;
}

.category-card-large p {
    line-height: 1.75;
}

.category-card-large ul {
    margin: 18px 0;
    padding: 0;
    list-style: none;
}

.category-card-large li {
    margin: 8px 0;
    color: #475467;
}

.movie-card {
    overflow: hidden;
}

.card-cover {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #fff9f3, #e3e9f7);
}

.card-cover img {
    transition: transform 0.28s ease;
}

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

.score-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 28px;
    color: #ffffff;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.9);
}

.score-badge {
    right: 12px;
    background: rgba(97, 120, 202, 0.88);
}

.rank-badge {
    left: 12px;
    background: rgba(224, 157, 85, 0.92);
}

.card-content {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--moonlight-deep);
    font-size: 12px;
    font-weight: 800;
}

.movie-card h3 {
    margin: 0;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card p {
    margin: 10px 0 14px;
    font-size: 14px;
    line-height: 1.7;
}

.tag-row span,
.detail-chips span {
    color: var(--moonlight-deep);
    background: rgba(125, 147, 217, 0.1);
}

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

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

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

.movie-card.compact .card-cover {
    height: 100%;
    min-height: 168px;
}

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

.page-hero {
    margin: 32px 0;
    padding: 44px;
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.94), rgba(97, 120, 202, 0.72)), linear-gradient(135deg, #fff9f3, #e3e9f7);
    box-shadow: var(--shadow-soft);
}

.compact-hero h1,
.detail-content h1 {
    color: #ffffff;
}

.compact-hero p {
    max-width: 760px;
}

.filter-panel {
    display: flex;
    align-items: center;
    gap: 14px;
}

.filter-panel label {
    color: #111827;
    font-weight: 900;
    white-space: nowrap;
}

.filter-panel input {
    min-height: 48px;
    padding: 0 16px;
    background: #ffffff;
    border: 1px solid #f4e6d6;
    border-radius: 999px;
}

.empty-state {
    display: none;
    margin-top: 24px;
    padding: 24px;
    color: var(--text-muted);
    text-align: center;
    background: rgba(255, 255, 255, 0.74);
    border-radius: var(--radius-lg);
}

.empty-state.show {
    display: block;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 28px 0 18px;
    color: #667085;
    font-size: 14px;
    font-weight: 700;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 24px;
    align-items: stretch;
}

.player-shell {
    position: relative;
    min-height: 430px;
    overflow: hidden;
    background: #111827;
    border-radius: 34px;
    box-shadow: var(--shadow-soft);
}

.movie-video {
    width: 100%;
    height: 100%;
    min-height: 430px;
    object-fit: cover;
    background: #111827;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    color: #ffffff;
    border: 0;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.36), rgba(17, 24, 39, 0.12));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    padding-left: 5px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--pudding), var(--moonlight));
    border-radius: 999px;
    box-shadow: 0 18px 42px -18px rgba(0, 0, 0, 0.8);
    font-size: 32px;
}

.play-overlay strong {
    font-size: 20px;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.detail-aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-aside img {
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    box-shadow: var(--shadow-soft);
}

.detail-score {
    padding: 20px;
    text-align: center;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
}

.detail-score span {
    display: block;
    color: var(--text-muted);
    font-weight: 800;
}

.detail-score strong {
    display: block;
    margin-top: 6px;
    color: var(--pudding-deep);
    font-size: 42px;
    line-height: 1;
}

.detail-content {
    line-height: 1.9;
}

.detail-title-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: start;
    margin-bottom: 18px;
}

.detail-content h1 {
    color: #111827;
    font-size: clamp(32px, 5vw, 58px);
}

.detail-content h2 {
    margin-top: 28px;
    font-size: 24px;
}

.detail-content p {
    margin: 12px 0 0;
    font-size: 17px;
}

.detail-tags {
    margin-top: 22px;
}

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

.site-footer {
    margin-top: 48px;
    padding: 38px 0 28px;
    color: #667085;
    border-top: 1px solid rgba(238, 240, 247, 0.9);
    background: rgba(254, 253, 251, 0.82);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.footer-brand {
    margin-bottom: 8px;
    color: var(--moonlight-deep);
    font-size: 22px;
}

.footer-inner p {
    max-width: 620px;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-content: start;
}

.footer-links a {
    padding: 9px 13px;
    color: var(--moonlight-deep);
    background: rgba(125, 147, 217, 0.1);
    border-radius: 999px;
    font-weight: 800;
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 18px auto 0;
    color: #98a2b3;
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1180px) {
    .movie-grid,
    .movie-grid.dense,
    .ranking-list.full {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .menu-toggle {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

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

    .hero-carousel,
    .hero-track,
    .hero-slide {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 32px;
        align-content: center;
    }

    .hero-poster {
        width: 220px;
        justify-self: start;
    }

    .intro-panel,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .detail-aside {
        display: none;
    }

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

@media (max-width: 720px) {
    main,
    .header-inner,
    .mobile-nav,
    .footer-inner,
    .copyright {
        width: min(100% - 22px, 1180px);
    }

    .brand-name {
        font-size: 18px;
    }

    .hero-carousel,
    .hero-track,
    .hero-slide {
        min-height: 660px;
    }

    .hero-slide {
        padding: 26px;
    }

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

    .hero-copy p,
    .page-hero p,
    .intro-panel p {
        font-size: 16px;
    }

    .hero-controls {
        left: 20px;
        right: 20px;
        bottom: 18px;
    }

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

    .section-heading,
    .footer-inner,
    .detail-title-row,
    .filter-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .big-search {
        grid-template-columns: 1fr;
        border-radius: 22px;
    }

    .big-search input {
        min-height: 44px;
    }

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

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

    .movie-card.compact .card-cover {
        min-height: 140px;
    }

    .player-shell,
    .movie-video {
        min-height: 260px;
    }
}

@media (max-width: 480px) {
    .category-grid,
    .category-large-grid,
    .movie-grid,
    .movie-grid.dense,
    .ranking-list,
    .ranking-list.full,
    .related-grid {
        grid-template-columns: 1fr;
    }

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