body {
    margin: 0;
    overflow: hidden;
    font-family: Arial, sans-serif;
    background-color: #f0f8ff;
    min-width: auto;
}
canvas {
    display: block;
}
ul {
    font-size: 14px;
    padding-left: 20px;
}
a {
    text-decoration: underline;
    color: #EA400D;
    font-size: 14px;
}

#preloader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#preloader .spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.modal-game {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 20px;
}
#gameRetryScreen.modal-game, #gameOverScreen.modal-game, #postcard.modal-game {
    display: none;
}

.modal-game .modal-game_content {
    display: flex;
    flex-direction: column;
    max-width: 315px;
    margin-bottom: 20px;
    border: 5px solid #ff5b00;
    border-radius: 20px;
    padding: 10px;
    font-size: 14px;
}
.modal-game_content .rules {
    max-height: 300px;
    overflow-y: auto;
}
/* Стилизация скроллбара */
.modal-game_content .rules::-webkit-scrollbar {
    width: 4px; /* Ширина скроллбара */
}

.modal-game_content .rules::-webkit-scrollbar-track {
    background: #5e5e5e; /* Цвет трека (дорожки) */
    border-radius: 10px;
}

.modal-game_content .rules::-webkit-scrollbar-thumb {
    background: #ff9026; /* Цвет ползунка */
    border-radius: 10px;
}

.modal-game_content .rules::-webkit-scrollbar-thumb:hover {
    background: #ee4911; /* Цвет ползунка при наведении */
}

.modal-game .regulation {
    margin-bottom: 10px;
}

.modal-game .modal-game_content h2{
    text-align: center;
}

.gift-row {
    margin-bottom: 5px;
    text-align: center;
}
.gift-row p {
    font-size: 14px;
}

#thankYouMessage {
    margin-top: 10px;
    font-size: 18px;
    color: #4caf50;
}
#errorMessage {
    margin-top: 10px;
    font-size: 18px;
    color: #f15050;
}
#postcard {
    font-size: 14px;
}
#rulesModal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 20px;
}
#rulesContent {

}
#rulesContent h2 {
    text-align: center;
}
#closeRulesButton {
    padding: 10px 20px;
    font-size: 18px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #4caf50;
    color: white;
}

.game-form {
    padding-bottom: 5px;
}

.game-form .input {
    border: 1px solid #F4F4F4;
    border-radius: 5px;
    width: 93%;
    -webkit-transition: opacity 300ms;
    transition: opacity 300ms;
    padding: 10px;
    height: 20px;
    color: #040404;
    font-size: 14px;
    margin: 5px 0 5px 0;
}

.game-form .input.error {
    border: 1px solid red;
    background-color: #ffdbdb;
}

.text-center {
    text-align: center;
}

.btn {
    -webkit-appearance: none;
    border-radius: 0;
    border: 0;
    height: 45px;
    background-color: #FF9026;
    background: -webkit-gradient(linear, left top, right top, from(#FF9026), color-stop(25%, #EE4911), color-stop(50%, #EE4911), to(#FF9026));
    background: linear-gradient(90deg, #FF9026 0%, #EE4911 25%, #EE4911 50%, #FF9026 100%);
    background-size: 200% 100%;
    background-position: 100% 0;
    border-radius: 5px;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    color: white;
    text-decoration: none;
    text-align: center;
    -webkit-transition: background-position 500ms;
    transition: background-position 500ms;
    padding: 10px 20px;
    font-size: 14px;
    min-width: 230px;
    cursor: pointer;
}

a.link {
    display: block;
    padding: 12px 0;
    text-align: center;
    margin-bottom: 7px;
}