/* custom.css */

.instruction-overlay {
    position: fixed;
    z-index: 100;
    width: 100%;
    height: 100%;
    display: none;
}
.instruction-overlay--visible {
    display: block;
}
.instruction-overlay__background {
    background-color: #0008;
    width: 100%;
    height: 100%;
}
.instruction-overlay-content {
    position: absolute;
    z-index: 101;
    overflow-y: auto;
    background: linear-gradient(#5e1c0f, #952f1a);
    color: #efe3d7;
    font-size: 1.5rem;
    padding-left: 1.7rem;
    padding-right: 1.7rem;
    padding-top: 1rem;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 25rem;
    min-height: 20rem;
    max-height: 80vh;
    border-radius: 5%;
}
.instruction-overlay-content__note {
    font-family: cursive;
    background-color: #732618;
    padding: 5px;
    font-size: 0.8em;
    box-shadow: 2px 2px 15px #ca5b47;
    border-radius: 0.3em;
}
.instruction-overlay-content__close-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    overflow: hidden;
    background-color: #d09444;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.instruction-overlay-content__close-btn::before,
.instruction-overlay-content__close-btn::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    background-color: #333;
    border-radius: 1px;
}
.instruction-overlay-content__close-btn::before {
    transform: rotate(45deg) translateY(50%);
}
.instruction-overlay-content__close-btn::after {
    transform: rotate(-45deg) translateY(50%);
}

.feature__content_back {
    justify-content: center;
}

.generous__container {
    display: block;
    margin-top: 1rem;
}

.generous__tabs {
    text-align: center;
}

.generous__media {
    aspect-ratio: 16 / 9;
    height: auto;
    width: auto;
    max-height: 56vh;
    margin: auto;
}

.generous__items {
    align-items: flex-start;
}

.feature__content_front {
    justify-content: center;
    padding-top: 10.375rem;
}

.prize__heading {
    font-size: calc(0.9rem * var(--prize-scale));
}

.prize__heading:after {
    background-size: 100% 150%;
}

/* ========================================
   FIX: Горизонтальная прокрутка кнопок-селекторов на мобильных
   Проблема: 6 кнопок не влезают на узких экранах
   Решение: Горизонтальный скролл
   ======================================== */

@media (max-width: 1199.9px) {
    .generous__items {
        display: flex !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        gap: 6px !important;
        padding-bottom: 10px !important;
        -webkit-overflow-scrolling: touch; /* Плавная прокрутка на iOS */
        scroll-behavior: smooth;
    }

    .generous__items::-webkit-scrollbar {
        height: 6px;
    }

    .generous__items::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 3px;
    }

    .generous__items::-webkit-scrollbar-thumb {
        background: rgba(255, 215, 0, 0.5);
        border-radius: 3px;
    }

    .generous__items::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 215, 0, 0.8);
    }

    .generous__thumb {
        flex-shrink: 0 !important; /* Не сжимаем кнопки */
        min-width: auto !important;
    }

    .instruction-overlay-content {
        font-size: 1.2rem;
    }

    .generous__media {
        transform: scale(1);
    }
}

/* Для очень маленьких экранов - уменьшаем кнопки */
@media (max-width: 539.9px) {
    .generous__thumb {
        transform: scale(0.9) !important;
    }

    .instruction-overlay-content {
        font-size: 1rem;
        width: 17rem;
    }
}
