:root {
    color-scheme: dark;
    --bg: #07111f;
    --bg-soft: #0d1b2e;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.22);
    --text: #eef8ff;
    --muted: #a8bfd0;
    --cyan: #22d3ee;
    --teal: #14b8a6;
    --green: #34d399;
    --yellow: #facc15;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 8%, rgba(20, 184, 166, 0.24), transparent 34%),
        radial-gradient(circle at 78% 0%, rgba(34, 211, 238, 0.18), transparent 30%),
        linear-gradient(135deg, #07111f 0%, #0f172a 54%, #0b1120 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    content: "";
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 42px 42px;
}

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: 60;
    backdrop-filter: blur(18px);
    background: rgba(7, 17, 31, 0.82);
    border-bottom: 1px solid var(--line);
}

.topbar {
    width: min(1440px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

.brand-text {
    font-size: 21px;
    font-weight: 900;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #c7fff5, #67e8f9, #e0f2fe);
    -webkit-background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    overflow: hidden;
}

.nav-links a,
.mobile-panel a,
.footer-links a {
    color: rgba(238, 248, 255, 0.82);
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
    color: #67e8f9;
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
}

.nav-search input,
.filter-bar input,
.filter-bar select {
    color: var(--text);
    border: 0;
    outline: 0;
    background: transparent;
}

.nav-search input {
    width: 190px;
    padding: 8px 10px;
}

.nav-search button,
.primary-btn,
.ghost-btn,
.menu-button,
.section-link,
.text-link {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button,
.primary-btn {
    color: #042f2e;
    font-weight: 800;
    background: linear-gradient(135deg, #67e8f9, #34d399);
    box-shadow: 0 14px 30px rgba(20, 184, 166, 0.24);
}

.nav-search button {
    padding: 8px 14px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
}

.ghost-btn {
    color: #e0f2fe;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(15, 23, 42, 0.48);
}

.primary-btn:hover,
.ghost-btn:hover,
.nav-search button:hover,
.section-link:hover {
    transform: translateY(-2px);
}

.menu-button {
    display: none;
    color: var(--text);
    padding: 9px 14px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

.mobile-panel {
    display: none;
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel-strong);
}

.mobile-panel.is-open {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

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

.hero-stage {
    position: relative;
    height: min(72vh, 760px);
    min-height: 540px;
    overflow: hidden;
    border: 1px solid rgba(103, 232, 249, 0.24);
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.52), rgba(15, 23, 42, 0.96));
    box-shadow: var(--shadow);
}

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

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

.hero-slide img,
.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 15, 28, 0.95) 0%, rgba(5, 15, 28, 0.74) 42%, rgba(5, 15, 28, 0.18) 100%),
        linear-gradient(0deg, rgba(5, 15, 28, 0.86) 0%, rgba(5, 15, 28, 0.06) 55%);
}

.hero-content {
    position: absolute;
    left: clamp(26px, 6vw, 86px);
    bottom: clamp(34px, 7vw, 92px);
    width: min(720px, calc(100% - 48px));
}

.hero-tags,
.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    color: #bff7ff;
    font-size: 14px;
}

.hero-tags span,
.card-meta span,
.detail-meta span,
.tag-row span,
.hero-extra-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border: 1px solid rgba(103, 232, 249, 0.22);
    border-radius: 999px;
    background: rgba(8, 47, 73, 0.38);
}

.hero-content h1 {
    margin: 18px 0 14px;
    font-size: clamp(38px, 6.6vw, 88px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-content p {
    width: min(680px, 100%);
    margin: 0 0 18px;
    color: rgba(238, 248, 255, 0.88);
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.8;
}

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

.hero-extra-tags {
    margin-bottom: 26px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    color: #ffffff;
    font-size: 34px;
    background: rgba(15, 23, 42, 0.58);
    transform: translateY(-50%);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

.hero-dots {
    position: absolute;
    right: 36px;
    bottom: 36px;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 38px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    color: transparent;
    background: rgba(255, 255, 255, 0.35);
}

.hero-dots button.is-active {
    width: 58px;
    background: linear-gradient(90deg, #67e8f9, #34d399);
}

.quick-strip,
.content-section,
.filter-bar,
.page-hero,
.detail-wrap {
    width: min(1400px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.quick-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 18px;
}

.quick-strip a,
.category-tile,
.text-panel,
.rank-panel,
.filter-bar,
.rank-card,
.movie-card {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.58));
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
}

.quick-strip a {
    padding: 18px 20px;
    border-radius: 20px;
    color: #dffbff;
    text-align: center;
    font-weight: 800;
}

.content-section {
    margin-top: 58px;
}

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

.eyebrow {
    margin: 0 0 8px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section-head h2,
.rank-panel h2,
.text-panel h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(28px, 3vw, 44px);
    line-height: 1.15;
}

.section-link,
.text-link {
    color: #bff7ff;
    padding: 10px 16px;
    border: 1px solid rgba(103, 232, 249, 0.25);
    background: rgba(8, 47, 73, 0.28);
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover,
.category-tile:hover,
.rank-card:hover {
    transform: translateY(-6px);
    border-color: rgba(103, 232, 249, 0.48);
    box-shadow: 0 24px 60px rgba(34, 211, 238, 0.13);
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background:
        radial-gradient(circle at 30% 18%, rgba(103, 232, 249, 0.28), transparent 32%),
        linear-gradient(135deg, #0f766e, #0f172a);
}

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

.movie-card:hover .poster img,
.rank-card:hover .poster img {
    transform: scale(1.06);
}

.poster-year {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #042f2e;
    font-size: 12px;
    font-weight: 900;
    background: linear-gradient(135deg, #a7f3d0, #67e8f9);
}

.card-body {
    padding: 16px;
}

.card-body h3,
.rank-card-main h2 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.card-body p,
.rank-card-main p,
.category-tile p,
.page-hero p,
.text-panel p,
.site-footer p {
    color: var(--muted);
    line-height: 1.8;
}

.card-body p {
    min-height: 74px;
    margin: 0 0 12px;
    font-size: 14px;
}

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

.tag-row span {
    min-height: 24px;
    color: #dffbff;
    font-size: 12px;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    align-items: start;
}

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
    border-radius: var(--radius);
}

.rank-panel-head {
    margin-bottom: 16px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 44px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(8, 47, 73, 0.26);
}

.rank-index {
    color: var(--yellow);
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-score {
    color: #86efac;
    font-weight: 900;
    text-align: right;
}

.block-btn {
    width: 100%;
    margin-top: 18px;
}

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

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

.category-tile {
    min-height: 150px;
    padding: 24px;
    border-radius: var(--radius);
}

.category-tile span {
    display: block;
    margin-bottom: 14px;
    font-size: 24px;
    font-weight: 900;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin-top: 24px;
    border: 1px solid rgba(103, 232, 249, 0.22);
    border-radius: 32px;
    background:
        radial-gradient(circle at 12% 24%, rgba(20, 184, 166, 0.34), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(8, 47, 73, 0.74));
    box-shadow: var(--shadow);
}

.slim-hero {
    padding: clamp(34px, 6vw, 76px);
}

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 24px;
    padding: 14px;
    border-radius: 22px;
}

.filter-bar input,
.filter-bar select {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.28);
}

.filter-bar input {
    flex: 1;
}

.filter-bar select {
    min-width: 180px;
}

.filter-bar span {
    color: var(--muted);
    white-space: nowrap;
}

.rank-catalog {
    display: grid;
    gap: 16px;
}

.rank-card {
    display: grid;
    grid-template-columns: 78px 110px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    color: #042f2e;
    font-weight: 900;
    background: linear-gradient(135deg, #facc15, #67e8f9);
}

.rank-card .poster {
    border-radius: 16px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: end;
    padding: 92px 0 58px;
}

.detail-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    opacity: 0.34;
    filter: blur(2px);
    background: linear-gradient(135deg, #0f766e, #0f172a);
}

.detail-hero::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background:
        linear-gradient(0deg, #07111f 0%, rgba(7, 17, 31, 0.84) 34%, rgba(7, 17, 31, 0.54) 100%),
        linear-gradient(90deg, rgba(7, 17, 31, 0.94), rgba(7, 17, 31, 0.34));
}

.breadcrumb {
    display: inline-flex;
    margin-bottom: 18px;
    color: #bff7ff;
}

.detail-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: clamp(24px, 5vw, 58px);
    align-items: end;
}

.detail-poster {
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.detail-one {
    width: min(820px, 100%);
    margin: 20px 0;
    color: rgba(238, 248, 255, 0.9);
    font-size: 18px;
    line-height: 1.9;
}

.large-tags {
    margin-bottom: 24px;
}

.detail-section {
    margin-top: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(103, 232, 249, 0.24);
    border-radius: 30px;
    background: #000000;
    box-shadow: var(--shadow);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    color: #ffffff;
    border: 0;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.14), rgba(15, 23, 42, 0.68));
}

.play-cover span {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    color: #042f2e;
    font-size: 30px;
    background: linear-gradient(135deg, #67e8f9, #34d399);
}

.play-cover strong {
    margin-top: -18px;
    font-size: 18px;
}

.player-shell.is-playing .play-cover {
    display: none;
}

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

.text-panel {
    padding: clamp(22px, 4vw, 34px);
    border-radius: var(--radius);
}

.article-text p {
    margin: 16px 0 0;
}

.site-footer {
    margin-top: 72px;
    padding: 34px 0 46px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.3);
}

.footer-inner {
    width: min(1400px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 32px;
}

.footer-inner strong {
    font-size: 22px;
}

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

[hidden] {
    display: none !important;
}

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

    .menu-button {
        display: inline-flex;
    }

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

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

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

    .rank-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .topbar {
        height: auto;
        min-height: 68px;
        flex-wrap: wrap;
        padding: 10px 0;
    }

    .nav-search {
        order: 4;
        width: 100%;
    }

    .nav-search input {
        width: 100%;
        flex: 1;
    }

    .hero-stage {
        min-height: 560px;
        height: 68vh;
        border-radius: 24px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-dots {
        left: 24px;
        right: auto;
        bottom: 22px;
    }

    .quick-strip {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .rank-card {
        grid-template-columns: 54px 88px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-number {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        font-size: 14px;
    }

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

    .detail-poster {
        width: min(280px, 72vw);
    }

    .footer-links {
        justify-content: start;
    }
}

@media (max-width: 520px) {
    .brand-text {
        font-size: 18px;
    }

    .hero-shell,
    .quick-strip,
    .content-section,
    .filter-bar,
    .page-hero,
    .detail-wrap {
        width: min(100% - 22px, 1400px);
    }

    .hero-content {
        left: 20px;
        bottom: 58px;
        width: calc(100% - 40px);
    }

    .hero-content h1 {
        font-size: 38px;
    }

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

    .quick-strip {
        grid-template-columns: 1fr;
    }

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