:root {
    --pudding-50: #fefdfb;
    --pudding-100: #fef9f3;
    --pudding-200: #fdf3e7;
    --pudding-500: #f8c98f;
    --pudding-600: #f0b46f;
    --pudding-700: #e09d55;
    --moonlight-50: #f8f9fd;
    --moonlight-100: #f0f3fb;
    --moonlight-500: #9baee3;
    --moonlight-600: #7d93d9;
    --moonlight-700: #6178ca;
    --soft-blue: #e8f4fd;
    --soft-pink: #fde8f5;
    --soft-green: #e8fdf4;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --white: #ffffff;
    --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, .07), 0 10px 20px -2px rgba(0, 0, 0, .04);
    --shadow-soft-lg: 0 10px 40px -10px rgba(0, 0, 0, .1);
    --shadow-moonlight: 0 4px 20px rgba(155, 174, 227, .15);
    --radius-soft: 1.25rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid var(--pudding-200);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--text-dark);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--moonlight-700);
    background: linear-gradient(135deg, var(--pudding-100), var(--moonlight-100));
    border-radius: 14px;
    box-shadow: var(--shadow-moonlight);
}

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

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 16px;
    color: #4b5563;
    border-radius: 999px;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--moonlight-700);
    background: var(--moonlight-100);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    background: var(--pudding-100);
    border-radius: 14px;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--moonlight-700);
    border-radius: 999px;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity .8s ease, transform 1.2s ease;
}

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

.hero-inner {
    position: relative;
    z-index: 2;
}

.hero-copy {
    max-width: 700px;
    animation: fadeIn .6s ease both;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    margin-bottom: 22px;
    color: #374151;
    background: rgba(255, 255, 255, .88);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
}

.hero h1 {
    max-width: 840px;
    margin: 0 0 12px;
    font-size: clamp(2.15rem, 5vw, 4.7rem);
    line-height: 1.05;
    letter-spacing: -.05em;
    background: linear-gradient(90deg, var(--pudding-700), var(--moonlight-700));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero h2 {
    margin: 0 0 16px;
    font-size: clamp(1.6rem, 3vw, 3rem);
    line-height: 1.12;
}

.hero p {
    max-width: 680px;
    margin: 0 0 30px;
    color: #4b5563;
    font-size: 1.12rem;
}

.hero-actions,
.detail-copy .btn {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    color: #ffffff;
    background: var(--moonlight-600);
    box-shadow: var(--shadow-moonlight);
}

.btn.primary:hover {
    background: var(--moonlight-700);
}

.btn.ghost {
    color: var(--moonlight-700);
    background: rgba(255, 255, 255, .9);
    box-shadow: var(--shadow-soft);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 118px;
    z-index: 4;
    transform: translateX(-50%);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    background: rgba(125, 147, 217, .35);
    border-radius: 999px;
    cursor: pointer;
    transition: width .2s ease, background .2s ease;
}

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

.floating-feature {
    position: relative;
    z-index: 5;
    margin-top: -88px;
    margin-bottom: 72px;
}

.mini-grid,
.movie-grid,
.editor-grid,
.category-grid,
.category-overview-grid {
    display: grid;
    gap: 24px;
}

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

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

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

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

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

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

.section-heading.center {
    display: block;
    text-align: center;
}

.section-heading span {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--moonlight-700);
    font-weight: 800;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.2rem);
    line-height: 1.2;
}

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

.movie-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(253, 243, 231, .9);
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-soft);
    transition: transform .22s ease, box-shadow .22s ease;
}

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

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

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

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

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .45));
    opacity: .68;
}

.play-chip {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    color: var(--moonlight-700);
    background: rgba(255, 255, 255, .9);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(.86);
    opacity: 0;
    backdrop-filter: blur(8px);
    transition: opacity .22s ease, transform .22s ease;
}

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

.rank-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--pudding-600), var(--moonlight-600));
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
}

.movie-info {
    padding: 18px;
}

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text-muted);
    font-size: .86rem;
}

.movie-info h2 {
    margin: 8px 0;
    font-size: 1.08rem;
    line-height: 1.32;
}

.movie-info h2 a:hover {
    color: var(--moonlight-700);
}

.movie-info p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--text-muted);
    font-size: .92rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    display: inline-flex;
    padding: 4px 9px;
    color: var(--pudding-700);
    background: var(--pudding-100);
    border-radius: 999px;
    font-size: .78rem;
}

.tag-row.large span {
    padding: 6px 12px;
    font-size: .9rem;
}

.category-band {
    margin: 0 0 76px;
    padding: 64px 0;
    background: linear-gradient(135deg, var(--soft-pink), var(--soft-blue));
}

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

.category-tile,
.category-overview-card,
.content-card {
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
}

.category-tile {
    display: grid;
    gap: 8px;
    padding: 24px;
    transition: transform .22s ease, box-shadow .22s ease;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft-lg);
}

.category-tile span {
    font-size: 2rem;
}

.category-tile strong {
    font-size: 1.08rem;
}

.category-tile em {
    color: var(--text-muted);
    font-size: .88rem;
    font-style: normal;
}

.ranking-panel {
    padding: 40px;
    margin-bottom: 76px;
    background: linear-gradient(135deg, var(--pudding-100), var(--moonlight-100));
    border-radius: var(--radius-soft);
}

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

.horizontal-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: rgba(255, 255, 255, .74);
    border-radius: 18px;
    transition: transform .2s ease, background .2s ease;
}

.horizontal-card:hover {
    background: #ffffff;
    transform: translateX(4px);
}

.horizontal-card img {
    width: 74px;
    height: 52px;
    object-fit: cover;
    border-radius: 14px;
}

.horizontal-card span {
    min-width: 0;
}

.horizontal-card strong,
.horizontal-card em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.horizontal-card em {
    color: var(--text-muted);
    font-size: .86rem;
    font-style: normal;
}

.inner-page {
    min-height: 70vh;
}

.page-hero {
    margin-bottom: 56px;
    background: linear-gradient(135deg, var(--pudding-50), var(--moonlight-100));
}

.small-hero {
    padding: 72px 0 64px;
}

.small-hero h1 {
    max-width: 760px;
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.12;
}

.small-hero p {
    max-width: 780px;
    margin: 0;
    color: var(--text-muted);
    font-size: 1.08rem;
}

.category-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 76px;
}

.category-overview-card {
    padding: 24px;
    transition: transform .22s ease, box-shadow .22s ease;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.category-title span {
    font-size: 1.8rem;
}

.category-title strong {
    font-size: 1.22rem;
}

.category-overview-card p {
    margin: 0 0 16px;
    color: var(--text-muted);
}

.category-samples {
    display: grid;
    gap: 10px;
}

.filter-bar {
    display: flex;
    gap: 12px;
    padding: 14px;
    margin-bottom: 26px;
    background: rgba(255, 255, 255, .88);
    border: 1px solid var(--pudding-200);
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-soft);
}

.filter-bar input,
.filter-bar select {
    min-height: 48px;
    border: 1px solid var(--pudding-200);
    border-radius: 999px;
    background: #ffffff;
    outline: 0;
}

.filter-bar input {
    flex: 1;
    padding: 0 18px;
}

.filter-bar select {
    padding: 0 16px;
    color: var(--text-muted);
}

.empty-state {
    display: none;
    padding: 56px 0;
    color: var(--text-muted);
    text-align: center;
}

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

.detail-hero {
    min-height: 560px;
    padding: 64px 0;
    background-size: cover;
    background-position: center;
}

.detail-hero-inner {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.breadcrumb {
    grid-column: 1 / -1;
    color: var(--moonlight-700);
    font-weight: 800;
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-soft-lg);
}

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

.detail-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 4.2rem);
    line-height: 1.1;
}

.detail-one-line {
    max-width: 860px;
    margin: 0 0 18px;
    color: #4b5563;
    font-size: 1.12rem;
}

.detail-meta {
    margin-bottom: 18px;
}

.detail-meta span {
    padding: 5px 10px;
    background: rgba(255, 255, 255, .86);
    border-radius: 999px;
}

.watch-section {
    margin: 58px auto;
}

.stream-player {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #111827;
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-soft-lg);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(17, 24, 39, .16), rgba(17, 24, 39, .72));
    cursor: pointer;
    transition: opacity .24s ease, visibility .24s ease;
}

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

.player-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    padding-left: 6px;
    color: var(--moonlight-700);
    background: rgba(255, 255, 255, .94);
    border-radius: 50%;
    box-shadow: var(--shadow-soft-lg);
    font-size: 2rem;
}

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 72px;
}

.content-card {
    padding: 28px;
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 1.45rem;
}

.content-card p {
    margin: 0;
    color: #4b5563;
}

.site-footer {
    padding: 52px 0 24px;
    background: #ffffff;
    border-top: 1px solid var(--pudding-200);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
}

.footer-brand {
    margin-bottom: 14px;
}

.site-footer p {
    max-width: 520px;
    margin: 0;
    color: var(--text-muted);
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 1rem;
}

.site-footer a:not(.brand) {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.site-footer a:not(.brand):hover {
    color: var(--moonlight-700);
}

.footer-bottom {
    padding-top: 28px;
    margin-top: 32px;
    border-top: 1px solid var(--pudding-200);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@media (max-width: 780px) {
    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        background: rgba(255, 255, 255, .96);
        border: 1px solid var(--pudding-200);
        border-radius: 20px;
        box-shadow: var(--shadow-soft-lg);
    }

    .main-nav.open {
        display: flex;
    }

    .hero {
        height: 620px;
    }

    .hero-controls {
        bottom: 86px;
    }

    .mini-grid,
    .movie-grid,
    .editor-grid,
    .all-grid,
    .ranking-list,
    .detail-content,
    .footer-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-poster {
        max-width: 280px;
    }

    .filter-bar {
        flex-direction: column;
    }
}

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

    .hero {
        height: 640px;
    }

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

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

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .floating-feature {
        margin-top: -60px;
    }

    .ranking-panel {
        padding: 22px;
    }
}
