body {
  margin:0; 
  background: #111; 
  color: #eee; 
  font-family: Arial, sans-serif;
}
.mines-wrapper {
  max-width:900px; margin:auto; padding:20px;
}
header {
  display:flex; 
  justify-content:space-between; 
  align-items:center;
}
.controls {
  margin:20px 0;display:flex;gap:10px;
}
.controls input, .controls button {
  padding:10px; font-size:1rem;
  border:none; border-radius:4px;
}
.controls button {
  background:#28a745; color:#fff;cursor:pointer;
}
.controls button:disabled {
  background:#555; cursor:not-allowed;
}
.grid {
  display:grid;
  grid-template-columns: repeat(10, 1fr);
  gap:5px;
  margin-bottom:20px;
}
.cell {
  width:50px; height:50px;
  background:#333;
  display:flex;
  justify-content:center;
  align-items:center;
  cursor:pointer;
  font-size:1.2rem;
}
.cell.revealed {
  background:#555;
}
.cell.bomb {
  background:#c0392b;
  color:#fff;
}
.odds-panel {
  background:#222;
  padding:10px;
  border-radius:4px;
  max-height:400px;
  overflow-y:auto;
}
.odds-panel h2 {
  margin-top:0;
}
.odds-panel ul {
  list-style:none;
  padding:0;
}
.odds-panel li {
  padding:4px;
  border-bottom:1px solid #333;
}
.message {
  margin-top:10px;
  font-size:1.2rem;
  font-weight:bold;
}
/* Particle background */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Leaderboard */
.leaderboard {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px;
  border-radius: 12px;
  color: white;
  width: 200px;
  z-index: 1;
}
.leaderboard h3 {
  margin-top: 0;
  font-size: 1.2rem;
}
.leaderboard ul {
  list-style: none;
  padding-left: 0;
  font-size: 0.9rem;
}

/* Mobile polish */
@media (max-width: 768px) {
  .mines-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .leaderboard {
    position: relative;
    width: 90%;
    margin: 10px auto;
  }

  .grid {
    width: 90vw;
    height: 90vw;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
  }

  .controls input,
  .controls button {
    width: 90%;
    margin: 5px 0;
  }
  /* === Cell Reveal Animations === */

.cell {
  transition: transform 0.2s ease, background-color 0.3s ease;
  cursor: pointer;
}

.cell.revealed.safe {
  background-color: #2ecc71;
  animation: popIn 0.25s ease-out;
}

.cell.revealed.bomb {
  background-color: #e74c3c;
  animation: shake 0.3s ease-in-out;
}

@keyframes popIn {
  0% {
    transform: scale(0.6);
    opacity: 0.3;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-5px);
  }
}
}
#multiplierDisplay {
  font-size: 1.2rem;
  color: #00ff99;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@keyframes pulseGlow {
  0% {
    transform: scale(1);
    text-shadow: 0 0 0px #00ff99;
  }
  50% {
    transform: scale(1.3);
    text-shadow: 0 0 15px #00ff99, 0 0 30px #00ffcc;
  }
  100% {
    transform: scale(1);
    text-shadow: 0 0 0px #00ff99;
  }
}

#multiplierDisplay.pulse {
  animation: pulseGlow 0.5s ease-out;
}
}
/* Safe cell pop animation */
@keyframes safePop {
  0% {
    transform: scale(0.8);
    background-color: #28a745;
  }
  50% {
    transform: scale(1.1);
    background-color: #34d058;
  }
  100% {
    transform: scale(1);
    background-color: #28a745;
  }
}

.cell.safe {
  animation: safePop 0.4s ease-out;
}

/* Dramatic bomb shake */
@keyframes bigShake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(-5px, 5px) rotate(-5deg); }
  40% { transform: translate(5px, -5px) rotate(5deg); }
  60% { transform: translate(-5px, 5px) rotate(-5deg); }
  80% { transform: translate(5px, -5px) rotate(5deg); }
}

.cell.bomb {
  animation: bigShake 0.6s ease-in-out;
  background-color: #ff4444 !important;
  color: #fff;
}
.floating-multiplier {
  position: absolute;
  font-size: 1rem;
  color: #00ffcc;
  font-weight: bold;
  animation: floatUp 1s ease-out forwards;
  pointer-events: none;
  z-index: 999;
}

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-40px);
  }
}
