* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: #111827;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.95);
    backdrop-filter: blur(14px);
}

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

.brand,
.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    background: linear-gradient(135deg, #dc2626, #db2777);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(220, 38, 38, 0.26);
    transition: transform 0.28s ease;
}

.brand:hover .brand-icon {
    transform: scale(1.08);
}

.brand-copy {
    display: grid;
    line-height: 1.1;
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-subtitle {
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
}

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

.nav-link {
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease;
}

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

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #374151;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    padding: 12px 16px 18px;
    border-top: 1px solid #e5e7eb;
}

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

.mobile-link {
    padding: 12px 14px;
    color: #374151;
    background: #ffffff;
    border-radius: 12px;
    font-weight: 650;
}

.mobile-link.is-active,
.mobile-link:hover {
    color: #dc2626;
    background: #fef2f2;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 540px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

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

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

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

.hero-slide::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.54) 45%, rgba(0, 0, 0, 0.18) 100%);
}

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

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

.hero-tags,
.detail-tags,
.mini-tags,
.rank-meta,
.card-meta,
.breadcrumbs,
.stat-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-tags span,
.detail-tags span,
.mini-tags span,
.card-meta span,
.rank-meta span,
.stat-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
}

.hero-tags span {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 700;
}

.hero-tags span:first-child {
    background: #dc2626;
}

.hero h1,
.hero h2 {
    margin: 18px 0 14px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.06em;
    text-shadow: 0 18px 48px rgba(0, 0, 0, 0.6);
}

.hero-kicker {
    margin: 0 0 8px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    font-weight: 700;
}

.hero p {
    max-width: 680px;
    margin: 0 0 28px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.75;
}

.hero-actions,
.section-head,
.tool-row,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 0;
    border-radius: 999px;
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.05);
}

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

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

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

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

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 20px;
    border: 0;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px) scale(1.01);
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(90deg, #dc2626, #db2777);
    box-shadow: 0 16px 35px rgba(220, 38, 38, 0.28);
}

.btn-dark {
    color: #ffffff;
    background: rgba(17, 24, 39, 0.88);
}

.btn-light {
    color: #111827;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.main-space {
    padding: 56px 0;
}

.section-block {
    margin-bottom: 64px;
}

.section-head {
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-title span {
    color: #dc2626;
}

.section-desc {
    max-width: 760px;
    margin: 8px 0 0;
    color: #6b7280;
    line-height: 1.8;
}

.panel {
    padding: clamp(22px, 3vw, 34px);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.search-strip {
    margin-top: -36px;
    position: relative;
    z-index: 4;
}

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

.search-form input,
.catalog-tools input,
.catalog-tools select,
.search-input,
.filter-select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    color: #111827;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    outline: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus,
.catalog-tools input:focus,
.catalog-tools select:focus,
.search-input:focus,
.filter-select:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

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

.movie-card {
    min-width: 0;
    color: inherit;
    transition: transform 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-4px) scale(1.01);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

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

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.12) 48%, transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-gradient {
    opacity: 1;
}

.poster-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    color: #111827;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.78);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.poster-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    padding: 5px 8px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    border-radius: 8px;
}

.badge-red {
    background: #dc2626;
}

.badge-dark {
    background: rgba(17, 24, 39, 0.72);
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 12px 4px 0;
}

.card-body h3 {
    display: -webkit-box;
    min-height: 42px;
    margin: 0 0 8px;
    overflow: hidden;
    color: #111827;
    font-size: 15px;
    line-height: 1.42;
    font-weight: 800;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

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

.card-body p {
    display: -webkit-box;
    min-height: 40px;
    margin: 0 0 9px;
    overflow: hidden;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta span,
.rank-meta span,
.stat-row span {
    padding: 4px 8px;
    color: #6b7280;
    background: #f3f4f6;
    font-size: 12px;
    font-weight: 700;
}

.mini-tags {
    margin-top: 8px;
}

.mini-tags span,
.detail-tags span {
    padding: 5px 9px;
    color: #991b1b;
    background: #fee2e2;
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    padding: 22px;
    color: #111827;
    background: linear-gradient(135deg, #ffffff, #fef2f2);
    border: 1px solid rgba(254, 202, 202, 0.82);
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 58px rgba(220, 38, 38, 0.13);
}

.category-tile h3 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 900;
}

.category-tile p {
    margin: 0 0 16px;
    color: #6b7280;
    line-height: 1.7;
}

.category-count {
    display: inline-flex;
    padding: 7px 10px;
    color: #ffffff;
    background: linear-gradient(90deg, #dc2626, #db2777);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.page-hero {
    padding: 58px 0 34px;
    background: radial-gradient(circle at 16% 20%, rgba(220, 38, 38, 0.18), transparent 28%), linear-gradient(135deg, #111827, #1f2937);
    color: #ffffff;
}

.page-hero h1 {
    max-width: 900px;
    margin: 0 0 14px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.06;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: #d1d5db;
    font-size: 18px;
    line-height: 1.8;
}

.breadcrumbs {
    margin-bottom: 18px;
    color: #fecaca;
    font-size: 14px;
    font-weight: 700;
}

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

.catalog-tools {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, minmax(150px, 0.5fr));
    gap: 12px;
    margin-bottom: 26px;
}

.empty-state {
    padding: 38px;
    color: #6b7280;
    text-align: center;
    background: #ffffff;
    border-radius: 22px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 72px 88px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    color: #ffffff;
    background: linear-gradient(135deg, #dc2626, #db2777);
    border-radius: 18px;
    font-size: 20px;
    font-weight: 900;
}

.rank-cover {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #e5e7eb;
    border-radius: 14px;
}

.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 900;
}

.rank-info h3 a:hover {
    color: #dc2626;
}

.rank-info p {
    margin: 0 0 9px;
    color: #6b7280;
    line-height: 1.65;
}

.rank-action {
    padding: 10px 14px;
    color: #ffffff;
    background: #111827;
    border-radius: 12px;
    font-weight: 800;
}

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

.player-shell,
.detail-card,
.side-card {
    overflow: hidden;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.1);
}

.player-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-box video {
    width: 100%;
    height: 100%;
    background: #000000;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.72));
    border: 0;
}

.player-overlay span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    padding-left: 6px;
    color: #111827;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 999px;
    font-size: 38px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
    transition: transform 0.22s ease;
}

.player-overlay:hover span {
    transform: scale(1.08);
}

.player-overlay[hidden] {
    display: none;
}

.detail-card {
    padding: clamp(22px, 3vw, 34px);
}

.detail-card h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.detail-intro {
    margin: 18px 0;
    color: #374151;
    font-size: 18px;
    line-height: 1.85;
}

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

.detail-section h2 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 900;
}

.detail-section p {
    margin: 0;
    color: #374151;
    line-height: 1.9;
}

.side-card {
    padding: 22px;
}

.side-card h2 {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 900;
}

.side-poster {
    overflow: hidden;
    margin-bottom: 18px;
    border-radius: 22px;
}

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

.related-grid {
    display: grid;
    gap: 16px;
}

.related-grid .movie-card {
    display: grid;
    grid-template-columns: 94px 1fr;
    gap: 12px;
    align-items: start;
}

.related-grid .poster-wrap {
    border-radius: 14px;
}

.related-grid .card-body {
    padding-top: 0;
}

.related-grid .card-body p,
.related-grid .mini-tags {
    display: none;
}

.library-grid {
    columns: 4 230px;
    column-gap: 24px;
}

.library-grid a {
    display: block;
    break-inside: avoid;
    margin: 0 0 8px;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-weight: 700;
}

.library-grid a:hover {
    color: #dc2626;
    border-color: #fecaca;
}

.site-footer {
    margin-top: 64px;
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    padding: 32px 0;
}

.footer-brand p {
    margin: 6px 0 0;
    color: #9ca3af;
}

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

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

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

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

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

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

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

    .brand-subtitle {
        display: none;
    }

    .hero {
        min-height: 620px;
    }

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

    .hero-arrow {
        top: auto;
        bottom: 82px;
        width: 44px;
        height: 44px;
    }

    .hero-arrow.prev {
        left: 18px;
    }

    .hero-arrow.next {
        right: 18px;
    }

    .search-form,
    .catalog-tools {
        grid-template-columns: 1fr;
        display: grid;
    }

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

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

    .ranking-row {
        grid-template-columns: 46px 72px 1fr;
        gap: 12px;
    }

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

    .rank-action {
        display: none;
    }

    .rank-info h3 {
        font-size: 16px;
    }

    .rank-info p {
        display: none;
    }

    .footer-inner {
        display: grid;
    }

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

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

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

    .hero h1,
    .hero h2 {
        font-size: 40px;
    }

    .hero p {
        font-size: 16px;
    }

    .panel {
        border-radius: 22px;
    }

    .card-body p,
    .mini-tags {
        display: none;
    }
}
