body {
    margin: 0;
    overflow: hidden;
    background-color: #fff;
}
.square {
    position: absolute;
    will-change: transform;
}
.circle {
    border-radius: 50%;
}
.triangle {
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 50px solid #555;
}
.hexagon {
    width: 50px;
    height: 25px;
    position: relative;
    margin: 12.5px 0;
}
.hexagon:before,
.hexagon:after {
    content: "";
    position: absolute;
    width: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
}
.hexagon:before {
    bottom: 100%;
    border-bottom: 12.5px solid;
}
.hexagon:after {
    top: 100%;
    border-top: 12.5px solid;
}
.diamond {
    transform: rotate(45deg);
}
.star {
    position: relative;
    display: inline-block;
    color: transparent;
}
.star:before {
    content: "★";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1em;
    color: inherit;
}
.pentagon {
    position: relative;
    width: 50px;
    border-width: 20px 7px 0;
    border-style: solid;
    border-color: transparent;
}
.pentagon:before {
    content: "";
    position: absolute;
    height: 0;
    width: 0;
    top: -30px;
    left: -7px;
    border-width: 0 25px 15px;
    border-style: solid;
    border-color: transparent transparent inherit;
}
.oval {
    border-radius: 50px/25px;
}
.waldo {
    background: repeating-linear-gradient(
        0deg,
        red,
        red 10px,
        white 10px,
        white 20px
    );
}
.word {
    position: absolute;
    font-size: 2em;
    font-weight: bold;
    pointer-events: none;
    white-space: nowrap;
}
.bottom-right-text {
    position: fixed;
    bottom: 10px;
    right: 10px;
    text-align: right;
    font-size: 14px;
    color: #000;
}
.emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(0.8 * 50px);
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.spinning {
    animation: spin 5s linear;
}
/* Styles for the instructions and controls menus */
.instructions-menu, .controls-menu {
    position: fixed;
    top: 10px;
    left: 10px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 5px;
    border: 1px solid #ccc;
    cursor: pointer;
    z-index: 1000;
}

.controls-menu {
    top: 10px;
    right: 10px;
    left: auto;
    font-family: Arial, sans-serif;
    font-size: 14px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 5px;
    border: 1px solid #ccc;
    cursor: pointer;
    z-index: 1000;
}

.instructions-content, .controls-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(255, 255, 255, 0.98);
    padding: 15px;
    border: 1px solid #ccc;
    width: 280px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
    font-size: 13px;
}

.controls-content {
    right: 0;
    left: auto;
}

.instructions-menu:hover .instructions-content,
.controls-menu:hover .controls-content {
    display: block;
}

label {
    display: block;
    margin-bottom: 10px;
}

input[type="range"] {
    width: 100%;
}

#masterVolume {
    background: linear-gradient(to right, #ddd 0%, #4CAF50 100%);
}

label:has(#soundEnabled),
label:has(#masterVolume) {
    font-weight: bold;
    border-top: 1px solid #eee;
    padding-top: 8px;
    margin-top: 8px;
}