:root {
    --pudding-50: #fefdfb;
    --pudding-100: #fef9f3;
    --pudding-200: #fdf3e7;
    --pudding-500: #f8c98f;
    --pudding-600: #f0b46f;
    --moonlight-50: #f6f8fd;
    --moonlight-100: #f0f3fb;
    --moonlight-500: #9baee3;
    --moonlight-600: #7d93d9;
    --moonlight-700: #667cc9;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: rgba(125, 147, 217, 0.16);
    --card: rgba(255, 255, 255, 0.86);
    --shadow: 0 18px 45px rgba(125, 147, 217, 0.18);
    --soft-shadow: 0 10px 26px rgba(125, 147, 217, 0.12);
    --radius: 1.25rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: linear-gradient(180deg, var(--pudding-50) 0%, #ffffff 48%, var(--moonlight-50) 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

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

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

button,
input {
    font: inherit;
}

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

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
}

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

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

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

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

.nav-link,
.mobile-link {
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.site-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-search input,
.page-filter {
    width: 260px;
    border: 1px solid var(--pudding-200);
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--ink);
    background: var(--pudding-50);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.site-search input:focus,
.page-filter:focus {
    border-color: var(--moonlight-500);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(125, 147, 217, 0.12);
}

.site-search button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 0 20px;
    cursor: pointer;
    font-weight: 750;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.site-search button,
.btn.primary {
    color: #ffffff;
    background: var(--moonlight-600);
    box-shadow: 0 12px 30px rgba(125, 147, 217, 0.32);
}

.btn.ghost {
    color: var(--moonlight-700);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(125, 147, 217, 0.18);
}

.site-search button:hover,
.btn:hover {
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: var(--ink);
    background: var(--pudding-50);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--pudding-200);
    padding: 16px;
    background: rgba(255, 255, 255, 0.96);
}

.mobile-panel.open {
    display: grid;
    gap: 16px;
    animation: slideUp 0.28s ease-out;
}

.mobile-search {
    align-items: stretch;
}

.mobile-search input {
    width: 100%;
}

.hero {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: linear-gradient(135deg, #fff9f3, #e3e9f7);
}

.hero-stage,
.hero-slide,
.hero-image,
.hero-shade {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.02);
}

.hero-shade {
    background:
        radial-gradient(circle at 18% 25%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.16) 32%, transparent 60%),
        linear-gradient(90deg, rgba(254, 253, 251, 0.96) 0%, rgba(254, 253, 251, 0.82) 42%, rgba(125, 147, 217, 0.26) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.34), transparent 58%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    max-width: 760px;
    margin-left: max(16px, calc((100vw - 1180px) / 2));
    animation: fadeIn 0.7s ease-in-out;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    margin-bottom: 14px;
    padding: 8px 14px;
    color: var(--moonlight-700);
    border: 1px solid rgba(125, 147, 217, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    font-size: 0.86rem;
    font-weight: 750;
    letter-spacing: 0.03em;
}

.hero h1 {
    margin: 0 0 10px;
    font-size: clamp(2.35rem, 5vw, 4.9rem);
    line-height: 1.05;
    color: var(--ink);
    letter-spacing: -0.04em;
}

.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(1.65rem, 3.5vw, 3.25rem);
    color: transparent;
    background: linear-gradient(90deg, var(--pudding-600), var(--moonlight-700));
    -webkit-background-clip: text;
    background-clip: text;
}

.hero p,
.page-hero p,
.lead-text {
    margin: 0;
    color: #4b5563;
    line-height: 1.85;
    font-size: 1.05rem;
}

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

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

.hero-tags span,
.card-tags span,
.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(254, 249, 243, 0.94);
    color: #8c5a22;
    padding: 6px 10px;
    font-size: 0.82rem;
    font-weight: 650;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--moonlight-600);
}

.feature-strip {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: -84px;
    margin-bottom: 68px;
}

.section-block {
    margin-bottom: 72px;
}

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

.section-head h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.15;
}

.section-head a {
    color: var(--moonlight-700);
    font-weight: 750;
}

.center-head {
    align-items: center;
}

.compact-head {
    margin-bottom: 18px;
}

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

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(125, 147, 217, 0.08);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-box {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--pudding-100);
}

.poster-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.card-cover-layer {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), transparent 66%);
    transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover-layer {
    opacity: 1;
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 999px;
    color: var(--moonlight-700);
    background: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.84);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.category-badge,
.duration-badge {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 750;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(10px);
}

.category-badge {
    left: 12px;
    background: rgba(125, 147, 217, 0.82);
}

.duration-badge {
    right: 12px;
}

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

.card-body strong {
    color: var(--ink);
    line-height: 1.35;
    min-height: 2.7em;
    transition: color 0.2s ease;
}

.movie-card:hover strong {
    color: var(--moonlight-700);
}

.movie-meta,
.movie-desc {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.category-band {
    margin-bottom: 72px;
    padding: 72px 0;
    background: linear-gradient(135deg, #fde8f5, #e8f4fd);
}

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

.category-card {
    position: relative;
    display: grid;
    min-height: 154px;
    overflow: hidden;
    align-content: end;
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--soft-shadow);
    background: #ffffff;
}

.category-card img,
.category-card-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.category-card img {
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.category-card-layer {
    background: linear-gradient(0deg, rgba(31, 41, 55, 0.72), rgba(31, 41, 55, 0.14));
}

.category-title,
.category-copy {
    position: relative;
    z-index: 1;
    color: #ffffff;
}

.category-title {
    font-size: 1.18rem;
    font-weight: 850;
}

.category-copy {
    margin-top: 4px;
    font-size: 0.88rem;
    opacity: 0.9;
}

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

.ranking-panel,
.text-card {
    border: 1px solid rgba(125, 147, 217, 0.12);
    border-radius: var(--radius);
    padding: 24px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--soft-shadow);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 34px 76px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    border-radius: 18px;
    padding: 10px;
    background: rgba(254, 253, 251, 0.86);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    box-shadow: var(--soft-shadow);
}

.rank-number {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 850;
    background: var(--moonlight-600);
}

.rank-item img {
    width: 76px;
    height: 54px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.rank-copy strong,
.rank-copy span,
.rank-copy em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-copy span,
.rank-copy em {
    color: var(--muted);
    font-size: 0.84rem;
    font-style: normal;
}

.rank-score {
    color: #d97706;
    font-weight: 850;
}

.full-ranking .rank-item {
    grid-template-columns: 42px 120px minmax(0, 1fr) auto;
    padding: 14px;
}

.full-ranking .rank-item img {
    width: 120px;
    height: 76px;
}

.page-main {
    padding: 44px 0 0;
}

.page-hero {
    margin-bottom: 36px;
    border: 1px solid rgba(125, 147, 217, 0.12);
    border-radius: calc(var(--radius) + 10px);
    padding: 48px;
    background:
        radial-gradient(circle at top right, rgba(125, 147, 217, 0.18), transparent 36%),
        linear-gradient(135deg, rgba(255, 249, 243, 0.96), rgba(240, 243, 251, 0.94));
    box-shadow: var(--soft-shadow);
}

.small-hero h1 {
    margin-bottom: 12px;
}

.filter-bar {
    margin-bottom: 24px;
}

.search-large {
    margin-top: 24px;
}

.search-large input {
    width: min(520px, 100%);
    background: #ffffff;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumb a {
    color: var(--moonlight-700);
    font-weight: 650;
}

.detail-hero {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    margin-bottom: 48px;
    border-radius: calc(var(--radius) + 10px);
    padding: 28px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(246, 248, 253, 0.94)),
        radial-gradient(circle at top right, rgba(240, 180, 111, 0.2), transparent 42%);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--pudding-100);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-info {
    display: grid;
    gap: 18px;
}

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

.detail-meta span {
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--moonlight-700);
    background: rgba(240, 243, 251, 0.86);
    font-weight: 700;
}

.player-section {
    margin-bottom: 42px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--radius) + 4px);
    background: #111827;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.main-video {
    display: block;
    width: 100%;
    height: 100%;
    background: #111827;
    object-fit: contain;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.58), rgba(17, 24, 39, 0.18));
    transition: opacity 0.22s ease;
}

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

.player-button {
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    border-radius: 999px;
    color: var(--moonlight-700);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
    font-size: 2rem;
    transform: translateX(3px);
}

.detail-content {
    margin-bottom: 56px;
}

.text-card h2 {
    margin: 0 0 14px;
    font-size: 1.5rem;
}

.text-card h2:not(:first-child) {
    margin-top: 28px;
}

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

.site-footer {
    margin-top: 40px;
    border-top: 1px solid rgba(253, 243, 231, 0.96);
    background: linear-gradient(180deg, #ffffff, var(--pudding-50));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
    padding: 48px 0 28px;
}

.footer-grid h3 {
    margin: 0 0 14px;
    font-size: 1rem;
}

.footer-grid a,
.footer-grid p {
    display: block;
    margin: 0 0 9px;
    color: var(--muted);
    line-height: 1.75;
    font-size: 0.94rem;
}

.footer-bottom {
    border-top: 1px solid var(--pudding-200);
    padding: 18px 0;
    color: var(--muted);
    font-size: 0.9rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1080px) {
    .site-search input {
        width: 190px;
    }

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

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

    .two-column-section {
        grid-template-columns: 1fr;
    }
}

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero {
        height: 640px;
    }

    .hero-content {
        width: min(100% - 32px, 720px);
        margin: 0 auto;
    }

    .hero-shade {
        background:
            linear-gradient(180deg, rgba(254, 253, 251, 0.92), rgba(254, 253, 251, 0.75), rgba(125, 147, 217, 0.32)),
            linear-gradient(0deg, rgba(0, 0, 0, 0.28), transparent 58%);
    }

    .feature-strip,
    .movie-grid,
    .listing-grid,
    .compact-grid,
    .category-grid,
    .footer-grid,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .feature-strip {
        margin-top: -52px;
    }

    .page-hero,
    .detail-hero {
        padding: 24px;
    }

    .detail-poster {
        max-width: 320px;
        margin: 0 auto;
    }
}

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

    .brand-name {
        font-size: 1.05rem;
    }

    .hero {
        height: 700px;
    }

    .hero h1 {
        font-size: 2.35rem;
    }

    .hero h2 {
        font-size: 1.75rem;
    }

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

    .rank-item,
    .full-ranking .rank-item {
        grid-template-columns: 34px 82px minmax(0, 1fr);
    }

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

    .full-ranking .rank-item img {
        width: 82px;
        height: 58px;
    }
}
