@import url('https://fonts.googleapis.com/css2?family=Play&display=swap');

* {
    box-sizing: border-box;
}

body {
    background: url('bg2.jpg') no-repeat center center/cover;
    font-family: 'Play', cursive;
    min-height: 100vh;
    min-width: 100vw;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    letter-spacing: 1px;
}

canvas {
    background-color: #f0f0f0;
    display: block;
    border-radius: 5px;
}

h1 {
    font-size: 45px;
    color: #fff;
    user-select: none;
}

.btn {
    cursor: pointer;
    border: none;
    padding: 10px 20px;
    background: #66dbe5;
    color: #333;
    border-radius: 5px;
    font-family: 'Play', cursive;
    font-size: 18px;
    letter-spacing: 1px;
    font-weight: bold;
}

.btn:focus {
    outline: 0;
}

.btn:hover {
    background: #4ea8dc;
    transition: 0.3s;
    color: #fff;
}

.btn:active {
    transform: scale(0.98);
}

.rules-btn {
    position: absolute;
    top: 30px;
    left: 30px;
}

.rules {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(51, 51, 51, 0.85);
    color: #fff;
    min-height: 100vh;
    width: 360px;
    padding: 20px;
    line-height: 1.5;
    transform: translateX(-360px);
    transition: transform 1s ease-in-out;
}

.rules.show {
    transform: translateX(0px);
}