:root {
    color-scheme: dark;
    --bg: #070714;
    --bg-soft: #11112a;
    --panel: rgba(255, 255, 255, 0.08);
    --panel-strong: rgba(255, 255, 255, 0.13);
    --line: rgba(255, 255, 255, 0.13);
    --text: #f8fafc;
    --muted: #aeb4c4;
    --muted-strong: #d9deeb;
    --orange: #ff7a1a;
    --orange-deep: #ec4b24;
    --pink: #f43f7d;
    --purple: #7c3aed;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 8%, rgba(255, 122, 26, 0.22), transparent 34%),
        radial-gradient(circle at 84% 12%, rgba(124, 58, 237, 0.24), transparent 32%),
        linear-gradient(180deg, #090816 0%, #0d0d22 42%, #070714 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 78%);
    z-index: -1;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 7, 20, 0.82);
    backdrop-filter: blur(22px);
}

.header-inner {
    width: min(1240px, calc(100% - 32px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    box-shadow: 0 12px 30px rgba(255, 122, 26, 0.32);
}

.brand-name {
    font-size: 21px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted-strong);
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.11);
}

.site-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.site-search-form input {
    width: 210px;
    border: 0;
    outline: 0;
    padding: 8px 10px;
    color: #ffffff;
    background: transparent;
}

.site-search-form input::placeholder {
    color: #c8cad7;
}

.site-search-form button,
.primary-button,
.ghost-button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.site-search-form button,
.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--orange-deep));
    box-shadow: 0 12px 28px rgba(236, 75, 36, 0.28);
}

.site-search-form button {
    padding: 8px 15px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
}

.ghost-button {
    color: #ffffff;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.1);
}

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

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
}

.mobile-panel {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(12, 12, 30, 0.96);
}

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

.mobile-links,
.mobile-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mobile-categories {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.mobile-categories a {
    color: var(--muted-strong);
}

.hero-carousel {
    position: relative;
    width: min(1240px, calc(100% - 32px));
    margin: 28px auto 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: var(--shadow);
}

.hero-track {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 44px;
    align-items: center;
    padding: 74px;
    opacity: 0;
    pointer-events: none;
    background-position: center;
    background-size: cover;
    transition: opacity 0.5s ease;
}

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

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

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    padding: 6px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #fff3e8;
    background: rgba(255, 255, 255, 0.1);
}

.hero-copy h1 {
    margin: 22px 0 18px;
    font-size: clamp(38px, 5vw, 70px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-copy p {
    width: min(680px, 100%);
    margin: 0;
    color: var(--muted-strong);
    font-size: 19px;
}

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

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 30px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.46);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    right: 16px;
    bottom: 16px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--pink));
}

.hero-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    padding: 0 32px 28px;
    pointer-events: none;
}

.hero-dots,
.hero-side-card {
    pointer-events: auto;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
    transition: 0.2s ease;
}

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

.hero-side-card,
.ranking-panel,
.text-panel,
.catalog-toolbar {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(18px);
}

.hero-side-card {
    width: min(370px, 42vw);
    padding: 18px;
}

.hero-side-card h2,
.ranking-panel h2 {
    margin: 0 0 14px;
    font-size: 20px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    color: var(--muted-strong);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ranking-row:first-child {
    border-top: 0;
}

.ranking-number {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--pink));
}

.ranking-title {
    overflow: hidden;
    color: #ffffff;
    font-weight: 750;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ranking-meta {
    color: var(--muted);
    font-size: 13px;
}

.page-main {
    padding: 42px 0 72px;
}

.quick-section,
.content-section {
    margin-top: 54px;
}

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

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

.eyebrow {
    margin: 0;
    color: #ffb36e;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-more {
    color: #ffffff;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

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

.category-pill,
.category-overview-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 122, 26, 0.18), rgba(124, 58, 237, 0.16));
    transition: 0.22s ease;
}

.category-pill {
    min-height: 76px;
    display: flex;
    align-items: center;
    padding: 20px;
    font-size: 18px;
    font-weight: 900;
}

.category-pill:hover,
.category-overview-card:hover,
.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 183, 108, 0.5);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.075);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
    transition: 0.22s ease;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.28s ease;
}

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

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

.quality-badge,
.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.quality-badge {
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
}

.play-chip {
    left: 10px;
    bottom: 10px;
    padding: 5px 10px;
    background: linear-gradient(135deg, var(--orange), var(--pink));
}

.rank-badge {
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #ffd166, var(--orange-deep));
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0;
    min-height: 48px;
    display: -webkit-box;
    overflow: hidden;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta,
.card-desc {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.card-desc {
    min-height: 58px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    padding: 4px 8px;
    color: #ffd9bd;
    font-size: 12px;
}

.compact .card-desc {
    display: none;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        radial-gradient(circle at 80% 20%, rgba(255, 122, 26, 0.2), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    box-shadow: var(--shadow);
}

.page-hero {
    padding: 44px;
}

.page-hero h1 {
    margin: 8px 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

.page-hero p:last-child {
    max-width: 760px;
    margin: 0;
    color: var(--muted-strong);
    font-size: 18px;
}

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

.category-overview-card {
    min-height: 250px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: end;
}

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

.category-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(5, 5, 12, 0.95), rgba(5, 5, 12, 0.1));
}

.category-overview-card strong,
.category-overview-card em {
    position: relative;
    z-index: 1;
}

.category-overview-card strong {
    font-size: 24px;
}

.category-overview-card em {
    margin-top: 8px;
    color: var(--muted-strong);
    font-style: normal;
    font-size: 14px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--muted);
}

.breadcrumb a:hover {
    color: #ffffff;
}

.catalog-toolbar {
    margin: 26px 0;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.catalog-search-wrap {
    display: grid;
    gap: 8px;
    min-width: min(360px, 100%);
}

.catalog-search-wrap label {
    color: #ffffff;
    font-weight: 850;
}

.catalog-search {
    width: 100%;
    border: 1px solid var(--line);
    outline: 0;
    border-radius: 16px;
    padding: 13px 15px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.22);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
}

.filter-chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 13px;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, 0.07);
    cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--pink));
}

.hidden-by-filter {
    display: none !important;
}

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

.ranking-panel {
    position: sticky;
    top: 96px;
    padding: 20px;
}

.large-list {
    max-height: 890px;
    overflow: auto;
    padding-right: 8px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    padding: 32px;
    align-items: center;
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

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

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

.detail-one-line {
    max-width: 780px;
    color: var(--muted-strong);
    font-size: 19px;
}

.detail-meta {
    margin-top: 20px;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #000000;
    box-shadow: var(--shadow);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000000;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    padding: 28px;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.22));
}

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

.play-icon {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    box-shadow: 0 20px 50px rgba(244, 63, 125, 0.35);
    font-size: 34px;
}

.player-start strong {
    font-size: clamp(22px, 3vw, 38px);
}

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

.text-panel {
    padding: 24px;
}

.text-panel h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.text-panel p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 16px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.18);
}

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

.footer-brand {
    font-size: 22px;
    font-weight: 900;
}

.footer-inner p {
    color: var(--muted);
}

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

.footer-links a {
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted-strong);
}

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

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

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 250px;
        padding: 52px;
    }

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

    .ranking-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .header-inner {
        height: auto;
        min-height: 70px;
    }

    .main-nav,
    .site-search-form {
        display: none;
    }

    .mobile-menu-button {
        display: block;
        margin-left: auto;
    }

    .hero-track {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: start;
        padding: 34px 24px 112px;
    }

    .hero-poster {
        width: min(260px, 74vw);
        transform: none;
    }

    .hero-bottom {
        display: block;
    }

    .hero-side-card {
        width: 100%;
        margin-top: 14px;
    }

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

    .catalog-toolbar {
        display: block;
    }

    .filter-chips {
        justify-content: flex-start;
        margin-top: 14px;
    }

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

    .detail-cover {
        max-width: 260px;
    }

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

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

    .brand-name {
        font-size: 18px;
    }

    .hero-track {
        min-height: 720px;
    }

    .hero-copy p,
    .detail-one-line,
    .page-hero p:last-child {
        font-size: 16px;
    }

    .category-pills,
    .category-overview-grid,
    .movie-grid,
    .featured-grid {
        grid-template-columns: 1fr;
    }

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

    .card-desc {
        display: none;
    }

    .page-hero,
    .detail-hero {
        padding: 24px;
        border-radius: 24px;
    }
}
