/* General Body */
body {
    background-color: #CFE8FF;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    font-family: "rl-horizon", sans-serif;
    font-weight: 400;
    font-style: normal;
    position: relative;
}

/* SNOW EFFECT */
.snow-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.snow {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: absolute;
    top: -40px;
    animation: fallingSnow 3s linear infinite;
}

/* Falling snow animation */
@keyframes fallingSnow {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(100vh);
    }
}

/* Randomize snowflakes */
.snow:nth-child(1) {
    left: 5%;
    width: 15px;
    height: 15px;
    animation-delay: 0s;
    animation-duration: 6s;
}

.snow:nth-child(2) {
    left: 10%;
    width: 10px;
    height: 10px;
    animation-delay: 1s;
}

.snow:nth-child(3) {
    left: 15%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
}

.snow:nth-child(4) {
    left: 20%;
    width: 12px;
    height: 12px;
    animation-delay: 3s;
}

.snow:nth-child(5) {
    left: 25%;
    width: 18px;
    height: 18px;
    animation-delay: 1.5s;
}

/* Repeat for all snowflakes up to nth-child(30) with different left, size, delay */
.snow:nth-child(6) {
    left: 30%;
    width: 10px;
    height: 10px;
    animation-delay: 0.5s;
}

/* ... continue pattern ... */
.snow:nth-child(30) {
    left: 95%;
    width: 12px;
    height: 12px;
    animation-delay: 2.5s;
}

/* GAME STYLES */
.game-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
    z-index: 10;
    position: relative;
}

.hangmanImage {
    width: 400px;
    max-width: 45vw;
    height: auto;
}

.game-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: min(500px, 100%);
}

/* Difficulty buttons */
.buttons {
    display: flex;
    gap: 15px;
}

/* Buttons style: same pink/purple look */
button.btn {
    padding: 12px 25px;
    font-size: 18px;
    background-color: #f7a1b9;
    color: #845c9e;
    border: 2px solid #e45d98;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button.btn:hover {
    background-color: #fcc3d3;
    transform: scale(1.05);
}

/* Input row & Guess + Restart */
.input-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.side-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 5px;
}

/* Center the text input */
#guessInput {
    text-align: center;
}

/* Word & Keyboard */
#wordDisplay {
    font-size: 2rem;
    text-align: center;
    margin: 10px 0;
}

#guessedLetters,
#guessesLeft {
    font-weight: bold;
    margin: 5px 0;
}

#message {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 10px;
}

#keyboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    clear: both;
}

.keyboard-row {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.key {
    width: 40px;
    height: 40px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    border: 1px solid #845c9e;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease;
}

.key.correct {
    background-color: #DE3163;
    color: white;
}

.key.wrong {
    background-color: rgba(255, 161, 161, 0.39);
    color: white;
}

/* Responsive */
@media (max-width: 767px) {
    .game-container {
        flex-direction: column;
        align-items: center;
    }

    .hangmanImage {
        width: 300px;
    }

    .game-content {
        width: 90%;
    }

    .buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .side-buttons {
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
    }
}