body {
    font-family: Arial, sans-serif;
    background-color: #2c2f33;
    color: #ffffff;
    display: flex;
    justify-content: center;
    min-height: 100vh;   
    margin: 0;
    padding: 20px 0;      
    box-sizing: border-box; 
}

.game-container {
    background-color: #23272a;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    text-align: center;
    width: 90%;
    max-width: 500px;
}

#daily-challenge-text {
    margin: -10px 0 10px 0;
    font-size: 0.9em;
    color: #99aab5;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    background-color: #2c2f33;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    gap: 10px; /* Add gap for spacing */
}
.stats-container div {
    display: flex;
    flex-direction: column;
}
.stats-container span:first-child {
    font-size: 1.5em;
    font-weight: bold;
    color: #7289da;
}
.stats-container span:last-child {
    font-size: 0.8em;
    color: #99aab5;
}

#attempts-tracker {
    min-height: 20px;
    font-weight: bold;
    color: #7289da;
}

.image-viewport {
    width: 100%;
    height: 40vw;
    max-height: 400px;
    min-height: 200px;
    background-color: #000;
    margin: 20px 0;
    border: 2px solid #99aab5;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}
@media (max-width: 600px) {
    .game-container {
        max-width: 98vw;
        padding: 5vw;
    }
    .image-viewport {
        height: 60vw;
        min-height: 120px;
    }
    #startup-countdown {
        font-size: 3em;
    }
}

#mapImage {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: center center;
}

#startup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s;
    opacity: 1;
}

#startup-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

#startup-countdown {
    font-size: 5em;
    font-weight: bold;
    color: #ffffff;
}

h1 { margin-top: 0; }
.input-area { display: flex; justify-content: center; gap: 10px; margin: 20px 0; }
#guessInput { padding: 10px; border: 1px solid #99aab5; border-radius: 5px; background-color: #40444b; color: white; font-size: 16px; }
button { padding: 10px 20px; border: none; border-radius: 5px; background-color: #7289da; color: white; font-size: 16px; cursor: pointer; }
button:hover { background-color: #677bc4; }
#feedback { min-height: 24px; font-size: 1.2em; font-weight: bold; }
.guesses-container { margin-top: 20px; }
#wrongGuessesList { list-style-type: none; padding: 0; color: #ff4d4d; }
.hidden { display: none; }

#countdownContainer {
    margin-top: 20px;
    font-size: 1.1em;
}

#countdownTimer {
    font-weight: bold;
    color: #7289da;
}

.yesterday-info {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #40444b;
    font-size: 0.9em;
    color: #99aab5;
}

.yesterday-info strong {
    color: #ffffff;
}

footer {
    position: fixed;
    bottom: 10px;
    width: 100%;
    text-align: center;
    color: #99aab5;
    font-size: 14px;
}

.result-boxes {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin: 2px 0 0 0;
}
.result-box {
    width: 90px;
    height: 90px;
    background: #23272a;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.95em;
    font-weight: bold;
    border: 2px solid #7289da;
    transition: border-color 0.3s, background 0.3s;
}
.result-box.red {
    border-color: #ff4d4d;
    background: #3a2323;
    color: #ff4d4d;
}
.result-box.green {
    border-color: #63c559;
    background: #233a23;
    color: #63c559;
}
.result-box.yellow {
    border-color: #ffd700;
    background: #3a3a23;
    color: #ffd700;
}
.result-box .arrow {
    font-size: 1.5em;
    margin-top: 4px;
}
.autocomplete-items {
    position: absolute;
    background: #23272a;
    border: 1px solid #7289da;
    border-radius: 5px;
    z-index: 99;
    max-height: 180px;
    overflow-y: auto;
    width: 90%;
    left: 5%;
    top: 100%;
}
.autocomplete-item {
    padding: 10px;
    cursor: pointer;
    color: #fff;
}
.autocomplete-item:hover, .autocomplete-item.active {
    background: #7289da;
    color: #fff;
}
.input-area {
    position: relative;
}

#image-blocker {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    z-index: 20;
    background: transparent;
    pointer-events: all;
}

/* Add this for vertical stacking of guesses */
.guess-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 18px;
}

/* Make the container for all guess rows stack vertically */
#resultBoxes {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

/* Each guess-row stays as a vertical block (already correct) */
.guess-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0; /* gap is now handled by parent */
}

/* The row of boxes for each guess stays horizontal */
.result-boxes {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin: 2px 0 0 0;
}

