:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.58);
    --bg-card-solid: #1e293b;
    --cyan: #22d3ee;
    --cyan-deep: #0891b2;
    --orange: #fb923c;
    --pink: #f472b6;
    --text: #ffffff;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.24);
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

img {
    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: 50;
    background: linear-gradient(90deg, #0f172a 0%, #164e63 50%, #0f172a 100%);
    box-shadow: var(--shadow);
    border-bottom: 1px solid rgba(34, 211, 238, 0.16);
}

.nav-shell {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--cyan-deep);
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.35);
}

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

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

.brand-text small {
    margin-top: 3px;
    color: #67e8f9;
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.desktop-nav a {
    color: rgba(255, 255, 255, 0.86);
    font-weight: 650;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: #67e8f9;
}

.site-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-search input,
.search-page-form input,
.search-page-form select {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border-radius: 12px;
    min-height: 42px;
    padding: 0 14px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, width 0.2s ease;
}

.site-search input {
    width: 188px;
}

.site-search input:focus {
    width: 248px;
    border-color: var(--cyan);
    background: rgba(255, 255, 255, 0.16);
}

.site-search button,
.search-page-form button,
.btn-primary,
.btn-ghost {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    padding: 0 18px;
    cursor: pointer;
    font-weight: 750;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.site-search button,
.search-page-form button,
.btn-primary {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    box-shadow: 0 12px 24px rgba(8, 145, 178, 0.28);
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.62);
    color: #e2e8f0;
}

.site-search button:hover,
.search-page-form button:hover,
.btn-primary:hover,
.btn-ghost:hover {
    transform: translateY(-1px);
}

.menu-toggle,
.mobile-panel {
    display: none;
}

.hero-section {
    position: relative;
    overflow: hidden;
    padding: 32px 0 20px;
}

.hero-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.16), transparent 36%), radial-gradient(circle at 82% 12%, rgba(244, 114, 182, 0.1), transparent 28%);
    pointer-events: none;
}

.hero-container {
    position: relative;
}

.hero-carousel {
    position: relative;
    overflow: hidden;
    min-height: 510px;
    border-radius: 26px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    background: rgba(15, 23, 42, 0.62);
    box-shadow: var(--shadow);
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.18) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.84) 0%, transparent 48%);
}

.hero-content {
    position: absolute;
    left: clamp(22px, 6vw, 72px);
    bottom: clamp(28px, 8vw, 72px);
    width: min(640px, calc(100% - 44px));
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.15);
    color: #67e8f9;
    border: 1px solid rgba(34, 211, 238, 0.35);
    padding: 7px 13px;
    font-size: 14px;
    font-weight: 750;
    margin-bottom: 14px;
}

.hero-content h1,
.hero-content h2 {
    margin: 0;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.hero-content h1 {
    max-width: 720px;
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 900;
}

.hero-content h2 {
    margin-top: 8px;
    font-size: clamp(28px, 4.2vw, 50px);
    font-weight: 900;
}

.hero-content p {
    max-width: 620px;
    margin: 16px 0 0;
    color: #cbd5e1;
    line-height: 1.75;
    font-size: 16px;
}

.hero-tags,
.detail-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 18px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 5px 10px;
    font-size: 12px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.hero-dots {
    position: absolute;
    right: 28px;
    bottom: 24px;
    z-index: 4;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 36px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--cyan);
}

.quick-panels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding: 26px 0 8px;
}

.quick-card {
    position: relative;
    overflow: hidden;
    min-height: 128px;
    border-radius: 20px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.quick-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.28);
}

.quick-card.cyan {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(8, 145, 178, 0.18));
}

.quick-card.orange {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.22), rgba(194, 65, 12, 0.18));
}

.quick-card.pink {
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.22), rgba(190, 24, 93, 0.18));
}

.quick-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 9px;
}

.quick-card strong {
    display: block;
    max-width: 260px;
    font-size: 22px;
    line-height: 1.25;
}

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

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

.section-heading.simple {
    align-items: center;
}

.section-heading p,
.page-title p {
    margin: 0 0 7px;
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 12px;
}

.section-heading h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
}

.section-heading a {
    color: #67e8f9;
    font-weight: 750;
}

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

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

.movie-card,
.compact-card,
.rank-card,
.category-overview-card,
.top-rank-card,
.ranking-row {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover,
.compact-card:hover,
.rank-card:hover,
.category-overview-card:hover,
.top-rank-card:hover,
.ranking-row:hover {
    transform: translateY(-3px);
    background: rgba(30, 41, 59, 0.88);
    border-color: rgba(34, 211, 238, 0.32);
}

.poster-link {
    display: block;
    height: 100%;
}

.poster-frame {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.poster-frame img,
.compact-card img,
.rank-card img,
.top-rank-card img,
.ranking-row img,
.category-tile img,
.category-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.movie-card:hover .poster-frame img,
.compact-card:hover img,
.category-tile:hover img {
    transform: scale(1.06);
}

.year-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    border-radius: 999px;
    padding: 4px 9px;
    background: rgba(0, 0, 0, 0.68);
    font-size: 12px;
}

.movie-card-body {
    display: flex;
    flex-direction: column;
    min-height: 174px;
    padding: 14px;
}

.movie-card-body strong {
    color: white;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card-body em {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    line-height: 1.55;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #67e8f9;
    margin-top: auto;
    padding-top: 12px;
    font-size: 12px;
}

.card-tags {
    margin-top: 8px;
}

.card-tags span {
    background: rgba(15, 23, 42, 0.82);
    color: #94a3b8;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 170px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--line);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.14));
}

.category-tile span {
    position: absolute;
    z-index: 2;
    left: 18px;
    right: 18px;
    bottom: 16px;
}

.category-tile strong,
.category-tile em {
    display: block;
}

.category-tile strong {
    font-size: 21px;
}

.category-tile em {
    margin-top: 6px;
    color: #cbd5e1;
    font-style: normal;
    font-size: 13px;
    line-height: 1.5;
}

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

.rank-card a {
    display: grid;
    grid-template-columns: 148px 1fr;
    gap: 14px;
    padding: 12px;
}

.rank-card img {
    aspect-ratio: 16 / 10;
    border-radius: 12px;
}

.rank-card h3,
.rank-card p {
    margin: 0;
}

.rank-card h3 {
    font-size: 17px;
    margin-bottom: 8px;
}

.rank-card p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.rank-card span {
    display: block;
    margin-top: 12px;
    color: #67e8f9;
    font-size: 12px;
}

.page-shell {
    padding: 34px 0 52px;
}

.page-title {
    padding: 26px 0 18px;
}

.page-title.with-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.page-title span {
    display: block;
    max-width: 760px;
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.7;
}

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

.category-overview-card a {
    display: block;
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 120px;
}

.category-overview-card div:last-child {
    padding: 18px;
}

.category-overview-card h2,
.category-overview-card p {
    margin: 0;
}

.category-overview-card p {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.6;
    font-size: 14px;
}

.category-overview-card span {
    display: inline-flex;
    margin-top: 14px;
    color: #67e8f9;
    font-weight: 750;
}

.top-rank-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding-bottom: 24px;
}

.top-rank-card a {
    display: block;
    position: relative;
}

.top-rank-card img {
    aspect-ratio: 16 / 11;
}

.top-rank-card div {
    padding: 18px;
}

.top-rank-card h2,
.top-rank-card p {
    margin: 0;
}

.top-rank-card p {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.6;
}

.top-rank-card em {
    display: block;
    margin-top: 12px;
    color: #67e8f9;
    font-style: normal;
}

.rank-number {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    font-weight: 900;
}

.ranking-list {
    display: grid;
    gap: 12px;
}

.ranking-row a {
    display: grid;
    grid-template-columns: 46px 118px 1fr 90px;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
}

.ranking-row span {
    color: var(--cyan);
    font-size: 22px;
    font-weight: 900;
}

.ranking-row img {
    aspect-ratio: 16 / 10;
    border-radius: 12px;
}

.ranking-row h2,
.ranking-row p {
    margin: 0;
}

.ranking-row h2 {
    font-size: 18px;
}

.ranking-row p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.ranking-row em {
    color: #67e8f9;
    font-style: normal;
    justify-self: end;
}

.search-panel {
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.54);
    padding: 22px;
}

.search-page-form {
    display: grid;
    grid-template-columns: 1fr 150px 150px 110px;
    gap: 12px;
    margin-bottom: 22px;
}

.search-page-form select option {
    color: #0f172a;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    padding: 26px 0 12px;
    font-size: 14px;
}

.breadcrumb a {
    color: #67e8f9;
}

.breadcrumb em {
    font-style: normal;
    color: #e2e8f0;
}

.detail-page {
    padding-bottom: 52px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 32px;
    align-items: end;
    padding: 22px 0 34px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    box-shadow: var(--shadow);
}

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

.detail-info p:first-child {
    color: #67e8f9;
    margin: 0 0 12px;
    font-weight: 750;
}

.detail-info h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.detail-tags {
    margin-top: 18px;
}

.lead-text {
    max-width: 820px;
    color: #cbd5e1;
    line-height: 1.8;
    font-size: 17px;
    margin: 18px 0 24px;
}

.player-section {
    padding: 22px 0 34px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    border: 1px solid rgba(34, 211, 238, 0.24);
    background: #000000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 13px;
    border: 0;
    color: white;
    background: radial-gradient(circle at center, rgba(34, 211, 238, 0.24), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay span {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.9);
    box-shadow: 0 0 34px rgba(34, 211, 238, 0.38);
    font-size: 30px;
}

.player-overlay strong {
    font-size: 18px;
}

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

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    padding: 20px 0 16px;
}

.detail-content article {
    border-radius: 22px;
    border: 1px solid var(--line);
    background: var(--bg-card);
    padding: 22px;
}

.detail-content h2 {
    margin: 0 0 12px;
}

.detail-content p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.85;
}

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

.compact-card a {
    display: block;
}

.compact-card img {
    aspect-ratio: 16 / 10;
}

.compact-card strong,
.compact-card span {
    display: block;
    padding: 0 12px;
}

.compact-card strong {
    padding-top: 12px;
    font-size: 14px;
    line-height: 1.35;
}

.compact-card span {
    padding-top: 6px;
    padding-bottom: 12px;
    color: var(--muted);
    font-size: 12px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.78);
    padding: 32px 0 18px;
}

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

.footer-brand {
    font-size: 20px;
    font-weight: 900;
    color: #67e8f9;
}

.site-footer p {
    max-width: 560px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px 18px;
}

.site-footer nav a {
    color: #cbd5e1;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 0;
    color: #64748b;
    font-size: 13px;
}

@media (max-width: 1024px) {
    .desktop-nav,
    .nav-shell > .site-search {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border: 0;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.12);
        color: white;
        cursor: pointer;
    }

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

    .mobile-panel.is-open {
        display: grid;
        gap: 12px;
    }

    .mobile-panel a {
        padding: 10px 0;
        color: white;
        font-weight: 700;
    }

    .mobile-panel .site-search {
        display: grid;
        grid-template-columns: 1fr 90px;
        gap: 10px;
    }

    .mobile-panel .site-search input {
        width: 100%;
    }

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

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

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

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

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

    .hero-section {
        padding-top: 18px;
    }

    .hero-carousel {
        min-height: 560px;
        border-radius: 20px;
    }

    .hero-shade {
        background: linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.45) 100%);
    }

    .hero-content {
        left: 18px;
        right: 18px;
        bottom: 52px;
        width: auto;
    }

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

    .quick-panels,
    .rank-list,
    .detail-content,
    .footer-grid,
    .search-page-form {
        grid-template-columns: 1fr;
    }

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

    .rank-card a {
        grid-template-columns: 112px 1fr;
    }

    .ranking-row a {
        grid-template-columns: 38px 88px 1fr;
    }

    .ranking-row em {
        display: none;
    }

    .page-title.with-actions,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .detail-poster {
        width: min(300px, 100%);
    }

    .site-footer nav {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .movie-grid.dense,
    .category-grid,
    .category-overview-grid,
    .top-rank-grid,
    .compact-grid {
        grid-template-columns: 1fr;
    }

    .brand-text strong {
        font-size: 16px;
    }

    .movie-card-body {
        min-height: auto;
    }
}
