body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    margin: 0;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #3d85c6;
    overflow-x: hidden;
}

#main-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 900px;
}

#game-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    background-image: url('./background.png');
    background-size: cover;
    background-position: center bottom;
    border: 8px solid #8b4513;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    overflow: hidden;
    cursor: url('./crosshair.png') 16 16, crosshair;
}

#game-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.target {
    position: absolute;
    width: 10%; /* Relative to game container */
    aspect-ratio: 1/1;
    background-image: url('./target.png');
    background-size: contain;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4vmin;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px #000;
    user-select: none;
    transition: transform 0.1s ease-out;
}

.target span {
    display: inline-block; /* Necessary for the transform to apply */
}

/* Un-flip the letter when the parent target is flipped */
.target[style*="scaleX(-1)"] span {
    transform: scaleX(-1);
}

.target.hit {
    transform: scale(0);
    opacity: 0;
    transition: transform 0.3s ease-in, opacity 0.3s ease-in;
}

#ui-container {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 2.5vmin;
    color: white;
    text-shadow: 2px 2px 4px #000;
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 10px;
    z-index: 5; /* Keep UI on top */
}

#timer-container {
    display: none; /* No timer in this version */
}

#timer-bar {
    height: 100%;
    width: 100%;
    background-color: #4caf50;
    border-radius: 8px;
    transition: width 0.1s linear, background-color 0.5s;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
    padding: 20px;
    box-sizing: border-box;
}

.screen.hidden {
    display: none;
}

.screen h1 {
    font-size: 6vmin;
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px #000;
}

.screen p {
    font-size: 3vmin;
    max-width: 80%;
}

.screen button {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    font-size: 3.5vmin;
    padding: 15px 30px;
    border-radius: 15px;
    border: 3px solid #fff;
    background-color: #ff9800;
    color: white;
    cursor: pointer;
    margin-top: 30px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.3);
    transition: transform 0.1s ease;
}

.screen button:hover {
    background-color: #f57c00;
    transform: scale(1.05);
}

#alphabet-tracker {
    width: 100%;
    max-width: 900px;
    background-color: #8b4513;
    padding: 10px;
    border-radius: 0 0 15px 15px;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1%;
    border: 8px solid #8b4513;
    border-top: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.letter-box {
    width: 6%;
    aspect-ratio: 1 / 1;
    background-color: #f0f0f0;
    border: 2px solid #ccc;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3vmin;
    font-weight: bold;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
}

.letter-box.correct {
    background-color: #4caf50; /* Green */
    color: white;
    border-color: #388e3c;
}

.letter-box.wrong {
    background-color: #f44336; /* Red */
    color: white;
    border-color: #d32f2f;
}

@media (max-width: 600px) {
    #ui-container {
        font-size: 3.5vmin;
    }
    .target {
        font-size: 5vmin;
    }
    .letter-box {
        font-size: 4vmin;
        width: 10%;
    }
     .screen h1 {
        font-size: 7vmin;
    }
    .screen p {
        font-size: 4vmin;
    }
    .screen button {
        font-size: 5vmin;
        margin-top: 20px;
    }
}