#explanation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 20px;
    box-sizing: border-box;
}

.explanation-popup {
    background-color: #FFFFFF;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 350px;
    text-align: center;
    animation: fadeIn 0.3s ease-out;
}

#explanation-text {
    font-size: 1em;
    line-height: 1.6;
    margin: 0 0 20px 0;
    color: #1C1C28;
}

#explanation-ok-btn {
    background-color: #C6A664;
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    padding: 12px 40px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

#explanation-ok-btn:hover {
    background-color: #b3955a;
}

/* Сцена для 3D */
.card-scene {
    width: 300px;  /* КВАДРАТ */
    height: 300px; /* КВАДРАТ */
    perspective: 1000px;
    margin-bottom: 20px;
}

/* Сама карточка (контейнер для front и back) */
.card-object {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Пружинный эффект */
    
    /* Анимация "парения" в воздухе */
    animation: floating 3s ease-in-out infinite;
}

/* Класс для переворота */
.card-object.flipped {
    transform: rotateY(180deg);
}

/* Стороны карты */
.card-face {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    backface-visibility: hidden; /* Скрываем заднюю сторону */
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    overflow: hidden;
}

.card-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Лицевая сторона (сначала скрыта) */
.card-front {
    transform: rotateY(180deg);
}

/* Обратная сторона (рубашка) */
.card-back {
    background-color: #1C1C28; /* Темная подложка */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Анимация парения */
@keyframes floating {
    0% { transform: translateY(0px) rotateY(0deg); }
    50% { transform: translateY(-10px) rotateY(0deg); }
    100% { transform: translateY(0px) rotateY(0deg); }
}

/* Парение для перевернутой карты (чтобы не сбрасывался поворот) */
.card-object.flipped {
    animation: floating-flipped 3s ease-in-out infinite;
}

@keyframes floating-flipped {
    0% { transform: translateY(0px) rotateY(180deg); }
    50% { transform: translateY(-10px) rotateY(180deg); }
    100% { transform: translateY(0px) rotateY(180deg); }
}

.hidden {
    display: none !important;
}

/* Кнопки */
.promo-action-btn {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    color: white;
    margin-top: 10px; 
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.promo-action-btn:active {
    transform: translateY(4px);
    box-shadow: none !important;
}

.promo-action-btn:disabled {
    background-color: #ccc !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

.btn-blue {
    background-color: #3b82f6 !important;
    box-shadow: 0 4px 0 #2563eb !important; 
}

/* Стилизованный alert — полностью в стиле карточек */
#styled-alert-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    padding: 20px;
    box-sizing: border-box;
}

#styled-alert-overlay .card-object {
    animation: floating 3s ease-in-out infinite;
}

/* Чтобы при открытии сразу был красивый поворот */
#styled-alert-overlay .card-object.flipped {
    transform: rotateY(180deg);
}