/* 🎇 Fond animé amélioré */
body {
  margin: 0;
  padding: 0;
  font-family: 'Orbitron', sans-serif;
  background: linear-gradient(270deg, #ff00cc, #3333ff, #00ffcc, #ffcc00);
  background-size: 800% 800%;
  animation: backgroundFlow 10s ease infinite;
  color: #fff;
  text-align: center;
}

/* 🌊 Animation de fond */
@keyframes backgroundFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ✨ Titre avec effet de lueur renforcé */
h2 {
  font-size: 2.2em;
  text-shadow: 0 0 15px gold, 0 0 25px orange, 0 0 40px red;
  animation: flicker 1s infinite alternate;
}

/* 📦 Inputs et boutons */
input, button {
  font-size: 1.2em;
  padding: 10px;
  margin: 10px auto;
  display: block;
  width: 80%;
  border-radius: 10px;
  border: none;
  outline: none;
}

input {
  background-color: #fff;
  color: #000;
  box-shadow: 0 0 10px #00ffff;
}

button {
  background: linear-gradient(45deg, #ff0080, #ffcc00);
  color: white;
  font-weight: bold;
  box-shadow: 0 0 25px #ff0080, 0 0 10px #ffcc00;
  cursor: pointer;
  transition: transform 0.2s ease;
  animation: pulse 2s infinite;
}

button:hover {
  transform: scale(1.08);
  background: linear-gradient(45deg, #ff33aa, #ffee00);
}

/* ✨ Lueur clignotante */
@keyframes pulse {
  0% { box-shadow: 0 0 15px #ff0080; }
  50% { box-shadow: 0 0 30px #ffcc00; }
  100% { box-shadow: 0 0 15px #ff0080; }
}

/* 💬 Zone de statut */
#status {
  font-size: 1.5em;
  padding: 15px;
  border-radius: 15px;
  background: rgba(0,0,0,0.5);
  margin: 20px auto;
  max-width: 80%;
  box-shadow: 0 0 20px gold;
}

/* 🔗 Liens néon */
a {
  color: #00ffff;
  text-decoration: underline;
  transition: text-shadow 0.2s ease;
}

a:hover {
  text-shadow: 0 0 5px white, 0 0 15px cyan;
}

/* 🎮 Blocs du jeu */
#game, #login, #register {
  margin-top: 30px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.65);
  border-radius: 15px;
  box-shadow: 0 0 25px #ff00ff, inset 0 0 10px rgba(255, 255, 255, 0.1);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ✨ Animation clignotante subtile */
@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* 👤 Nom du joueur animé */
#playerName {
  animation: flicker 0.5s infinite alternate, hueRotate 6s infinite linear;
  color: #00ffcc;
  font-weight: bold;
}

@keyframes hueRotate {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}
/* 🌌 Conteneur et champ d'étoiles */
#crashGameArea {
  position: relative;
  width: 100px;
  height: 300px;
  margin: 20px auto;
  overflow: hidden;
}

/* Fond étoiles défilant vers le bas */
#starfield {
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 200%;
  background: 
    url('../medias/etoile.jpg') repeat;
  animation: starMove 3s linear infinite;
}

/* Animation du champ d'étoiles */
@keyframes starMove {
  from { transform: translateY(0); }
  to   { transform: translateY(50%); }
}

/* Fusée fixe au centre-bas */
#rocket {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scale(1);
  width: 60px;
  will-change: transform;
  animation: rocketWiggle 0.4s ease-in-out infinite alternate;
}

/* Légère oscillation/suspense */
@keyframes rocketWiggle {
  from { transform: translateX(-50%) translateY(0) scale(1); }
  to   { transform: translateX(-50%) translateY(-10px) scale(1.02); }
}

/* Explosion centrée sur la fusée */
#explosion {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: 80px;
  height: 80px;
  background: url('../medias/boom.gif') no-repeat center/contain;
  opacity: 0;
  pointer-events: none;
}

/* Animation de boom */
@keyframes boom {
  0%   { transform: translateX(-50%) scale(0.5); opacity: 1; }
  50%  { transform: translateX(-50%) scale(1.5); opacity: 1; }
  100% { transform: translateX(-50%) scale(2.5); opacity: 0; }
}
