body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f0f8ff;
    font-family: 'Comic Sans MS', cursive, sans-serif;
}

#game-container {
    position: relative;
    text-align: center;
    border: 5px solid #ff69b4;
    border-radius: 20px;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

#corner-buttons {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#start-container {
    text-align: center;
}

#start-button {
    font-size: 2em;
    padding: 20px 40px;
    color: #fff;
    background-color: #4caf50;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

#info-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 10px auto;
}

#score-container {
    font-size: 1.5em;
    color: #ff69b4;
}

#mode-switch-button {
    padding: 5px 10px;
    font-size: 0.7em;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#mode-switch-button:hover {
    background-color: #0056b3;
}

.prompt-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

#replay-sound-button {
    font-size: 2em;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #ff69b4;
    transition: transform 0.2s;
}

#replay-sound-button:hover {
    transform: scale(1.2);
}

#number-prompt {
    font-size: 3em;
    color: #ff69b4;
    margin-bottom: 20px;
}

#drawing-canvas {
    border: 2px dashed #ccc;
    border-radius: 10px;
    cursor: crosshair;
    touch-action: none;
}

#feedback-container {
    font-size: 1.5em;
    color: #4caf50;
    margin-top: 10px;
    height: 30px; 
}

.button-container {
    position: relative;
    margin-top: 20px;
    height: 60px; /* Accommodate button sizes */
}

#check-button {
    margin-top: 0;
    padding: 15px 30px;
    font-size: 1.5em;
    color: #fff;
    background-color: #4caf50;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#clear-button {
    font-size: 2.5em;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #aaa;
    transition: transform 0.2s;
    position: absolute;
    top: 50%;
    left: 50%;
    /* Offset by ~half of check-button's width + gap */
    margin-left: 85px;
    transform: translateY(-50%);
}

#clear-button:hover {
    transform: scale(1.2);
}

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

#stats-button {
    padding: 5px 10px;
    font-size: 0.7em;
    color: #fff;
    background-color: #6c757d;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#stats-button:hover {
    background-color: #5a6268;
}

.modal {
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 10px;
    text-align: center;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#stats-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.stat-item {
    font-size: 2em;
    padding: 10px;
    border-radius: 5px;
    background-color: #eee;
}