:root {
    --primary: #9333ea;
    --primary-dark: #581c87;
    --accent: #ec4899;
    --accent-soft: #fce7f3;
    --orange: #f97316;
    --blue: #3b82f6;
    --green: #10b981;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e9d5ff;
    --surface: #ffffff;
    --surface-soft: rgba(255, 255, 255, 0.9);
    --shadow: 0 18px 45px rgba(88, 28, 135, 0.15);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #faf5ff 0%, #fdf2f8 44%, #ffffff 100%);
    -webkit-font-smoothing: antialiased;
}

body.locked {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    box-shadow: 0 14px 30px rgba(88, 28, 135, 0.22);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.28rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: var(--primary);
    background: #ffffff;
    box-shadow: inset 0 0 0 4px rgba(147, 51, 234, 0.13);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 700;
    font-size: 0.96rem;
}

.nav-links a {
    opacity: 0.94;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-search {
    position: relative;
    width: 220px;
}

.nav-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #ffffff;
    border-radius: 999px;
    padding: 10px 42px 10px 16px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
    transition: width 0.25s ease, background 0.25s ease;
}

.nav-search input::placeholder {
    color: #f3e8ff;
}

.nav-search input:focus {
    background: rgba(255, 255, 255, 0.28);
}

.nav-search button {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 0;
    color: #ffffff;
    background: transparent;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    color: #ffffff;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    display: block;
    margin: 5px auto;
    border-radius: 999px;
    background: currentColor;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-panel a {
    display: block;
    padding: 12px 2px;
    font-weight: 750;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-panel .nav-search {
    width: 100%;
    margin: 8px 0 14px;
}

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

.hero {
    position: relative;
    height: 600px;
    min-height: 500px;
    overflow: hidden;
    color: #ffffff;
    background: #160622;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s ease, visibility 0.9s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
    filter: saturate(1.08) contrast(1.02);
}

.hero-slide.is-active img {
    animation: heroZoom 7s ease forwards;
}

@keyframes heroZoom {
    from { transform: scale(1.04); }
    to { transform: scale(1.12); }
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(24, 6, 36, 0.92) 0%, rgba(88, 28, 135, 0.67) 42%, rgba(0, 0, 0, 0.18) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.1) 55%, rgba(0, 0, 0, 0.44) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 82px 0 64px;
}

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 800;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
}

.hero h1,
.hero h2 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 5.2rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 950;
    text-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.hero p {
    max-width: 660px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.9;
}

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

.hero-meta span,
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 800;
    color: #581c87;
    background: #f3e8ff;
}

.hero-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

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

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

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    box-shadow: 0 18px 34px rgba(147, 51, 234, 0.35);
}

.btn-light {
    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.btn-ghost {
    color: var(--primary);
    background: #ffffff;
    box-shadow: inset 0 0 0 1px #e9d5ff;
}

.hero-controls {
    position: absolute;
    z-index: 4;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 42px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
}

.hero-dot.is-active {
    width: 28px;
    background: #ffffff;
}

.main-space {
    padding: 54px 0 0;
}

.section {
    margin-bottom: 58px;
}

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

.section-title {
    margin: 0;
    color: #1f2937;
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    line-height: 1.15;
    font-weight: 950;
}

.section-kicker {
    margin: 0 0 8px;
    color: var(--primary);
    font-weight: 900;
}

.section-desc {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.category-card {
    min-height: 168px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    border-radius: var(--radius);
    color: #ffffff;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:nth-child(2) {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

.category-card:nth-child(3) {
    background: linear-gradient(135deg, #f97316, #ec4899);
}

.category-card:nth-child(4) {
    background: linear-gradient(135deg, #10b981, #6366f1);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 55px rgba(88, 28, 135, 0.24);
}

.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    font-size: 1.35rem;
    font-weight: 950;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.7;
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(88, 28, 135, 0.12);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 54px rgba(88, 28, 135, 0.22);
}

.poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #f3e8ff, #fce7f3);
}

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

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

.poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 50%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.score-pill {
    position: absolute;
    z-index: 1;
    left: 12px;
    top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 900;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px;
}

.card-body h3 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.35;
    font-weight: 950;
}

.card-meta {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.88rem;
}

.card-desc {
    margin: 10px 0 0;
    color: #4b5563;
    line-height: 1.7;
    font-size: 0.92rem;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 14px;
}

.card-tags span {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    background: #f3e8ff;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 62px 96px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(88, 28, 135, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-row:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(88, 28, 135, 0.18);
}

.rank-num {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: #ffffff;
    font-weight: 950;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.rank-thumb {
    width: 96px;
    height: 64px;
    border-radius: 14px;
    overflow: hidden;
    background: #f3e8ff;
}

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

.rank-info h3 {
    margin: 0 0 6px;
    font-size: 1.06rem;
    font-weight: 950;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.rank-score {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    color: #a16207;
    font-weight: 950;
    background: #fef9c3;
}

.page-hero {
    padding: 62px 0 36px;
}

.page-hero-card {
    padding: clamp(28px, 5vw, 48px);
    border-radius: 30px;
    color: #ffffff;
    background:
        radial-gradient(circle at 15% 25%, rgba(255, 255, 255, 0.24), transparent 28%),
        linear-gradient(135deg, var(--primary-dark), var(--primary), var(--accent));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.08;
    font-weight: 950;
}

.page-hero p {
    max-width: 860px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.9;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid #e9d5ff;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 28px rgba(88, 28, 135, 0.08);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #e9d5ff;
    border-radius: 999px;
    outline: 0;
    padding: 10px 15px;
    background: #ffffff;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #c084fc;
    box-shadow: 0 0 0 4px rgba(192, 132, 252, 0.18);
}

.hidden-card {
    display: none !important;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 28px 0 18px;
    color: var(--muted);
    font-size: 0.93rem;
}

.breadcrumb a {
    color: var(--primary);
    font-weight: 800;
}

.detail-shell {
    padding-bottom: 56px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
    gap: 28px;
}

.panel {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.player-card {
    overflow: hidden;
    background: #000000;
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.video-frame video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.18));
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-button {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
    transition: transform 0.2s ease, background 0.2s ease;
}

.play-button:hover {
    transform: scale(1.06);
    background: #ffffff;
}

.play-button svg {
    width: 34px;
    height: 34px;
    margin-left: 4px;
    fill: currentColor;
}

.detail-content {
    padding: 24px;
}

.detail-content h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    line-height: 1.15;
    font-weight: 950;
}

.detail-content h2,
.side-panel h2 {
    margin: 26px 0 12px;
    font-size: 1.35rem;
    font-weight: 950;
}

.detail-content p {
    color: #374151;
    line-height: 1.9;
}

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

.movie-meta-list span {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--primary-dark);
    font-weight: 850;
    background: #f3e8ff;
}

.side-panel {
    padding: 20px;
    align-self: start;
    position: sticky;
    top: 92px;
}

.side-card {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.side-card:hover {
    transform: translateX(3px);
    background: #faf5ff;
}

.side-card img {
    width: 76px;
    height: 98px;
    object-fit: cover;
    border-radius: 12px;
    background: #f3e8ff;
}

.side-card h3 {
    margin: 0 0 6px;
    font-size: 0.98rem;
    line-height: 1.35;
    font-weight: 950;
}

.side-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

.site-footer {
    margin-top: 64px;
    color: #ffffff;
    background: linear-gradient(180deg, #581c87, #3b0764);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.7fr);
    gap: 28px;
}

.footer-inner p {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-content: start;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
}

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

    .menu-toggle {
        display: block;
    }

    .mobile-panel.is-open {
        display: block;
    }

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

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

    .side-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .hero {
        height: 560px;
        min-height: 520px;
    }

    .hero-content {
        align-items: end;
        padding-bottom: 82px;
    }

    .hero h1,
    .hero h2 {
        font-size: clamp(2.1rem, 11vw, 3.5rem);
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-controls {
        left: 16px;
        right: auto;
        bottom: 24px;
    }

    .section-head {
        display: block;
    }

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

    .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .rank-score {
        grid-column: 3;
        justify-self: start;
    }

    .rank-num {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .rank-thumb {
        width: 78px;
        height: 58px;
    }

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

@media (max-width: 480px) {
    .navbar,
    .mobile-panel,
    .container,
    .footer-inner {
        width: min(100% - 24px, 1180px);
    }

    .movie-grid,
    .movie-grid.compact {
        grid-template-columns: 1fr;
    }

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

    .card-body h3 {
        font-size: 1.12rem;
    }
}
