*, *:before, *:after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Yatra One", system-ui;
    color: #FFF7E3;
    font-size: 18px;
}

.game {
    width: 100%;
    height: 100vh;
    background: url("../img/bg.png") center center / cover no-repeat;
    overflow: hidden;
    position: relative;
    z-index: 0;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 20px;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-align: center;
}

.alladin {
    position: absolute;
    z-index: -1;
    bottom: 0;
    left: 10%;
}

.game__wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game__wrapper img {
    max-width: 250px;
    cursor: pointer;
}

.footer__wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    font-size: 32px;
    padding-bottom: 30px;
}

.start {
    text-transform: uppercase;
    cursor: pointer;
    padding: 30px 60px;
    background-color: #84519C;
    border-radius: 20px;
    transition: .4s;
}

.start:hover {
    background-color: #BB0200;
}

@keyframes shuffle {
    0% { transform: translateX(0); }
    25% { transform: translateX(100px); }
    50% { transform: translateX(-100px); }
    75% { transform: translateX(50px); }
    100% { transform: translateX(0); }
}

.shuffle {
    animation: shuffle 2s ease-in-out;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.shake {
    animation: shake 0.5s infinite;  /* Подергивание бесконечно, пока игрок не выберет лампу */
}

.hint {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 10px;
    color: #fff;
    z-index: 10;
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}


@keyframes jumpAndSpin {
    0% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(90deg); }
    50% { transform: translateY(0) rotate(180deg); }
    75% { transform: translateY(-10px) rotate(270deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

.jump {
    animation: jumpAndSpin 1s ease-in-out infinite;  /* Лампы будут прыгать и вращаться */
}

.lamp-message {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 20px;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    opacity: 0; /* Скрыто по умолчанию */
    transition: opacity 0.5s ease-in-out;
}

.lamp-message.correct {
    background-color: green;  /* Зелёное облачко для правильного ответа */
}

.lamp-message.incorrect {
    background-color: red;  /* Красное облачко для неправильного ответа */
}



/* Стиль для затемненного фона */
.popup {
    display: none; /* Скрыт по умолчанию */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Полупрозрачный черный фон */
}

/* Контент попапа */
.popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #FFF7E3;
    color: #84519C;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    text-align: center;
}

/* Кнопка закрытия попапа */
.close-popup {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}

/* Стиль для формы */
form {
    display: flex;
    flex-direction: column;
}

form label {
    margin: 10px 0 5px;
}

form input {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid deepskyblue;
}

form button {
    border: none;
    outline: none;
    background-color: red;
    color: #FFF7E3;
    padding: 20px 50px;
    cursor: pointer;
    margin-top: 20px;
    font-family: "Yatra One", system-ui;
    font-size: 24px;
}