body {
    margin: 0;
    padding: 0;
    background: #f5f3e6;
    font-family: Arial, sans-serif;
    color: #333;
}

header {
    text-align: center;
    padding: 30px;
    background: #8f5e2f;
    color: white;
}

h1 {
    margin: 0;
    font-size: 2rem;
}

main {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    padding: 30px 30px 0 30px;
}

.game-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-width: 500px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

aside {
    text-align: center;
    max-width: 300px;
}

.rules {
    text-decoration: underline;
}

.image-box img {
    max-height: 40vh;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.level-4 {
    filter: blur(1px);
}

.level-3 {
    filter: blur(1px) saturate(3);
}

.level-2 {
    animation: rainbow 1s steps(36) infinite linear;
    -webkit-animation: rainbow 1s steps(36) infinite;
}

.level-1 {
    animation: rotate 2s infinite linear, rainbow 3s steps(36) infinite;
    -webkit-animation: rotate 2s infinite linear, rainbow 3s steps(36) infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(359deg);
    }
}

@-webkit-keyframes rotate {
    from {
        -webkit-transform: rotate(0deg);
    }
    to {
        -webkit-transform: rotate(359deg);
    }
}

@-webkit-keyframes rainbow {
   from { -webkit-filter:hue-rotate(10deg); }
     to { -webkit-filter:hue-rotate(360deg); }
}

@keyframes rainbow {
 from {
    -webkit-filter:hue-rotate(10deg);
            filter:hue-rotate(10deg);
    }
  to {
    -webkit-filter:hue-rotate(360deg);
            filter:hue-rotate(360deg);
    }
}

.buttons {
    margin-top: 20px;
    display: flex;
    justify-content: space-around;
    gap: 5em;
}

.buttons, #next {
    z-index: 10;
}

.btn {
    padding: 12px 20px;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    transition: 0.3s;
}

#next, #newgame {
    padding: 12px 20px;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    transition: 0.3s;
}

#next {
    background: #8f5e2f;
}

#score, #highscore-name, #highscore-score {
    font-weight: bold;
}

#next:hover {
    background: #5e3909;
}

a {
    text-decoration: none;
}

#newgame {
    background: #1078b4;
}

#newgame:hover {
    background: #0d5d8b;
}

.life {
    align-self: end;
    font-size: 25px;
}

.btn.good {
    background: #4caf50;
}

.btn.good:hover {
    background: #3e8e41;
}

.btn.bad {
    background: #e53935;
}

.btn.bad:hover {
    background: #c62828;
}

#result {
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: bold;
}

footer {
    text-align: center;
    padding: 15px;
    font-size: 0.9rem;
    color: #555;
}

@media (min-width: 1025px) {
    body {
        overflow-y: hidden;
    }

    main {
        flex-direction: row;
        align-items: unset;
    }

    aside {
        position: fixed;
        right: 25px;
    }
}
