.game-container {
    position: relative;
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    max-width: 800px;
    padding-top: 56.25%;
    margin: 15px auto 15px auto;
	box-shadow: 0 0 10px #0ff;
}

#gameCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

canvas {
    background: url('/jeux/space-defender/img/background.jpg') center/cover no-repeat;
}

/* HUD sous le canvas */
.hud {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    margin-top: 10px;
    background-color: #242424;
    padding: 10px;
    border-radius: 12px;
    font-size: 14px;
    color: #fff;
}

.hud div {
    margin: 5px 10px;
    text-align: center;
}

.boss-explode {
  animation: explode 1s forwards;
}

.gratte-result-ok,
.gratte-result-no {
    margin: 10px auto;
    padding: 10px;
    border-radius: 10px;
    font-weight: bold;
    max-width: 600px;
}

.gratte-result-ok {
    border: 1px dashed lightgreen;
    color: white;
}

.gratte-result-no {
    border: 1px dashed lightcoral;
    color: white;
}

@keyframes explode {
  0% {
    transform: scale(1);
    opacity: 1;
    filter: brightness(1);
  }
  50% {
    transform: scale(1.5);
    opacity: 0.8;
    filter: brightness(3) blur(2px);
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

/* ===================== */
/* IMAGES RESPONSIVES    */
/* ===================== */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Ne montre les contrôles tactiles que sur mobile */
@media (pointer: coarse) {
    #touchControls { display: block; }
}

@media (pointer: fine) {
    #touchControls { display: none; }
}

/* Sécurité mobile */
@media (max-width: 768px) {
    img {
        max-width: 100%;
        height: auto;
    }
}


@media (max-width: 600px){
    .hud {
        font-size: 12px;
    }
    #startGame, #resetGame {
        padding: 6px 10px;
        font-size: 12px;
    }
}
