* {
    box-sizing: border-box;
}

body {
    background-color: #5B5EA6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
    margin: 0;
}

canvas {
    background: #f0f0f0;
    display: block;
    border-radius: 5px;
    margin-bottom: 20px;
}

h1 {
    font-size: 45px;
    color: white;
}

/* Buttons */
.btn {
    cursor: pointer;
    border: 0;
    padding: 10px 20px;
    background-color: black;
    color: white;
    border-radius: 5px;
}

.btn:focus {
    outline: 0;
}

.btn:hover {
    background: #222;
}

.rules-btn {
    position: absolute;
    top: 30px;
    left: 30px;
}

.start-btn{
    cursor: pointer;
    border: 0;
    padding: 10px 20px;
    background-color: black;
    color: white;
    border-radius: 5px;
    width: 200px;
    font-size: larger;
    height: auto;
}

.start-btn:focus {
    outline: 0;
}
.start-btn:hover {
    background: #222;
}
.diff-btn{
    cursor: pointer;
    border: 0;
    padding: 10px 20px;
    background-color: black;
    color: white;
    border-radius: 5px;
    font-size: 20px;
    height: auto;
}

.diff-btn:focus {
    outline: 0;
}
.diff-btn:hover {
    background: #222;
}


/* Divs */

.rules {
    position: absolute;
    top: 0;
    left: 0;
    background: #333;
    color: white;
    min-height: 100vh;
    width: 400px;
    padding: 20px;
    line-height: 1.5;
    transform: translateX(-400px);
    transition: transform 1s ease-in-out;
}

.rules.show {
    transform: translateX(0);
}

.game-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.difficulty {
    position: absolute;
    display: none;
    top: 280px;
    background: black;
    color: white;
    padding: 20px 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    text-align: center;
    animation: pop-in 1s;
    font-size: 20px;
}

.start {
    position: absolute;
    top: 320px;
    background: black;
    color: white;
    padding: 20px 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    text-align: center;
    animation: pop-in 1s;
    width: 350px;
    height: 75px;
}

.lose {
    display: none;
    position: absolute;
    top: 250px;
    background: #009fdd;
    color: white;
    padding: 20px 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    text-align: center;
    animation: pop-in 1s;
}

.win {
    display: none;
    position: absolute;
    top: 250px;
    background: #009B77;
    color: white;
    padding: 20px 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    text-align: center;
    animation: pop-in 1s;
}