:root {
    --mist-50: #f8f9fa;
    --mist-100: #f1f3f5;
    --mist-200: #e9ecef;
    --mist-300: #dee2e6;
    --mist-600: #868e96;
    --mist-700: #495057;
    --mist-800: #343a40;
    --mist-900: #212529;
    --fog-50: #f0f9ff;
    --fog-100: #e0f2fe;
    --fog-400: #38bdf8;
    --fog-600: #0284c7;
    --fog-700: #0369a1;
    --cocoon-100: #dcfce7;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.12);
    --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.18);
    --radius: 18px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, var(--mist-50), var(--white));
    color: var(--mist-900);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

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: 40;
    border-bottom: 1px solid rgba(222, 226, 230, 0.8);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--mist-900);
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--fog-600), var(--fog-400));
    box-shadow: 0 12px 30px rgba(2, 132, 199, 0.28);
}

.brand-text {
    font-size: 20px;
}

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

.nav-link {
    padding: 9px 13px;
    border-radius: 999px;
    color: var(--mist-700);
    font-size: 15px;
    transition: background 0.25s ease, color 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    background: var(--fog-50);
    color: var(--fog-700);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--mist-100);
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 8px;
    background: var(--mist-900);
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: var(--mist-900);
}

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

.hero-slide {
    opacity: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 1s ease;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.36) 52%, rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: min(var(--container), calc(100% - 40px));
    transform: translateX(-50%);
    padding: 0 0 70px;
    color: var(--white);
}

.hero-kicker,
.detail-kicker,
.section-heading p,
.page-hero-inner p {
    margin: 0 0 10px;
    color: var(--fog-400);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
    max-width: 780px;
    margin: 0 0 16px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 700px;
    margin: 0 0 22px;
    color: #e9ecef;
    font-size: clamp(17px, 2.2vw, 22px);
}

.hero-tags,
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 24px;
}

.hero-tags span,
.chip-row span {
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    backdrop-filter: blur(10px);
    font-size: 13px;
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.btn-primary,
.btn-ghost,
.btn-plain,
.category-enter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 12px;
    font-weight: 700;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary,
.category-enter {
    color: var(--white);
    background: var(--fog-600);
    box-shadow: 0 12px 28px rgba(2, 132, 199, 0.28);
}

.btn-primary:hover,
.category-enter:hover {
    transform: translateY(-2px);
    background: var(--fog-700);
    box-shadow: 0 18px 35px rgba(2, 132, 199, 0.34);
}

.btn-ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
}

.btn-ghost.light {
    border: 1px solid rgba(255, 255, 255, 0.55);
}

.btn-ghost:hover,
.btn-plain:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.24);
}

.btn-plain {
    color: var(--white);
}

.hero-dots {
    position: absolute;
    right: calc((100% - min(var(--container), calc(100% - 40px))) / 2);
    bottom: 36px;
    display: flex;
    gap: 9px;
    z-index: 3;
}

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

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

.section-wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 70px 20px;
}

.section-wrap.compact {
    padding-top: 56px;
    padding-bottom: 56px;
}

.wide-section {
    background: var(--mist-50);
}

.wide-section.mist {
    background: linear-gradient(180deg, var(--mist-50), var(--white));
}

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

.section-heading.nested {
    margin-bottom: 22px;
}

.section-heading h2 {
    margin: 0;
    color: var(--mist-900);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.18;
    letter-spacing: -0.03em;
}

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

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

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--mist-200);
    box-shadow: var(--shadow-sm);
}

.poster-link img,
.rank-poster img,
.small-card img,
.feature-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.movie-card:hover .poster-link img,
.small-card:hover img,
.feature-row:hover img {
    transform: scale(1.08);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.02));
    opacity: 0;
    transition: opacity 0.35s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

.play-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: rgba(2, 132, 199, 0.9);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: rgba(2, 132, 199, 0.92);
    font-weight: 800;
}

.card-body {
    padding: 12px 2px 0;
}

.card-body h3 {
    margin: 0 0 6px;
    font-size: 17px;
    line-height: 1.25;
}

.card-body h3 a:hover,
.rank-copy h2 a:hover,
.category-overview-card h2 a:hover {
    color: var(--fog-600);
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--mist-600);
    font-size: 13px;
}

.card-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--mist-100);
}

.scroll-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: thin;
}

.small-card {
    position: relative;
    flex: 0 0 260px;
    height: 150px;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--mist-200);
    box-shadow: var(--shadow-sm);
}

.small-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.08));
}

.small-card span:last-child {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    color: var(--white);
    font-weight: 800;
}

.small-rank {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: var(--fog-600);
}

.feature-list {
    display: grid;
    gap: 26px;
}

.feature-row {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(0, 1fr);
    overflow: hidden;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.feature-row:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.feature-row img {
    min-height: 300px;
    background: var(--mist-200);
}

.feature-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: 34px;
}

.feature-info strong {
    color: var(--mist-900);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
}

.feature-info em {
    color: var(--mist-700);
    font-style: normal;
    font-size: 17px;
}

.feature-info small {
    color: var(--mist-600);
    font-size: 14px;
}

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

.category-card,
.category-overview-card {
    border: 1px solid var(--mist-200);
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.category-card {
    min-height: 145px;
    padding: 24px;
}

.category-card:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    border-color: var(--fog-100);
    box-shadow: var(--shadow-md);
}

.category-card span {
    display: block;
    margin-bottom: 12px;
    color: var(--fog-600);
    font-size: 24px;
    font-weight: 800;
}

.category-card strong {
    color: var(--mist-700);
    font-size: 14px;
    font-weight: 500;
}

.catalog-tools {
    display: grid;
    grid-template-columns: minmax(250px, 1fr) repeat(3, minmax(140px, 180px));
    gap: 14px;
    margin: 0 0 28px;
    padding: 18px;
    border: 1px solid var(--mist-200);
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.catalog-tools label {
    display: grid;
    gap: 6px;
    color: var(--mist-700);
    font-size: 13px;
    font-weight: 700;
}

.catalog-tools input,
.catalog-tools select {
    width: 100%;
    height: 44px;
    border: 1px solid var(--mist-200);
    border-radius: 12px;
    background: var(--mist-50);
    color: var(--mist-900);
    padding: 0 13px;
    outline: none;
}

.catalog-tools input:focus,
.catalog-tools select:focus {
    border-color: var(--fog-600);
    box-shadow: 0 0 0 4px var(--fog-100);
}

.empty-state {
    display: none;
    margin: 30px 0 0;
    padding: 22px;
    border-radius: 18px;
    background: var(--mist-100);
    color: var(--mist-700);
    text-align: center;
}

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

.rank-block {
    padding-top: 50px;
}

.rank-list,
.rank-page-list {
    display: grid;
    gap: 12px;
}

.rank-row {
    display: grid;
    grid-template-columns: 42px 58px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.rank-row span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: var(--fog-600);
    font-weight: 800;
}

.rank-row img {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    object-fit: cover;
    background: var(--mist-200);
}

.rank-row strong {
    font-size: 16px;
}

.rank-row em {
    color: var(--mist-600);
    font-style: normal;
    font-size: 13px;
}

.page-hero {
    min-height: 360px;
    display: grid;
    place-items: center;
    padding: 80px 20px;
    color: var(--white);
    background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.38), transparent 34%), linear-gradient(135deg, #111827, #0f172a 54%, #082f49);
}

.page-hero.slim {
    min-height: 290px;
}

.page-hero-inner {
    width: min(var(--container), 100%);
}

.page-hero-inner h1 {
    margin: 0 0 12px;
    font-size: clamp(36px, 6vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-hero-inner span {
    display: block;
    max-width: 760px;
    color: #e9ecef;
    font-size: 18px;
}

.category-overview-card {
    padding: 26px;
}

.category-overview-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.category-overview-card p {
    min-height: 68px;
    margin: 0 0 16px;
    color: var(--mist-700);
}

.category-preview-links {
    display: grid;
    gap: 9px;
    margin-bottom: 18px;
}

.category-preview-links a {
    overflow: hidden;
    color: var(--mist-700);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-preview-links a:hover {
    color: var(--fog-600);
}

.rank-card {
    display: grid;
    grid-template-columns: 60px 124px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.rank-number {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: var(--fog-600);
    font-weight: 900;
}

.rank-poster {
    display: block;
    width: 124px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 16px;
    background: var(--mist-200);
}

.rank-copy h2 {
    margin: 0 0 7px;
    font-size: 22px;
    line-height: 1.2;
}

.rank-copy p {
    display: -webkit-box;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--mist-700);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.detail-layout {
    max-width: var(--container);
    margin: 0 auto;
    padding: 28px 20px 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin: 8px 0 22px;
    color: var(--mist-600);
    font-size: 14px;
}

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

.detail-main {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 28px;
    align-items: stretch;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000000;
    box-shadow: var(--shadow-xl);
    aspect-ratio: 16 / 9;
}

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

.video-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.1));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: rgba(2, 132, 199, 0.94);
    box-shadow: 0 20px 42px rgba(2, 132, 199, 0.45);
    font-size: 28px;
    transform: translateX(2px);
}

.detail-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
    border-radius: 26px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.detail-copy h1 {
    margin: 0 0 15px;
    color: var(--mist-900);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.detail-intro {
    margin: 0 0 18px;
    color: var(--mist-700);
    font-size: 17px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
}

.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--fog-50);
    color: var(--fog-700);
    font-weight: 700;
    font-size: 13px;
}

.detail-copy .chip-row span {
    background: var(--mist-100);
    color: var(--mist-700);
}

.detail-section {
    margin-top: 34px;
    padding: 30px;
    border-radius: 26px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.detail-section h2 {
    margin: 0 0 14px;
    color: var(--mist-900);
    font-size: 26px;
}

.detail-section p {
    margin: 0;
    color: var(--mist-700);
    font-size: 17px;
}

.quote-section {
    border-left: 5px solid var(--fog-600);
}

.prev-next {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.prev-next a {
    padding: 18px;
    border-radius: 18px;
    background: var(--mist-100);
    color: var(--mist-800);
    font-weight: 700;
}

.prev-next a:hover {
    color: var(--fog-700);
    background: var(--fog-50);
}

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

.site-footer {
    border-top: 1px solid var(--mist-200);
    background: var(--mist-900);
    color: var(--white);
}

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

.footer-logo {
    font-size: 20px;
    font-weight: 900;
}

.footer-inner p {
    margin: 0;
    color: var(--mist-300);
}

.footer-links {
    display: flex;
    gap: 14px;
    color: var(--mist-300);
}

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

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

    .main-nav {
        position: fixed;
        inset: 67px 14px auto;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--mist-200);
        border-radius: 18px;
        background: var(--white);
        box-shadow: var(--shadow-xl);
    }

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

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

    .catalog-tools {
        grid-template-columns: 1fr 1fr;
    }

    .feature-row,
    .detail-main {
        grid-template-columns: 1fr;
    }

    .detail-copy {
        padding: 24px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .header-inner {
        padding: 12px 16px;
    }

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

    .hero-carousel {
        min-height: 590px;
        height: 76vh;
    }

    .hero-content {
        width: calc(100% - 32px);
        padding-bottom: 78px;
    }

    .hero-dots {
        left: 16px;
        right: auto;
        bottom: 30px;
    }

    .section-wrap {
        padding: 48px 16px;
    }

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

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

    .catalog-tools,
    .prev-next {
        grid-template-columns: 1fr;
    }

    .small-card {
        flex-basis: 220px;
    }

    .rank-row {
        grid-template-columns: 36px 52px 1fr;
    }

    .rank-row em {
        display: none;
    }

    .rank-card {
        grid-template-columns: 44px 86px 1fr;
        gap: 12px;
    }

    .rank-poster {
        width: 86px;
    }

    .rank-copy h2 {
        font-size: 18px;
    }

    .rank-copy p {
        -webkit-line-clamp: 1;
    }

    .detail-layout {
        padding: 18px 16px 52px;
    }

    .detail-section {
        padding: 22px;
    }

    .play-button {
        width: 66px;
        height: 66px;
        font-size: 22px;
    }
}
