
* {
    box-sizing: border-box;
}

:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --border: rgba(59, 130, 246, 0.18);
    --border-soft: rgba(148, 163, 184, 0.14);
    --text: #f8fafc;
    --muted: #94a3b8;
    --dim: #64748b;
    --blue: #3b82f6;
    --blue-light: #60a5fa;
    --cyan: #22d3ee;
    --shadow: 0 24px 80px rgba(37, 99, 235, 0.18);
    --radius: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 38rem),
        radial-gradient(circle at 80% 12%, rgba(34, 211, 238, 0.14), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    z-index: 60;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.9));
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 60px rgba(2, 6, 23, 0.38);
}

.header-inner {
    max-width: 1280px;
    height: 76px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 0 34px rgba(59, 130, 246, 0.4);
    font-size: 14px;
}

.brand-text,
.footer-brand span:last-child {
    font-size: 24px;
    background: linear-gradient(90deg, var(--blue-light), var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.mobile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #cbd5e1;
    transition: 0.25s ease;
    font-weight: 600;
}

.nav-link {
    min-height: 42px;
    padding: 0 15px;
    font-size: 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.16);
    box-shadow: 0 12px 38px rgba(59, 130, 246, 0.15);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-soft);
    color: white;
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    padding: 8px 20px 18px;
    border-top: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.98);
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    min-height: 44px;
    padding: 0 14px;
    justify-content: flex-start;
}

.hero {
    position: relative;
    min-height: 86vh;
    overflow: hidden;
    background: #020617;
}

.hero-track,
.hero-slide,
.hero-bg,
.hero-layer {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transform: scale(1.02);
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-layer {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.86) 38%, rgba(2, 6, 23, 0.35) 68%, rgba(2, 6, 23, 0.82) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.12) 38%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    padding: 22vh 24px 140px;
    margin-left: calc((100vw - min(1280px, calc(100vw - 48px))) / 2);
}

.hero-kicker,
.page-hero-content span,
.section-heading span {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 8px;
    color: white;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.95), rgba(34, 211, 238, 0.86));
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 14px 44px rgba(37, 99, 235, 0.24);
}

.hero h1,
.page-hero h1 {
    margin: 20px 0 16px;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 1.05;
    letter-spacing: -0.05em;
    text-shadow: 0 18px 60px rgba(2, 6, 23, 0.72);
}

.hero p,
.page-hero p {
    max-width: 720px;
    color: #cbd5e1;
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.8;
    text-shadow: 0 12px 34px rgba(2, 6, 23, 0.85);
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta {
    margin-top: 22px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 4px 10px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.18);
    font-size: 13px;
}

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

.btn-primary,
.btn-ghost,
.global-search button,
.filter-panel button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 14px;
    padding: 0 22px;
    font-weight: 800;
    transition: 0.25s ease;
    cursor: pointer;
}

.btn-primary,
.global-search button,
.filter-panel button {
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 48px rgba(37, 99, 235, 0.28);
    border: 0;
}

.btn-primary:hover,
.global-search button:hover,
.filter-panel button:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 60px rgba(37, 99, 235, 0.36);
}

.btn-ghost {
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(96, 165, 250, 0.24);
}

.btn-ghost:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(96, 165, 250, 0.5);
}

.hero-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.74);
    color: white;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    transition: 0.25s ease;
}

.hero-arrow:hover {
    background: rgba(37, 99, 235, 0.72);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 36px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.38);
    cursor: pointer;
    transition: 0.25s ease;
}

.hero-dot.is-active {
    width: 58px;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.section-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.section-block {
    padding-top: 64px;
    padding-bottom: 22px;
}

.search-band {
    position: relative;
    z-index: 3;
    margin-top: -58px;
}

.search-panel,
.filter-panel,
.text-panel,
.content-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.7));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(240px, 0.85fr) minmax(320px, 1.15fr);
    gap: 28px;
    align-items: center;
    padding: 28px;
}

.search-panel h2,
.section-heading h2,
.content-card h2,
.footer-col h2 {
    margin: 0;
    color: white;
}

.search-panel h2 {
    font-size: 28px;
}

.search-panel p {
    margin: 8px 0 0;
    color: var(--muted);
}

.global-search,
.filter-panel {
    display: flex;
    align-items: center;
    gap: 12px;
}

.global-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 50px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.62);
    color: white;
    outline: none;
    padding: 0 16px;
    transition: 0.25s ease;
}

.global-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(96, 165, 250, 0.7);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

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

.section-heading h2 {
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.03em;
}

.section-heading a {
    color: #93c5fd;
    font-weight: 700;
}

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.58);
    transition: 0.3s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(96, 165, 250, 0.52);
    box-shadow: 0 22px 58px rgba(37, 99, 235, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

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

.movie-card:hover .poster-link img,
.category-card:hover img,
.rank-cover:hover img {
    transform: scale(1.08);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.85) 100%);
}

.type-badge,
.year-badge {
    position: absolute;
    top: 10px;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    color: white;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.type-badge {
    left: 10px;
    background: rgba(37, 99, 235, 0.86);
}

.year-badge {
    right: 10px;
    background: rgba(15, 23, 42, 0.82);
}

.movie-info {
    padding: 14px;
}

.movie-info h2 {
    margin: 0 0 8px;
    color: white;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 800;
}

.movie-info h2 a:hover,
.rank-body h2 a:hover,
.footer-col a:hover {
    color: #60a5fa;
}

.movie-info p {
    min-height: 46px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    gap: 6px;
    margin-bottom: 10px;
}

.card-meta span {
    min-height: 24px;
    font-size: 12px;
    color: #93c5fd;
}

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

.tag-row span {
    border-radius: 999px;
    padding: 4px 8px;
    color: #cbd5e1;
    background: rgba(51, 65, 85, 0.72);
    font-size: 12px;
}

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

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--border-soft);
    background: rgba(15, 23, 42, 0.7);
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.28);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.55s ease;
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.95));
}

.category-name,
.category-desc {
    position: absolute;
    left: 22px;
    right: 22px;
    z-index: 2;
}

.category-name {
    bottom: 66px;
    color: white;
    font-size: 24px;
    font-weight: 900;
}

.category-desc {
    bottom: 22px;
    color: #cbd5e1;
    line-height: 1.6;
    font-size: 14px;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 62px 90px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.62);
    transition: 0.25s ease;
}

.rank-item:hover {
    border-color: rgba(96, 165, 250, 0.5);
    transform: translateY(-2px);
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-size: 20px;
    font-weight: 900;
}

.rank-cover {
    display: block;
    width: 90px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.4s ease;
}

.rank-body h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

.rank-body p {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.7;
}

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

.page-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.32), transparent 34rem),
        radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.16), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
}

.compact-hero {
    min-height: 360px;
    display: flex;
    align-items: center;
}

.page-hero-content {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 70px 0;
}

.page-hero h1 {
    font-size: clamp(38px, 6vw, 64px);
}

.filter-panel-wrap {
    margin-top: -36px;
    position: relative;
    z-index: 3;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px 110px;
    padding: 20px;
}

.empty-state {
    padding: 80px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 20px;
}

.breadcrumb {
    max-width: 1280px;
    margin: 30px auto 0;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: #93c5fd;
}

.detail-hero {
    max-width: 1280px;
    margin: 28px auto 0;
    padding: 0 24px 42px;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    background: #0f172a;
}

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

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

.detail-info p {
    max-width: 780px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

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

.player-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 56px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--border);
    background: #000;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.38);
    aspect-ratio: 16 / 9;
}

.movie-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    z-index: 5;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: white;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.64));
    border: 0;
    cursor: pointer;
    transition: 0.25s ease;
}

.player-overlay:hover {
    background: radial-gradient(circle, rgba(37, 99, 235, 0.2), rgba(2, 6, 23, 0.72));
}

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

.play-circle {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 60px rgba(37, 99, 235, 0.45);
    font-size: 34px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding-bottom: 20px;
}

.content-card {
    padding: 26px;
}

.content-card h2 {
    font-size: 24px;
    margin-bottom: 12px;
}

.content-card p,
.text-panel p {
    color: #cbd5e1;
    line-height: 1.9;
    margin: 0;
}

.text-panel {
    margin-top: 56px;
    margin-bottom: 70px;
    padding: 32px;
    display: grid;
    gap: 18px;
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.76), #020617);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 52px 24px 28px;
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 34px;
}

.footer-main p {
    max-width: 440px;
    margin: 16px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.footer-col h2 {
    font-size: 16px;
    margin-bottom: 14px;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.footer-col a {
    color: var(--muted);
    transition: 0.25s ease;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px 34px;
    color: var(--dim);
    font-size: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

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

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

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

    .menu-toggle {
        display: block;
    }

    .header-inner {
        height: 66px;
    }

    .brand-text,
    .footer-brand span:last-child {
        font-size: 21px;
    }

    .hero {
        min-height: 78vh;
    }

    .hero-content {
        margin-left: 0;
        padding: 18vh 22px 112px;
    }

    .hero-arrow {
        display: none;
    }

    .search-panel,
    .filter-panel,
    .detail-hero,
    .detail-content,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

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

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

@media (max-width: 640px) {
    .section-inner,
    .header-inner,
    .breadcrumb,
    .detail-hero,
    .player-section,
    .page-hero-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        letter-spacing: -0.03em;
    }

    .hero-actions,
    .global-search {
        flex-direction: column;
        align-items: stretch;
    }

    .search-panel {
        padding: 20px;
    }

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

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

    .movie-info {
        padding: 12px;
    }

    .movie-info h2 {
        font-size: 15px;
    }

    .rank-item {
        grid-template-columns: 46px 74px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .rank-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .rank-cover {
        width: 74px;
    }

    .rank-body p {
        display: none;
    }

    .player-shell {
        border-radius: 18px;
    }

    .play-circle {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}
