: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-500: #0ea5e9;
    --fog-600: #0284c7;
    --fog-700: #0369a1;
    --cocoon-50: #f0fdf4;
    --cocoon-100: #dcfce7;
    --cocoon-600: #16a34a;
    --white: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--mist-900);
    background: linear-gradient(180deg, var(--mist-50), var(--white));
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.84);
    border-bottom: 1px solid var(--mist-200);
    backdrop-filter: blur(14px);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--fog-600), var(--cocoon-600));
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.25);
    transition: transform 0.25s ease;
}

.brand:hover .logo-mark {
    transform: scale(1.08) rotate(-3deg);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--mist-700);
    font-weight: 650;
}

.nav-links a {
    transition: color 0.2s ease;
}

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

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

.mobile-panel {
    display: none;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    color: var(--white);
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

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

.hero-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-slide.no-image .hero-media,
.poster-shell.no-image img,
.image-off {
    display: none;
}

.hero-slide.no-image {
    background:
        radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.55), transparent 34%),
        radial-gradient(circle at 78% 28%, rgba(22, 163, 74, 0.35), transparent 30%),
        linear-gradient(135deg, #020617, #0f172a 48%, #075985);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.06));
}

.hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 58px 0 72px;
}

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 18px;
    border-radius: 999px;
    color: var(--fog-100);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.hero-title {
    max-width: 820px;
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.045em;
}

.hero-desc {
    max-width: 720px;
    margin: 0 0 26px;
    color: var(--mist-200);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    background: var(--fog-700);
}

.btn-ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
}

.btn-light {
    color: var(--mist-900);
    background: var(--white);
    border: 1px solid var(--mist-200);
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 34px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

.hero-search {
    position: absolute;
    left: 50%;
    bottom: -34px;
    z-index: 8;
    width: min(880px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.hero-search input,
.search-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--mist-200);
    border-radius: 14px;
    outline: none;
    color: var(--mist-900);
    background: var(--white);
}

.hero-search input:focus,
.search-input:focus {
    border-color: var(--fog-600);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

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

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

.section-block {
    padding: 64px 0;
}

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

.section-heading h2,
.page-title {
    margin: 0;
    color: var(--mist-900);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-heading p,
.page-lead {
    margin: 8px 0 0;
    color: var(--mist-700);
    line-height: 1.8;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--mist-200);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--soft-shadow);
    break-inside: avoid;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.poster-area {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 18%, rgba(14, 165, 233, 0.5), transparent 32%),
        linear-gradient(135deg, #0f172a, #075985);
}

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

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

.poster-fallback {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    text-align: center;
    color: var(--white);
    font-size: 22px;
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.card-badge,
.card-type,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    padding: 6px 9px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.58);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.card-type {
    left: auto;
    right: 12px;
}

.play-chip {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--white);
    background: var(--fog-600);
    box-shadow: 0 12px 30px rgba(2, 132, 199, 0.42);
    transform: translateY(8px) scale(0.92);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-chip {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.card-body {
    padding: 15px;
}

.card-title {
    display: -webkit-box;
    min-height: 46px;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--mist-900);
    font-size: 16px;
    font-weight: 850;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta,
.card-desc {
    margin: 0;
    color: var(--mist-600);
    font-size: 13px;
    line-height: 1.65;
}

.card-desc {
    display: -webkit-box;
    min-height: 42px;
    margin-top: 8px;
    overflow: hidden;
    color: var(--mist-700);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--fog-700);
    background: var(--fog-50);
    font-size: 12px;
    font-weight: 750;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 24px;
    border: 1px solid var(--mist-200);
    border-radius: 24px;
    background: linear-gradient(135deg, var(--white), var(--fog-50));
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card::after {
    content: "";
    position: absolute;
    right: -42px;
    top: -42px;
    width: 140px;
    height: 140px;
    border-radius: 999px;
    background: rgba(2, 132, 199, 0.12);
}

.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 900;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--mist-700);
    line-height: 1.75;
}

.category-card .category-mini {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
    color: var(--fog-700);
    font-size: 14px;
    font-weight: 700;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 74px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--mist-200);
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: var(--fog-100);
}

.rank-index {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--fog-600), var(--cocoon-600));
    font-size: 18px;
    font-weight: 900;
}

.rank-poster {
    width: 74px;
    height: 96px;
    overflow: hidden;
    border-radius: 14px;
    background: var(--fog-50);
}

.rank-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 850;
}

.rank-meta {
    margin: 0;
    color: var(--mist-600);
    font-size: 13px;
}

.rank-heat {
    color: var(--fog-700);
    font-weight: 900;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 24px;
    padding: 14px;
    border: 1px solid var(--mist-200);
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-button {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--mist-200);
    border-radius: 999px;
    color: var(--mist-700);
    background: var(--white);
    font-weight: 750;
    transition: all 0.2s ease;
}

.filter-button:hover,
.filter-button.active {
    color: var(--white);
    border-color: var(--fog-600);
    background: var(--fog-600);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px 0 18px;
    color: var(--mist-600);
    font-size: 14px;
}

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

.page-hero {
    padding: 48px 0 36px;
    background:
        radial-gradient(circle at 15% 20%, rgba(14, 165, 233, 0.14), transparent 32%),
        radial-gradient(circle at 85% 0%, rgba(22, 163, 74, 0.10), transparent 32%),
        linear-gradient(180deg, var(--fog-50), var(--white));
    border-bottom: 1px solid var(--mist-200);
}

.detail-layout {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 34px;
    align-items: start;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    background: var(--fog-50);
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.045em;
}

.detail-info .lead {
    margin: 0 0 22px;
    color: var(--mist-700);
    font-size: 18px;
    line-height: 1.85;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
}

.meta-pill {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--mist-800);
    background: var(--mist-100);
    font-size: 13px;
    font-weight: 800;
}

.content-card {
    padding: 26px;
    border: 1px solid var(--mist-200);
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
    font-weight: 900;
}

.content-card p {
    margin: 0;
    color: var(--mist-700);
    line-height: 1.9;
}

.content-stack {
    display: grid;
    gap: 22px;
}

.video-player {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
}

.video-player video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    pointer-events: auto;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: var(--white);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button-large {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--white);
    background: var(--fog-600);
    box-shadow: 0 18px 42px rgba(2, 132, 199, 0.42);
    font-size: 30px;
}

.play-title {
    font-size: 22px;
    font-weight: 900;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.empty-state {
    display: none;
    padding: 34px;
    border: 1px dashed var(--mist-300);
    border-radius: 20px;
    text-align: center;
    color: var(--mist-600);
    background: var(--white);
}

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

.site-footer {
    margin-top: 72px;
    color: var(--mist-300);
    background: var(--mist-900);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
}

.footer-grid h3 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

.footer-grid p,
.footer-grid a {
    color: var(--mist-300);
    line-height: 1.8;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-bottom {
    border-top: 1px solid var(--mist-800);
    padding: 18px 0;
    text-align: center;
    color: var(--mist-300);
    font-size: 14px;
}

.masonry {
    columns: 3 280px;
    column-gap: 22px;
}

.masonry .movie-card {
    margin: 0 0 22px;
}

.animate-slide-up {
    animation: slideUp 0.55s ease both;
}

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

@media (max-width: 1080px) {
    .movie-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

    .rank-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-panel.open {
        position: fixed;
        left: 0;
        right: 0;
        top: 64px;
        z-index: 70;
        display: grid;
        gap: 14px;
        padding: 20px;
        color: var(--mist-800);
        background: rgba(255, 255, 255, 0.96);
        border-bottom: 1px solid var(--mist-200);
        backdrop-filter: blur(16px);
    }

    .hero {
        min-height: 620px;
    }

    .hero-content {
        padding-bottom: 96px;
    }

    .hero-search {
        flex-direction: column;
        bottom: -58px;
    }

    .page-main {
        padding-top: 108px;
    }

    .section-heading,
    .filter-panel {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .section-heading {
        display: grid;
    }

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

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

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

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .brand {
        font-size: 17px;
    }

    .hero-title {
        font-size: 38px;
    }

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

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

    .category-grid {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 54px 1fr;
    }

    .rank-heat {
        grid-column: 2;
    }

    .rank-poster {
        width: 54px;
        height: 74px;
    }

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