:root {
    --primary-50: #fef6ee;
    --primary-100: #fde9d7;
    --primary-500: #f0641f;
    --primary-600: #e14915;
    --primary-700: #bb3513;
    --secondary-50: #f0fdf9;
    --secondary-100: #ccfbef;
    --secondary-500: #14b895;
    --secondary-700: #0a7763;
    --accent-50: #fefce8;
    --neutral-50: #fafaf9;
    --neutral-100: #f5f5f4;
    --neutral-200: #e7e5e4;
    --neutral-300: #d6d3d1;
    --neutral-500: #78716c;
    --neutral-600: #57534e;
    --neutral-700: #44403c;
    --neutral-900: #1c1917;
    --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, .07), 0 10px 20px -2px rgba(0, 0, 0, .04);
    --shadow-medium: 0 4px 20px -2px rgba(0, 0, 0, .1), 0 12px 25px -5px rgba(0, 0, 0, .08);
    --shadow-hard: 0 10px 40px -3px rgba(0, 0, 0, .15), 0 20px 30px -10px rgba(0, 0, 0, .1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--neutral-900);
    background: var(--neutral-50);
    line-height: 1.6;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .95);
    border-bottom: 1px solid var(--neutral-200);
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    box-shadow: var(--shadow-soft);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-text strong {
    font-size: 21px;
    letter-spacing: .02em;
}

.logo-text em {
    margin-top: 5px;
    color: var(--neutral-600);
    font-size: 12px;
    font-style: normal;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--neutral-700);
    font-weight: 600;
}

.site-nav a {
    position: relative;
    white-space: nowrap;
    transition: color .2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--primary-600);
}

.site-nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -12px;
    height: 3px;
    border-radius: 999px;
    background: var(--primary-500);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--neutral-900);
    background: var(--neutral-100);
    cursor: pointer;
}

.hero-carousel {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-50), #fff 52%, var(--secondary-50));
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.015);
    transition: opacity .7s ease, transform .7s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: .22;
    filter: blur(1px) saturate(1.08);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 15%, rgba(20, 184, 149, .22), transparent 36%),
        linear-gradient(90deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .78) 55%, rgba(255, 255, 255, .4));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 52px;
    align-items: center;
    padding: 82px 0 120px;
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--primary-700);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    color: var(--neutral-900);
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -.04em;
}

.hero-copy h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.hero-copy h2 {
    margin-top: 16px;
    font-size: clamp(28px, 4vw, 46px);
}

.hero-copy p {
    max-width: 680px;
    margin: 24px 0 0;
    color: var(--neutral-600);
    font-size: 18px;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-meta span,
.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--secondary-700);
    background: var(--secondary-100);
    font-size: 13px;
    font-weight: 700;
}

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

.btn-primary,
.btn-light,
.ghost-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.btn-primary {
    color: #fff;
    background: var(--primary-500);
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    background: var(--primary-600);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hard);
}

.btn-light {
    color: var(--neutral-900);
    background: rgba(255, 255, 255, .86);
    box-shadow: var(--shadow-soft);
}

.btn-light:hover,
.ghost-link:hover {
    color: var(--primary-700);
    transform: translateY(-2px);
}

.ghost-link {
    min-height: 42px;
    color: var(--primary-600);
    background: var(--primary-100);
}

.hero-poster {
    display: block;
    aspect-ratio: 3 / 4.2;
    border: 10px solid rgba(255, 255, 255, .78);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow-hard);
    transform: rotate(2deg);
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 34px;
    display: flex;
    align-items: center;
    gap: 18px;
    transform: translateX(-50%);
}

.hero-prev,
.hero-next,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-prev,
.hero-next {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: var(--neutral-900);
    background: rgba(255, 255, 255, .9);
    box-shadow: var(--shadow-soft);
    font-size: 26px;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 9px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    background: rgba(68, 64, 60, .32);
}

.hero-dot.is-active {
    width: 30px;
    background: var(--primary-500);
}

.section {
    padding: 70px 0;
}

.section-white {
    background: #fff;
}

.section-muted {
    background: var(--neutral-50);
}

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

.section-head h2,
.category-panel h2,
.article-card h2,
.side-card h2 {
    margin: 0;
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.2;
    letter-spacing: -.03em;
}

.section-head p,
.page-hero p,
.category-panel p,
.cta-box p {
    margin: 10px 0 0;
    color: var(--neutral-600);
}

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

.category-tile {
    position: relative;
    min-height: 230px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    isolation: isolate;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(28, 25, 23, .08), rgba(28, 25, 23, .82));
}

.category-tile img {
    transition: transform .35s ease;
}

.category-tile:hover img {
    transform: scale(1.06);
}

.category-tile span,
.category-tile em {
    position: absolute;
    z-index: 2;
    left: 20px;
    right: 20px;
    color: #fff;
}

.category-tile span {
    bottom: 68px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile em {
    bottom: 20px;
    color: rgba(255, 255, 255, .86);
    font-size: 13px;
    font-style: normal;
}

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

.small-grid,
.related-grid,
.latest-grid,
.search-grid {
    gap: 18px;
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--neutral-200);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.movie-card:hover {
    border-color: var(--primary-100);
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-50), var(--secondary-50));
}

.poster-link img {
    transition: transform .35s ease;
}

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

.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(6px);
}

.year-badge {
    left: 12px;
}

.rank-badge {
    right: 12px;
    background: var(--primary-500);
}

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

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

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

.movie-meta {
    margin: 8px 0 0;
    color: var(--neutral-500);
    font-size: 13px;
}

.movie-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 12px 0 0;
    overflow: hidden;
    color: var(--neutral-600);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    color: var(--primary-700);
    background: var(--primary-100);
    font-size: 12px;
    font-weight: 700;
}

.big-tags span {
    min-height: 30px;
    padding: 0 12px;
    font-size: 13px;
}

.page-hero,
.detail-hero {
    padding: 64px 0;
    background: linear-gradient(135deg, var(--primary-50), #fff 52%, var(--secondary-50));
}

.page-hero h1,
.detail-copy h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.category-hero {
    background: linear-gradient(135deg, #fff, var(--primary-50), var(--secondary-50));
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--neutral-500);
    font-size: 14px;
}

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

.toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px;
    gap: 14px;
    margin-bottom: 28px;
}

.search-toolbar {
    grid-template-columns: minmax(260px, 1fr) 160px 160px 160px;
}

.toolbar input,
.toolbar select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--neutral-200);
    border-radius: 14px;
    padding: 0 16px;
    color: var(--neutral-900);
    background: #fff;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.toolbar input:focus,
.toolbar select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(240, 100, 31, .12);
}

.empty-state {
    display: none;
    margin-top: 28px;
    padding: 28px;
    border: 1px dashed var(--neutral-300);
    border-radius: 18px;
    color: var(--neutral-600);
    text-align: center;
    background: var(--neutral-50);
}

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

.categories-stack {
    display: grid;
    gap: 28px;
}

.category-panel {
    padding: 26px;
    border: 1px solid var(--neutral-200);
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

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

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

.compact-rank {
    max-width: 900px;
}

.rank-item {
    display: grid;
    grid-template-columns: 54px 86px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--neutral-200);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #fff;
    background: var(--primary-500);
    font-weight: 900;
}

.rank-thumb {
    display: block;
    width: 86px;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    overflow: hidden;
}

.rank-copy h3 {
    margin: 0 0 5px;
    font-size: 18px;
}

.rank-copy h3 a:hover {
    color: var(--primary-600);
}

.rank-copy p,
.rank-copy span {
    display: block;
    margin: 0;
    color: var(--neutral-600);
    font-size: 14px;
}

.rank-copy span {
    margin-top: 5px;
}

.cta-section {
    background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

.cta-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
    padding: 32px;
    border-radius: 28px;
    background: rgba(255, 255, 255, .75);
    box-shadow: var(--shadow-soft);
}

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

.detail-poster {
    display: block;
    aspect-ratio: 3 / 4.2;
    overflow: hidden;
    border: 10px solid rgba(255, 255, 255, .75);
    border-radius: 28px;
    box-shadow: var(--shadow-hard);
}

.detail-one-line {
    margin: 22px 0 0;
    color: var(--neutral-600);
    font-size: 18px;
}

.player-section {
    background: var(--neutral-900);
}

.player-section .section-kicker,
.player-section h2 {
    color: #fff;
}

.flat-head {
    margin-bottom: 20px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow-hard);
    cursor: pointer;
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 240px;
    background: #000;
}

.play-button {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, .16), rgba(0, 0, 0, .62));
    cursor: pointer;
    transition: opacity .2s ease, visibility .2s ease;
}

.play-button span {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    padding-left: 6px;
    border-radius: 999px;
    background: var(--primary-500);
    box-shadow: var(--shadow-hard);
    font-size: 42px;
}

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

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

.article-card,
.side-card {
    padding: 28px;
    border: 1px solid var(--neutral-200);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.article-card h2 + p {
    margin-top: 12px;
}

.article-card p {
    margin: 0 0 28px;
    color: var(--neutral-700);
    font-size: 17px;
    line-height: 1.9;
}

.side-card dl {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    margin: 18px 0 0;
}

.side-card dt {
    color: var(--neutral-500);
    font-weight: 700;
}

.side-card dd {
    margin: 0;
    color: var(--neutral-900);
}

.site-footer {
    color: var(--neutral-300);
    background: var(--neutral-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 34px;
    padding: 54px 0 40px;
}

.footer-grid h2,
.footer-grid h3 {
    margin: 0 0 14px;
    color: #fff;
}

.footer-grid p {
    max-width: 460px;
    margin: 0;
    color: var(--neutral-300);
}

.footer-grid a {
    display: block;
    margin-top: 9px;
    color: var(--neutral-300);
}

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

.footer-bottom {
    padding: 18px 16px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: var(--neutral-400);
    text-align: center;
    font-size: 14px;
}

.is-filtered-out {
    display: none !important;
}

@media (max-width: 980px) {
    .site-nav {
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 12px;
        border: 1px solid var(--neutral-200);
        border-radius: 18px;
        background: #fff;
        box-shadow: var(--shadow-medium);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        width: 100%;
        padding: 12px;
        border-radius: 12px;
    }

    .site-nav a:hover,
    .site-nav a.active {
        background: var(--primary-50);
    }

    .site-nav a.active::after {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero-content,
    .detail-grid,
    .content-layout {
        grid-template-columns: 1fr;
    }

    .hero-content {
        gap: 32px;
        padding: 58px 0 110px;
    }

    .hero-poster,
    .detail-poster {
        width: min(330px, 78vw);
        margin: 0 auto;
    }

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

    .toolbar,
    .search-toolbar {
        grid-template-columns: 1fr 1fr;
    }

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

    .rank-item .ghost-link {
        grid-column: 3;
        justify-self: start;
    }
}

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

    .logo-text strong {
        font-size: 18px;
    }

    .hero-carousel {
        min-height: 710px;
    }

    .hero-shade {
        background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .82));
    }

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

    .section {
        padding: 48px 0;
    }

    .section-head,
    .category-panel-head,
    .cta-box {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-grid,
    .movie-grid,
    .footer-grid,
    .toolbar,
    .search-toolbar {
        grid-template-columns: 1fr;
    }

    .category-tile {
        min-height: 190px;
    }

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

    .rank-thumb {
        width: 64px;
    }

    .rank-copy span {
        display: none;
    }

    .article-card,
    .side-card,
    .category-panel,
    .cta-box {
        padding: 20px;
    }

    .play-button span {
        width: 72px;
        height: 72px;
        font-size: 32px;
    }
}
