.hero-container {
    position: relative;
    width: 100%;
    background: #000;
    overflow: hidden;
    z-index: 1;
    font-family: 'Inter', sans-serif;
    contain: paint;
    isolation: isolate;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-backdrop-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    opacity: 0;
    transition: opacity 0.6s ease;
    will-change: opacity;
}

.scale-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;
}

.wrapper {
    position: relative;
    width: 2560px;
    height: 1440px;
}

.hero-container.mode-mobile .wrapper {
    width: 1200px;
    height: 1800px;
}

.background,
.hero {
    position: absolute;
    top: 0;
    left: 0;
}

.background {
    width: 2560px;
    height: 1440px;
    z-index: 1;
    transition: opacity 1s ease-in-out;
    will-change: opacity;
}

.hero-container.mode-mobile .background {
    width: 1200px;
    height: 1800px;
}

.hero {
    width: 1282px;
    height: 769px;
    left: 639px;
    top: 335px;
    z-index: 2;
    transform: translate(0px, 0px);
}

.hero-container.mode-mobile .hero {
    width: 846px;
    height: 508px;
}

.hero-screen-container {
    position: absolute;
    width: 1282px;
    height: 769px;
    left: 684px;
    top: 203px;
    transform: translate(0px, 0px);
    overflow: hidden;
    cursor: grab;
    z-index: 3;
}

.hero-container.mode-mobile .hero-screen-container {
    width: 846px;
    height: 505px;
    left: 186px;
    top: 583px;
}

.hero-screen-container:active {
    cursor: grabbing;
}

.hero-screen-container .hero {
    position: absolute;
    left: 0;
    top: 0;
    transition: transform 0.3s ease;
    user-select: none;
    pointer-events: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    width: 2560px;
    height: 1440px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 100px;
    pointer-events: none;
    z-index: 5;
}

.hero-container.mode-mobile .hero-overlay {
    width: 1200px;
    height: 1800px;
    padding: 160px 40px 140px;
}

.theme-menu {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    pointer-events: auto;
}

.theme-btn {
    background: rgb(0 0 0 / 29%);
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 46px;
    padding: 12px 28px;
    color: #fff;
    font-weight: 6400;
    font-size: 1.6rem;
    letter-spacing: 0.02em;
    backdrop-filter: blur(18px);
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.theme-btn.active {
    background: var(--gradient-primary);
    border-color: rgb(255 255 255);
}

.hero-content {
    text-align: center;
    color: #fff;
    pointer-events: auto;
    max-width: 80%;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, #f8f9fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 3.0rem;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn {
    font-size: 1.6rem;
    background: rgb(22 8 21 / 30%);
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 38px;
    padding: 15px 34px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}


.hero-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.hero-screen-arrow {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0.9;
    animation: hero-arrow-sway 1.3s ease-in-out infinite;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 5;
}

.hero-screen-arrow.hidden {
    opacity: 0;
    visibility: hidden;
}

.hero-screen-arrow img {
    width: 100%;
    height: auto;
}

@keyframes hero-arrow-sway {
    0% {
        transform: translate(-50%, 0);
    }

    50% {
        transform: translate(calc(-50% + 22px), 0);
    }

    100% {
        transform: translate(-50%, 0);
    }
}

@media (max-width: 1200px) {
    .hero-content {
        max-width: 90%;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 2.4rem;
        line-height: 3.0rem;
    }
}

@media (max-width: 768px) {
    .hero-overlay {
        padding: 160px 24px 120px;
    }

    .theme-menu {
        gap: 16px;
    }

    .theme-btn {
        font-size: 2.3rem;
        padding: 16px 34px;
        border-radius: 34px;
    }

    .hero-content {
        max-width: 95%;
    }

    .hero-title {
        font-size: 4.1rem;
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 2.3rem;
        line-height: 1.2;
        margin-bottom: 2.4rem;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        /* ← центрирует все кнопки */
        gap: 15px;
        /* по желанию */
    }

    .hero-btn {
        width: auto;
        /* ← кнопки НЕ растягиваются */
        text-align: center;
        font-size: 2.3rem;
        padding: 18px 46px;
        display: inline-block;
    }

    .navbar-brand img {
        height: 28px;
    }
}

@media (max-width: 480px) {
    .theme-btn {
        flex: 1 1 45%;
        text-align: center;
    }

    .hero-title {
        font-size: 3.2rem;
    }

    .navbar-brand img {
        height: 28px;
    }
}