.wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-width: 100%;
    z-index: 1;
    overflow: hidden;
}

.header {
    max-width: 100%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    padding-top: 3vh;
    gap: 10px;
    color: #4A4A4A;
    z-index: 1000;

    margin-bottom: 10px;
}

.header-item {
    width: 100px;
    height: 36px;
    background-color: #fff;
    border-radius: 8px;
    font-family: 'Russo One', sans-serif;
    font-weight: 400;
    font-size: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
}


.header-level {
    width: 136px;
    height: 36px;
    background-color: #fff;
    border-radius: 8px;
    font-family: 'Russo One', sans-serif;
    font-weight: 400;
    font-size: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.main {
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: column;
    margin-bottom: calc(69px + 4vh);
    width: 100%;
}

.start-game-btn {
    width: 95%;
    height: 48px;
    background-color: #FF4D00;
    border-radius: 6px;
    font-family: 'Russo One', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #fff;
    box-shadow: 2px 2px 0px 0px #D84B00;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.1s ease;
    /* Гарантируем четкость текста */
    -webkit-font-smoothing: antialiased;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

/* Контейнер для текста с высоким z-index */
.start-game-btn span {
    position: relative;
    z-index: 2;
    display: block;
}

/* Эффект блеска с исправлением */
.start-game-btn::after {
    content: '';
    position: absolute;

    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%);
    transform: rotate(30deg);
    animation: shine 5s infinite linear;
    z-index: 1;
    /* Ниже текста */
}

@keyframes shine {
    0% {
        left: -100%;
        opacity: 0;
    }

    10% {
        opacity: 0.8;
        /* Яркая вспышка */
    }

    15% {
        opacity: 0.6;
        /* Плавное затухание */
    }

    30% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

.start-game-btn:active {
    transform: scale(0.95);
    box-shadow: 1px 1px 0px 0px #D84B00;
}

.start-game-btn.disabled {
    background-color: #BEBEBE;
    box-shadow: none;
    color: #fff;
}

.start-game-btn.disabled::after {
    display: none;
    /* Прибирає ефект блиску */
}

.button-wrapper {
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2vh;
}

.buttons {
    z-index: 2;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    box-sizing: border-box;
    font-weight: 260;
}

.buttons-2 {
    z-index: 2;
    position: absolute;
    margin-bottom: 280px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    box-sizing: border-box;
    font-style: 'Russo One', sans-serif;
    font-weight: 300;
    font-size: 12px;
}

.btn {
    width: 82px;
    height: 9vh;
    min-height: 60px;
    max-height: 70px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    z-index: 0;
    border: 1.5px solid white; /* ✨ обводка */
    box-sizing: border-box;
}

.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    filter: blur(2px);
    pointer-events: none;
    border-radius: 8px;
    opacity: 1.6;
}

.btn div {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 3px;
    position: relative;
    z-index: 1;
}

.btn-text{
    font-family: 'Russo One', sans-serif;
    font-weight: 400;
    font-style: Regular;
    font-size: 12px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #FFFFFF;
}


#dna-btn::before {
    background-image: url('/static/imgs/dna-back.webp');
    filter: brightness(0.4);
}

.calendar::before {
    background-image: url('/static/imgs/calendar-back.webp');
    filter: brightness(0.4);
}

.dna::before {
    background-image: url('/static/imgs/lab-back.webp');
    filter: brightness(0.4);
}

.store::before {
    background-image: url('/static/imgs/shop-back.webp');
    filter: brightness(0.4);
}


.tooltip-modal {
    position: absolute;
    top: 70px;
    background-color: white;
    border-radius: 8px;
    padding: 10px 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Russo One', sans-serif;
    font-size: 14px;
    color: #4A4A4A;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 100;
    width: max-content;
    max-width: 250px;
}

.tooltip-content {
    position: relative;
}

/* Общий стиль для стрелок */
.tooltip-modal::before {
    content: '';
    position: absolute;
    bottom: 100%;
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent white transparent;
}

.tooltip-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Стрелка для ЛЕВОЙ подсказки (монеты) */
.coins-tooltip::before {
    left: 20px;
    /* Примерное положение под иконкой монет */
    transform: translateX(0);
}

/* Стрелка для ЦЕНТРАЛЬНОЙ подсказки (уровень) */
.level-tooltip::before {
    left: 50%;
    transform: translateX(-50%);
}

/* Стрелка для ПРАВОЙ подсказки (энергия) */
.energy-tooltip::before {
    right: 20px;
    /* Примерное положение под иконкой энергии */
    transform: translateX(0);
}

.dna-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 20%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

.coins-tooltip {
    left: 20px;
    transform: translateX(0);
}

.level-tooltip {
    left: 50%;
    transform: translateX(-50%);
}

.energy-tooltip {
    right: 20px;
    transform: translateX(0);
}

.dna-tooltip {
    position: absolute;
    transform: translateX(-30px) translateY(-50px);
}

.header-item:nth-child(1):active~.coins-tooltip,
.header-level:active~.level-tooltip,
.header-item:nth-child(3):active~.energy-tooltip,
.dna-e:active~.dna-tooltip {
    display: block;
    opacity: 1;
    visibility: visible;
}

.shop-modal {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 80%;
    background-color: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: bottom 0.3s ease-out;
    padding: 15px;
    display: flex;
    flex-direction: column;
}


.shop-modal.active {
    bottom: 0;
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
}

.balance-info {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    font-family: 'Russo One', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #4A4A4A;
    padding-bottom: 25px;
}

#user-coins2 {
    color: #FF4C00;
}

.shop-header h2 {
    font-family: 'Russo One', sans-serif;
    font-weight: 400;
    font-size: 20px;
    color: #111111;
}

.close-shop {
    background: none;
    border: none;
    font-size: 24px;
    color: #4A4A4A;
    cursor: pointer;

}

.shop-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.shop-item {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #D9D9D9;
    border-radius: 10px;
    padding-bottom: 60px;
}

.item-content-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.item-img {
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    background-color: #FF4C00;
    border-radius: 6px;
}

.item-info {
    flex: 1;
}

.item-info h3 {
    margin: 0 0 5px 0;
    font-family: 'Russo One', sans-serif;
    font-size: 16px;
    color: #111111;
}

.item-info p {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #4A4A4A;
    margin: 0 0 5px 0;
}

.item-stock {
    font-family: 'Montserrat', sans-serif;
    color: #4A4A4A;
    font-weight: 600 !important;
    font-size: 14px;
    margin: 0;
}

.buy-btn {
    position: absolute;
    width: 93%;
    height: 40px;
    background-color: #FF4D00;
    border-radius: 6px;
    font-family: 'Russo One', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #fff;
    box-shadow: 1px 3px 0px rgb(200, 70, 0);
    transition: transform 0.1s ease;
    gap: 10px;
    bottom: 0;
    margin-bottom: 15px;
}

.buy-btn .price {
    margin-right: 5px;
}

.buy-btn:active {
    transform: scale(0.95);
}

.inactive {
    background-color: #626262 !important;
    box-shadow: 1px 3px 0px #393939;
}

.orange-text {
    font-family: 'Russo One', sans-serif;
    color: #FF4C00;
    font-weight: 400;
    font-size: 14px;
}

.shop-scroll-container {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    border-radius: 16px;
}

/* ---------------------- */

.dna-modal {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 80%;
    background-color: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: bottom 0.3s ease-out;
    padding: 15px;
    display: flex;
    flex-direction: column;
}


.dna-modal.active {
    bottom: 0;
}

.dna-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
}

.dna-balance-info {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    font-family: 'Russo One', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #4A4A4A;
    padding-bottom: 25px;
}

#user-dna2{
    color: #9747FF;
}

.dna-header h2 {
    font-family: 'Russo One', sans-serif;
    font-weight: 400;
    font-size: 20px;
    color: #111111;
}

.close-dna {
    background: none;
    border: none;
    font-size: 24px;
    color: #4A4A4A;
    cursor: pointer;

}

.dna-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dna-item {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #D9D9D9;
    border-radius: 10px;
    padding-bottom: 60px;
}
.dna-item.max {
    padding-bottom: 15px;
}

.dna-scroll-container {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.dna-modal .item-img {
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    background-color: #9747FF;
    border-radius: 6px;
}

.dna-modal .buy-btn {
    background-color: #9747FF;
    box-shadow: 2px 2px 0px 0px #6C52E8;
}

.dna-modal .inactive {
    background-color: #626262 !important;
    box-shadow: 1px 3px 0px #393939;
}

.dna-modal .orange-text {
    color: #9747FF;
}

.calendar-modal {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 80%;
    background-color: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: bottom 0.3s ease-out;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.calendar-modal.active {
    bottom: 0;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
}

.calendar-header h2 {
    font-family: 'Russo One', sans-serif;
    font-weight: 400;
    font-size: 20px;
    color: #111111;
}

.close-calendar {
    background: none;
    border: none;
    font-size: 24px;
    color: #4A4A4A;
    cursor: pointer;
}

.calendar-scroll-container {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

/* Додаткові стилі для контенту календаря */
.calendar-content {
    margin-top: 10px;
    flex: 1;
    position: relative;
    display: flex;
    padding-bottom: 50px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* 💡 Місце під кнопку */
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* максимум 4 элемента в строку */
    gap: 10px;
    /* расстояние между элементами */
    justify-items: center;
    /* центрирование внутри ячейки */
}

.calendar-item {
    position: relative;
    display: flex;
    align-items: center;
    width: 69px;
    height: 69px;
    flex-direction: column;
    margin-bottom: 50px;
}

.cal-item-img {
    width: 69px;
    height: 69px;
    border: 2px solid #9747FF;
    border-radius: 10px;
    z-index: 1;
    background-image: url('/static/imgs/back-img.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.cal-item-img-or {
    display: flex;
    width: 69px;
    height: 69px;
    border: 2px solid #FF4C00;
    border-radius: 10px;
    z-index: 1;
    background-image: url('/static/imgs/back-img-or.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.cal-item-img .it {
    width: 60px;
    height: 74px;
    z-index: 0;
    margin-left: 2px;
}

.cal-item-img-or .it {
    width: 67px;
    height: 66px;
    z-index: 0;
    margin-left: 2px;
}

.status {
    font-family: Russo One;
    font-weight: 400;
    font-size: 12px;
    line-height: 100%;
    margin-bottom: 10px;
}

.reward {
    position: relative;
    font-family: Russo One;
    font-weight: 400;
    font-size: 16px;
    margin-top: 6px;
}

.reward-text {
    margin-left: -2px;
}

.orange-text {
    color: #FF4C00;
}

.purple-text {
    color: #9747FF;
}

.closed-reward {
    color: #4A4A4A;
}

.closed-reward-background {
    position: absolute;
    width: 66px;
    height: 66px;
    background-color: black;
    opacity: 0.5;
    border-radius: 10px;
    z-index: 1;
}

.collect-reward-background {
    position: absolute;
    width: 66px;
    height: 66px;
    background-color: black;
    opacity: 0.65;
    border-radius: 10px;
    z-index: 1;
}

.lock {
    position: absolute;
    width: 42px;
    height: 42px;
    z-index: 1;
    margin-left: 12px;
    margin-top: 10px;
}

.check {
    position: absolute;
    width: 42px;
    height: 42px;
    z-index: 1;
    margin-left: 12px;
    margin-top: 10px;
}

.calendar-description {
    width: 90%;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    line-height: 145%;
    color: #4A4A4A;
    margin-bottom: 10px;
}

.calendar-button {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 93%;
    height: 40px;
    background-color: #FF4D00;
    border-radius: 6px;
    font-family: 'Russo One', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #fff;
    box-shadow: 1px 3px 0px rgb(200, 70, 0);
    transition: transform 0.1s ease;
}

.calendar-button:active {
    transform: translateX(-50%) scale(0.95);
}

.border-img {
    display: flex;
    position: relative;
    bottom: 0;
    align-items: center;
    width: 100%;
    justify-content: center;
    flex: 1;
}

.border-img img {
    width: auto;
    max-width: 80%;
    max-height: calc(100% + 72px);
    aspect-ratio: 327 / 469;
    position: absolute;
    z-index: 1;
    bottom: -72px;
}

#click-area {
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 100;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-transform: translate3d(0, 0, 0); /* форсує GPU-рендерінг */
    will-change: transform;
    backface-visibility: hidden;
}

.monkey {
    z-index: 2;
    bottom: 2.2%;
    position: absolute;
    width: auto;
    height: 100%;
    max-width: 100%;
    display: flex;
    align-items: flex-end;
}
.monkey-anim__wrapper {
    position: absolute;
    display: grid;
    grid-template-columns: 1fr;
    bottom: -72px;
    z-index: 2;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.monkey-video {
    width: 100%;
    max-height: calc(94% + 72px);
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.temp-animation {
    z-index: 2;
    opacity: 1;
}

#background-monke {
    z-index: 1;
    opacity: 1;
}

#monke {
    width: 433px;
    height: 433px;
    object-fit: contain;
    display: none;
}


.red-txt {
    color: red !important;
}


/* Вимикаємо анімації для цих класів, коли вони не потрібні */
.animate-up-button:not(.visible),
.animate-up-nav:not(.visible),
.animate-up-header-top:not(.visible) {
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
}
