body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #1e3c72, #373636);
    background-attachment: fixed;
}

canvas {
    border: 9px solid #16a81f;
    background-color: #b3e0ff;
}

.game-controls {
    margin: auto;
    padding: 10px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-align: center;
}

button {
    padding: 8px 16px;
    margin: 5px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.gameModeText {
    padding: 8px 16px;
    margin: 5px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: default;
    border-radius: 4px;
    font-size: 16px;
}

.scores {
    color: red;
}

h3, h2 {
    color: white;
}

.target {
    background-color: #00FF00;
    border-radius: 45px;
    padding: 2px 6px;
}

button:hover {
    background-color: #45a049;
}

.info {
    background-color: #ffffff;
    padding: 10px;
    border-radius: 8px;
    margin: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.fancy-loader {
    position: relative;
    width: 150px;
    height: 150px;
}

.fancy-loader .circle {
    position: absolute;
    border-radius: 50%;
    background-color: transparent;
    border: 8px solid transparent;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.fancy-loader .circle:nth-child(1) {
    border-top-color: #FF5722;
    animation: spin 1.5s linear infinite;
}

.fancy-loader .circle:nth-child(2) {
    border-right-color: #2196F3;
    animation: spin 1.5s linear infinite reverse;
}

.fancy-loader .circle:nth-child(3) {
    border-bottom-color: #4CAF50;
    animation: spin 1s linear infinite;
}

.fancy-loader .circle:nth-child(4) {
    border-left-color: #FFC107;
    animation: spin 1s linear infinite reverse;
}

.fancy-loader .inner-circle {
    position: absolute;
    width: 70%;
    height: 70%;
    background-color: white;
    border-radius: 50%;
    top: 15%;
    left: 15%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.fancy-loader .inner-circle .pulse {
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, #3498db, transparent);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(0.6); opacity: 0.6; }
    50% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.6); opacity: 0.6; }
}

@media (max-width: 800px) {
    #gameCanvas {
        display: block;      /* remove inline-block whitespace */
        width: 100%;         /* always fill container width */
        height: auto;        /* keep aspect ratio */
        max-width: 100%;     /* no overflow */
        margin-left: 6px;
    }
}

.soundContainer {
    text-align: center;
}

h1 {
    color: #fff;
    margin-bottom: 5px;
}

button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

button.sound-off {
    background-color: #f44336;
}

button.sound-off:hover {
    background-color: #d32f2f;
}

button.test-sound {
    background-color: #2196F3;
}

button.test-sound:hover {
    background-color: #0b7dda;
}

.status {
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.sound-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.loading-status {
    margin-top: 20px;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
    max-height: 120px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 12px;
    text-align: left;
}

#soundControlsPanel {
    display: none;
}

.info-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 24px;
    height: 24px;
    background-color: #00b9fe;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 100;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    color: #fff;
    transition: background-color 0.3s ease;
}

.info-icon:hover {
    background-color: #006494;
}

.tooltip {
    position: absolute;
    bottom: 40px;
    right: -10px;
    width: 240px;
    background-color: #1e3c72;
    color: white;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    text-align: center;
}

.info-icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

.tooltip:after {
    content: "";
    position: absolute;
    top: 100%;
    right: 15px;
    border-width: 8px;
    border-style: solid;
    border-color: #1e3c72 transparent transparent transparent;
}

.tooltip a:link,
.tooltip a:visited,
.tooltip a:hover,
.tooltip a:active {
    text-decoration: none;
    color: rgba(11, 232, 18, 0.58);
}

.tooltip a:hover {
    color: rgba(11, 232, 18, 0.8);
}