:root {
    color-scheme: dark;
    --bg: #0c0a09;
    --panel: #1c1917;
    --panel-soft: #292524;
    --panel-card: #1f1a17;
    --border: rgba(245, 158, 11, 0.18);
    --border-soft: rgba(255, 255, 255, 0.08);
    --text: #f5f5f4;
    --muted: #a8a29e;
    --muted-strong: #d6d3d1;
    --amber: #f59e0b;
    --amber-soft: #fbbf24;
    --amber-deep: #b45309;
    --radius: 18px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(180, 83, 9, 0.28), transparent 28rem),
        linear-gradient(180deg, #1c1917 0%, #0c0a09 35%, #0c0a09 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(12, 10, 9, 0.82);
    border-bottom: 1px solid var(--border-soft);
    backdrop-filter: blur(18px);
}

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: #fffbeb;
}

.site-logo::before {
    content: "";
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background:
        linear-gradient(135deg, #f59e0b, #78350f),
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.7), transparent 30%);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.38);
}

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

.main-nav a,
.mobile-nav a {
    color: #d6d3d1;
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-nav a:hover {
    color: #fffbeb;
    background: rgba(245, 158, 11, 0.16);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: rgba(41, 37, 36, 0.86);
    color: #fffbeb;
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    background: rgba(28, 25, 23, 0.96);
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.hero-carousel {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #0c0a09;
}

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

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

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

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(12, 10, 9, 0.94) 0%, rgba(12, 10, 9, 0.72) 42%, rgba(12, 10, 9, 0.12) 100%),
        linear-gradient(0deg, #0c0a09 0%, rgba(12, 10, 9, 0.2) 38%, rgba(12, 10, 9, 0.1) 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2));
    bottom: 12%;
    width: min(680px, calc(100% - 48px));
    z-index: 2;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 999px;
    background: rgba(120, 53, 15, 0.35);
    color: #fcd34d;
    font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.04em;
    color: #ffffff;
    text-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    max-width: 620px;
    margin: 0 0 26px;
    color: #d6d3d1;
    font-size: clamp(16px, 2vw, 20px);
}

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

.hero-tags span,
.movie-card-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
    font-size: 13px;
}

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

.button-primary,
.button-secondary,
.filter-button,
.player-play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.button-primary,
.filter-button,
.player-play-button {
    background: linear-gradient(135deg, #f59e0b, #b45309);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(180, 83, 9, 0.32);
}

.button-primary,
.button-secondary {
    min-height: 48px;
    padding: 0 22px;
}

.button-secondary {
    border: 1px solid var(--border-soft);
    background: rgba(41, 37, 36, 0.72);
    color: #f5f5f4;
}

.button-primary:hover,
.button-secondary:hover,
.filter-button:hover,
.player-play-button:hover {
    transform: translateY(-2px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    font-size: 30px;
    line-height: 1;
    transform: translateY(-50%);
}

.hero-control:hover {
    background: rgba(180, 83, 9, 0.88);
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    transition: width 0.2s ease, background-color 0.2s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: #f59e0b;
}

main {
    display: block;
}

.section {
    padding: 56px 0;
}

.section.compact {
    padding: 34px 0;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0;
    color: #fffbeb;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
}

.section-heading p,
.page-lead {
    margin: 8px 0 0;
    color: #a8a29e;
    max-width: 760px;
}

.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(210px, 250px);
    gap: 18px;
    overflow-x: auto;
    padding: 4px 4px 20px;
    scroll-snap-type: x mandatory;
}

.horizontal-scroll .movie-card {
    scroll-snap-align: start;
}

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

.movie-card {
    display: block;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(41, 37, 36, 0.96), rgba(28, 25, 23, 0.96));
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.38);
    box-shadow: var(--shadow);
}

.movie-card-poster {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #1c1917;
}

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

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

.movie-badge,
.movie-year {
    position: absolute;
    z-index: 2;
    top: 10px;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
}

.movie-badge {
    right: 10px;
    background: rgba(245, 158, 11, 0.92);
    color: #ffffff;
}

.movie-year {
    left: 10px;
    background: rgba(0, 0, 0, 0.56);
    color: #fffbeb;
}

.movie-card-hover {
    position: absolute;
    inset: auto 0 0;
    padding: 34px 12px 12px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), transparent);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .movie-card-hover {
    opacity: 1;
    transform: translateY(0);
}

.movie-card-hover p {
    margin: 0;
    color: #e7e5e4;
    font-size: 13px;
}

.movie-card-body {
    padding: 14px;
}

.movie-card-body h3 {
    margin: 0 0 8px;
    overflow: hidden;
    color: #f5f5f4;
    font-size: 16px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-card:hover h3 {
    color: #fcd34d;
}

.movie-card-meta {
    margin: 0 0 10px;
    overflow: hidden;
    color: #a8a29e;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.category-card {
    position: relative;
    min-height: 170px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    padding: 22px;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.28), transparent 55%),
        linear-gradient(135deg, rgba(41, 37, 36, 0.98), rgba(28, 25, 23, 0.96));
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.42);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    color: #fffbeb;
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: #a8a29e;
    font-size: 14px;
}

.category-card span {
    position: absolute;
    right: 18px;
    bottom: 16px;
    color: #f59e0b;
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(120px, 180px)) auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 28px;
    padding: 16px;
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    background: rgba(28, 25, 23, 0.86);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    outline: 0;
    background: rgba(12, 10, 9, 0.78);
    color: #f5f5f4;
    padding: 0 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(245, 158, 11, 0.58);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.13);
}

.filter-button {
    min-height: 46px;
    padding: 0 18px;
}

.no-result {
    display: none;
    padding: 44px 18px;
    border: 1px dashed rgba(245, 158, 11, 0.28);
    border-radius: 22px;
    color: #a8a29e;
    text-align: center;
}

.no-result.is-visible {
    display: block;
}

.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 24px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 52px 72px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 102px;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 12px;
    background: rgba(28, 25, 23, 0.86);
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.ranking-row:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.38);
    background: rgba(41, 37, 36, 0.96);
}

.ranking-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #d6d3d1;
    font-weight: 900;
}

.ranking-number.top-rank {
    background: linear-gradient(135deg, #f59e0b, #92400e);
    color: #ffffff;
}

.ranking-row img {
    width: 72px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
}

.ranking-info {
    min-width: 0;
}

.ranking-info strong,
.ranking-info em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-info strong {
    color: #f5f5f4;
    font-size: 17px;
}

.ranking-info em {
    margin-top: 4px;
    color: #a8a29e;
    font-style: normal;
    font-size: 13px;
}

.ranking-play {
    color: #f59e0b;
    font-weight: 800;
}

.page-hero {
    padding: 70px 0 34px;
    border-bottom: 1px solid var(--border-soft);
    background:
        radial-gradient(circle at 12% 15%, rgba(245, 158, 11, 0.22), transparent 24rem),
        linear-gradient(180deg, rgba(28, 25, 23, 0.76), rgba(12, 10, 9, 0));
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #a8a29e;
    font-size: 14px;
}

.breadcrumbs a {
    color: #fcd34d;
}

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

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

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    object-fit: cover;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 36%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-play-button {
    width: 86px;
    height: 86px;
    border-radius: 999px;
    font-size: 34px;
    padding-left: 6px;
}

.player-status {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    color: #e7e5e4;
    text-align: center;
    font-size: 14px;
}

.detail-panel,
.side-panel {
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    background: rgba(28, 25, 23, 0.9);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
}

.detail-panel {
    margin-top: 24px;
    padding: 26px;
}

.detail-panel h1 {
    margin: 0 0 16px;
    color: #fffbeb;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.16;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 12px;
    background: rgba(41, 37, 36, 0.92);
    color: #d6d3d1;
}

.detail-section {
    padding-top: 22px;
    margin-top: 22px;
    border-top: 1px solid var(--border-soft);
}

.detail-section h2 {
    margin: 0 0 12px;
    color: #fcd34d;
    font-size: 22px;
}

.detail-section p {
    margin: 0;
    color: #d6d3d1;
    font-size: 16px;
}

.side-panel {
    position: sticky;
    top: 96px;
    padding: 18px;
}

.side-panel h2 {
    margin: 0 0 16px;
    color: #fcd34d;
    font-size: 22px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.related-item img {
    width: 78px;
    height: 104px;
    border-radius: 12px;
    object-fit: cover;
}

.related-item strong {
    display: -webkit-box;
    overflow: hidden;
    color: #f5f5f4;
    font-size: 15px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-item span {
    display: block;
    margin-top: 6px;
    color: #a8a29e;
    font-size: 13px;
}

.related-item:hover strong {
    color: #fcd34d;
}

.site-footer {
    margin-top: 64px;
    border-top: 1px solid var(--border-soft);
    background: rgba(12, 10, 9, 0.86);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 0;
}

.footer-inner strong {
    color: #fffbeb;
    font-size: 18px;
}

.footer-inner p {
    max-width: 720px;
    margin: 6px 0 0;
    color: #a8a29e;
    font-size: 14px;
}

.footer-inner nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.footer-inner nav a {
    color: #d6d3d1;
    font-size: 14px;
}

.footer-inner nav a:hover {
    color: #fcd34d;
}

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

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

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

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-carousel {
        min-height: 68vh;
    }

    .hero-control {
        display: none;
    }

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

    .filter-panel,
    .ranking-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .side-panel {
        position: static;
    }
}

@media (max-width: 700px) {
    .header-inner,
    .footer-inner,
    .container {
        width: min(100% - 24px, 1280px);
    }

    .site-logo span {
        font-size: 18px;
    }

    .hero-content {
        left: 18px;
        bottom: 11%;
        width: calc(100% - 36px);
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: clamp(34px, 12vw, 52px);
    }

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

    .button-primary,
    .button-secondary {
        width: 100%;
    }

    .section {
        padding: 38px 0;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

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

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

    .ranking-row {
        grid-template-columns: 40px 62px minmax(0, 1fr);
    }

    .ranking-play {
        display: none;
    }

    .ranking-row img {
        width: 62px;
        height: 84px;
    }

    .detail-panel {
        padding: 20px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

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