/* Spanish Galaga Vocabulary Game */

.sgg-game {
    width: 100%;
    max-width: 980px;
    margin: 30px auto;
    font-family: Arial, sans-serif;
    color: #1f1f1f;
    text-align: center;
    box-sizing: border-box;
}

.sgg-topbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.sgg-stat {
    background: #f3f1df;
    border: 2px solid #baa17f;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    flex: 1 1 160px;
}

.sgg-instruction {
    background: #baa17f;
    color: #ffffff;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    font-size: clamp(18px, 2.5vw, 28px);
    font-weight: 700;
}

.sgg-instruction strong {
    color: #ffffff;
}

.sgg-canvas {
    display: block;
    width: 100%;
    height: auto;
    background: radial-gradient(circle at center, #17213f 0%, #080d1f 70%);
    border: 4px solid #baa17f;
    border-radius: 14px;
    box-sizing: border-box;
    touch-action: none;
}

.sgg-message {
    min-height: 28px;
    margin-top: 12px;
    font-weight: 700;
    font-size: 18px;
}

.sgg-actions {
    margin-top: 12px;
}

.sgg-actions button,
.sgg-mobile-controls button {
    background: #222222;
    color: #ffffff;
    border: 0;
    border-radius: 10px;
    padding: 11px 18px;
    font-weight: 700;
    cursor: pointer;
}

.sgg-actions button:hover,
.sgg-mobile-controls button:hover {
    background: #444444;
}

.sgg-mobile-controls {
    display: none;
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

@media (max-width: 768px) {
    .sgg-game {
        margin: 18px auto;
    }

    .sgg-topbar {
        gap: 8px;
        margin-bottom: 8px;
    }

    .sgg-stat {
        padding: 8px 10px;
        font-size: 14px;
    }

    .sgg-mobile-controls {
        display: grid;
    }

    .sgg-instruction {
        font-size: 14px;
        line-height: 1.25;
        padding: 9px 10px;
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .sgg-canvas {
        border-width: 3px;
        border-radius: 10px;
    }

    .sgg-message {
        font-size: 15px;
    }
}


/* v1.0.4: all stats are now drawn inside the canvas */
.sgg-topbar {
    display: none !important;
}

/* v1.0.5: background music upload added in the Galaga Game editor. */

/* v1.0.6: consistent per-word colors and separate ship-hit wrong sound. */

/* v1.0.7: word tiles use consistent dark background colors with white foreground text. */


/* v1.0.8: pause + congratulations modal */
.sgg-game {
    position: relative;
}

.sgg-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.sgg-congrats-modal {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.68);
    border-radius: 14px;
}

.sgg-congrats-modal[hidden] {
    display: none !important;
}

.sgg-congrats-card {
    max-width: 440px;
    width: min(92%, 440px);
    background: #f3f1df;
    color: #222222;
    border: 4px solid #baa17f;
    border-radius: 18px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 18px 55px rgba(0,0,0,0.35);
}

.sgg-congrats-card h2 {
    margin: 0 0 12px;
    font-size: clamp(28px, 5vw, 42px);
}

.sgg-congrats-card p {
    margin: 8px 0;
    font-size: 18px;
}

.sgg-congrats-small {
    font-size: 16px !important;
}

.sgg-congrats-card button {
    margin-top: 14px;
    background: #222222;
    color: #ffffff;
    border: 0;
    border-radius: 10px;
    padding: 12px 22px;
    font-weight: 700;
    cursor: pointer;
}


/* v1.0.9: instruction is drawn inside the videogame screen */
.sgg-instruction {
    display: none !important;
}

/* v1.0.10: player asset changed from triangle ship to upward-pointing rocket emoji. */
