* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #f3f4f6;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 34rem),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.14), transparent 30rem),
        linear-gradient(180deg, #0a0e1a 0%, #111827 52%, #0a0e1a 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

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

.glass {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.055);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(14px);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    border-left: 0;
    border-right: 0;
    border-top: 0;
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #f59e0b, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.35);
    font-size: 0.8rem;
}

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

.nav-link,
.mobile-nav-link {
    color: #d1d5db;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: #f59e0b;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: #f3f4f6;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-menu-button.is-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu-button.is-open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-button.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
}

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

.mobile-nav-link {
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease, visibility 1s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, #0a0e1a 0%, rgba(10, 14, 26, 0.72) 38%, rgba(10, 14, 26, 0.2) 100%),
        linear-gradient(90deg, rgba(10, 14, 26, 0.88), rgba(10, 14, 26, 0.28), rgba(10, 14, 26, 0.68));
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 80px;
}

.hero-copy {
    width: min(680px, 100%);
}

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

.hero-tag,
.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    border-radius: 999px;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.18);
    font-size: 0.85rem;
}

.hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(2.4rem, 6vw, 5rem);
    line-height: 1.04;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.hero p {
    margin: 0;
    max-width: 720px;
    color: #d1d5db;
    font-size: 1.12rem;
}

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

.primary-button,
.ghost-button,
.global-search-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 26px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(90deg, #f59e0b, #f97316);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button:hover,
.global-search-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(245, 158, 11, 0.3);
}

.ghost-button {
    color: #f3f4f6;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.18);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    font-size: 2rem;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.18);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

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

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

.page-section {
    padding: 64px 0;
}

.search-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    margin-top: 40px;
    padding: 26px;
    border-radius: 22px;
}

.search-band h2 {
    margin: 0 0 6px;
    font-size: 1.5rem;
}

.search-band p {
    margin: 0;
    color: #9ca3af;
}

.global-search-form {
    display: flex;
    gap: 12px;
}

.global-search-form input,
.page-search-input {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    outline: none;
    color: #f3f4f6;
    background: rgba(0, 0, 0, 0.22);
    padding: 0 16px;
}

.global-search-form input:focus,
.page-search-input:focus {
    border-color: rgba(245, 158, 11, 0.65);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.08);
}

.section-heading,
.subsection-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
}

.section-heading h2,
.subsection-title h3 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.35rem);
}

.section-more,
.subsection-title a {
    color: #f59e0b;
    font-weight: 700;
}

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

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

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

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

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

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

.movie-card {
    border-radius: 18px;
    overflow: hidden;
}

.card-hover {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.36);
    box-shadow: 0 26px 58px rgba(0, 0, 0, 0.34);
}

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

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #000;
    overflow: hidden;
}

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

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

.year-badge,
.rank-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.68);
    font-size: 0.78rem;
}

.rank-badge {
    left: 10px;
    right: auto;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    font-weight: 800;
}

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

.movie-card h3 {
    margin: 0;
    display: -webkit-box;
    overflow: hidden;
    color: #fff;
    font-size: 1.04rem;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

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

.movie-card p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 42px;
    margin: 9px 0 0;
    color: #9ca3af;
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    color: #6b7280;
    font-size: 0.82rem;
}

.horizontal-link {
    display: flex;
    gap: 16px;
    padding: 14px;
}

.horizontal-poster {
    flex: 0 0 160px;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
}

.horizontal-body {
    padding: 0;
}

.horizontal-body p {
    min-height: 0;
}

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

.category-tile,
.category-overview-card {
    display: grid;
    gap: 7px;
    min-height: 118px;
    padding: 22px;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(249, 115, 22, 0.08)),
        rgba(255, 255, 255, 0.055);
}

.category-tile span,
.category-overview-card h2 {
    color: #fff;
    font-weight: 800;
    font-size: 1.25rem;
}

.category-tile small,
.category-overview-card p {
    color: #9ca3af;
}

.category-index {
    color: #f59e0b;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.category-overview-card strong {
    color: #f59e0b;
}

.region-sections,
.year-sections {
    display: grid;
    gap: 44px;
}

.page-hero {
    padding: 76px 0 62px;
}

.gradient-panel {
    background:
        linear-gradient(90deg, rgba(245, 158, 11, 0.17), rgba(249, 115, 22, 0.1), rgba(255, 255, 255, 0.02)),
        rgba(255, 255, 255, 0.035);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #d1d5db;
    font-size: 1.08rem;
}

.eyebrow {
    color: #f59e0b;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.filter-panel {
    display: grid;
    gap: 16px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 20px;
}

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

.filter-chip {
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: #d1d5db;
    background: rgba(255, 255, 255, 0.06);
    padding: 4px 13px;
    cursor: pointer;
}

.filter-chip:hover,
.filter-chip.is-active {
    color: #fff;
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.2);
}

.filter-status {
    min-height: 20px;
    color: #9ca3af;
    font-size: 0.9rem;
}

.movie-card.is-hidden,
.ranking-item.is-hidden {
    display: none;
}

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

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

.ranking-item {
    border-radius: 18px;
    overflow: hidden;
}

.ranking-link {
    display: grid;
    grid-template-columns: 56px 124px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
}

.ranking-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    font-weight: 900;
}

.ranking-link img {
    width: 124px;
    height: 78px;
    object-fit: cover;
    border-radius: 12px;
}

.ranking-text h3 {
    margin: 0;
}

.ranking-text p {
    min-height: 0;
    margin-top: 4px;
}

.detail-page {
    padding: 30px 0 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    color: #9ca3af;
    font-size: 0.92rem;
}

.breadcrumb a {
    color: #f59e0b;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.85fr);
    gap: 26px;
    align-items: start;
}

.detail-main,
.detail-side {
    display: grid;
    gap: 22px;
}

.player-card,
.detail-info,
.poster-panel,
.related-panel {
    border-radius: 20px;
    overflow: hidden;
}

.player-shell {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.55));
    cursor: pointer;
}

.player-overlay.is-hidden {
    display: none;
}

.play-circle {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    padding-left: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.38);
    font-size: 2rem;
}

.detail-info {
    padding: 26px;
}

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.14;
}

.detail-info h2,
.related-panel h2 {
    margin: 0 0 14px;
    font-size: 1.45rem;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    color: #9ca3af;
}

.story-block {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.story-block p,
.detail-info p {
    color: #d1d5db;
}

.story-block .lead {
    color: #fbbf24;
    font-weight: 700;
}

.poster-panel {
    padding: 18px;
}

.poster-panel img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 16px;
}

.full-button {
    width: 100%;
    margin-top: 16px;
}

.related-panel {
    padding: 20px;
}

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

.related-card {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.related-card img {
    width: 110px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
}

.related-card h4 {
    display: -webkit-box;
    overflow: hidden;
    margin: 2px 0 6px;
    color: #fff;
    font-size: 0.94rem;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-card p {
    margin: 0;
    color: #9ca3af;
    font-size: 0.82rem;
}

.site-footer {
    padding: 48px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.18);
}

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

.site-footer p,
.footer-links a {
    color: #9ca3af;
}

.site-footer h3 {
    margin: 0 0 12px;
    color: #f59e0b;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a:hover {
    color: #f59e0b;
}

@media (max-width: 1100px) {
    .movie-grid,
    .featured-grid,
    .catalog-grid,
    .small-grid,
    .tiny-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .mobile-menu-button {
        display: block;
    }

    .hero {
        height: 560px;
    }

    .hero-content {
        padding-bottom: 86px;
    }

    .hero-arrow {
        display: none;
    }

    .search-band,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .global-search-form {
        flex-direction: column;
    }

    .movie-grid,
    .featured-grid,
    .catalog-grid,
    .small-grid,
    .tiny-grid,
    .category-grid,
    .category-overview-grid,
    .horizontal-grid,
    .list-grid,
    .compact-ranking {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .horizontal-link,
    .ranking-link {
        grid-template-columns: 1fr;
        display: grid;
    }

    .horizontal-poster {
        width: 100%;
        flex-basis: auto;
    }

    .ranking-link img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
    }
}

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

    .hero {
        height: 520px;
    }

    .hero h1 {
        font-size: 2.35rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .movie-grid,
    .featured-grid,
    .catalog-grid,
    .small-grid,
    .tiny-grid,
    .category-grid,
    .category-overview-grid,
    .horizontal-grid,
    .list-grid,
    .compact-ranking {
        grid-template-columns: 1fr;
    }

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

    .detail-info,
    .poster-panel,
    .related-panel {
        padding: 18px;
    }
}
