body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  overflow: hidden;

  /* Game-like animated gradient background */
  background:
    /* Subtle animated grid overlay */
    linear-gradient(rgba(0, 0, 0, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.15) 1px, transparent 1px),
    /* Radial glow spots */
    radial-gradient(ellipse at 20% 80%, rgba(76, 175, 80, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(33, 150, 243, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 193, 7, 0.08) 0%, transparent 60%),
    /* Main gradient - dark arcade theme */
    linear-gradient(135deg,
      #0a0f12 0%,
      #0d1a1f 20%,
      #0f1f24 40%,
      #0a1518 60%,
      #080d10 80%,
      #050808 100%);

  background-size:
    40px 40px,
    40px 40px,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%;

  background-attachment: fixed;
}

/* Animated floating particles overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(2px 2px at 10% 20%, rgba(255, 215, 0, 0.4), transparent),
    radial-gradient(2px 2px at 90% 30%, rgba(76, 175, 80, 0.3), transparent),
    radial-gradient(1px 1px at 30% 70%, rgba(33, 150, 243, 0.35), transparent),
    radial-gradient(2px 2px at 70% 80%, rgba(255, 82, 82, 0.3), transparent),
    radial-gradient(1px 1px at 50% 10%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1px 1px at 85% 60%, rgba(156, 39, 176, 0.3), transparent),
    radial-gradient(2px 2px at 15% 50%, rgba(255, 193, 7, 0.35), transparent),
    radial-gradient(1px 1px at 60% 40%, rgba(0, 188, 212, 0.3), transparent);
  animation: floatingStars 20s linear infinite;
}

@keyframes floatingStars {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.8;
  }

  50% {
    opacity: 1;
  }

  100% {
    transform: translateY(-30px) rotate(5deg);
    opacity: 0.8;
  }
}

/* Pulsing glow effect overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.4) 100%);
  animation: ambientPulse 8s ease-in-out infinite;
}

@keyframes ambientPulse {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 0.8;
  }
}

#game-container {
  position: relative;
  text-align: center;
  /* responsive max width to avoid overflow on small screens */
  width: min(420px, 92vw);
  box-sizing: border-box;
}

/* Game Title - Enhanced positioning above mute button */
#game-title {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  z-index: 50;
  letter-spacing: 1px;
  padding: 4px 12px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 170, 0, 0.15));
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 15px;
  max-width: calc(100% - 40px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 0 8px rgba(255, 215, 0, 0.15);
  transition: all 0.25s ease;
}

#game-title:focus,
#game-title:hover {
  opacity: 1;
  transform: translateX(-50%) scale(1.03);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.35),
    0 0 12px rgba(255, 215, 0, 0.25);
}

/* Game Credit - Enhanced styling */
#game-credit {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
  padding: 5px 14px;
  border-radius: 20px;
  z-index: 12;
  background: linear-gradient(135deg,
      rgba(33, 150, 243, 0.25),
      rgba(156, 39, 176, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.25),
    0 0 8px rgba(33, 150, 243, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#game-credit a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.3px;
}

#game-credit a::before {
  content: "🚍";
  margin-right: 5px;
  font-size: 12px;
}

#game-credit:hover {
  transform: translateX(-50%) translateY(-3px) scale(1.02);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.3),
    0 0 12px rgba(33, 150, 243, 0.25);
}

#game-credit a:hover {
  text-decoration: none;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

#game-container {
  position: relative;
  text-align: center;
  padding: 26px 20px 20px 20px;
  border-radius: 12px;
  background: linear-gradient(180deg,
      rgba(255, 255, 255, 0.03),
      rgba(0, 0, 0, 0.02));
  box-shadow: 0 20px 40px rgba(10, 20, 40, 0.35);
}

#game-canvas {
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  background: transparent;
  /* show page background */
  /* make canvas responsive: scale down to fit small screens without changing logical resolution */
  width: 100%;
  height: auto;
  display: block;
}

/* Score badges - Enhanced */
#score-display,
#high-score-display {
  position: absolute;
  top: 36px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.35));
  padding: 6px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 70px;
  text-align: center;
  justify-content: center;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#score-display:hover,
#high-score-display:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

#score-display {
  left: 32px;
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.6), rgba(46, 125, 50, 0.5));
  border-color: rgba(76, 175, 80, 0.3);
}

#high-score-display {
  right: 32px;
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.5), rgba(255, 152, 0, 0.4));
  border-color: rgba(255, 193, 7, 0.3);
}

/* Mute button - Enhanced */
#mute-btn {
  position: absolute;
  top: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.6), rgba(21, 101, 192, 0.5));
  color: #fff;
  border: 1px solid rgba(33, 150, 243, 0.3);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 40;
  box-shadow:
    0 4px 12px rgba(33, 150, 243, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

#mute-btn:hover {
  transform: translateX(-50%) translateY(-2px) scale(1.08);
  box-shadow:
    0 6px 18px rgba(33, 150, 243, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#mute-btn:active {
  transform: translateX(-50%) scale(0.95);
}

/* Score pulse animation */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.12);
    opacity: 0.95;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.score-pulse {
  animation: pulse 300ms ease;
}

#game-canvas {
  border: 3px solid transparent;
  background-color: #084e45;
  border-image: linear-gradient(135deg, #ffd700, #ff9800, #4caf50, #2196f3) 1;
  box-shadow:
    0 0 20px rgba(255, 215, 0, 0.2),
    0 10px 40px rgba(0, 0, 0, 0.4),
    inset 0 0 60px rgba(0, 0, 0, 0.1);
}

/* =========================================
   GAME MENU STYLES - Start Screen & Game Over
   ========================================= */

/* Shared menu panel styles - COMPACT for game canvas */
#game-over,
#start-screen {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  padding: 20px 24px;
  border-radius: 16px;
  text-align: center;
  z-index: 30;
  width: 280px;
  max-width: 90%;
  max-height: 85%;
  overflow: hidden;

  /* Glassmorphism background */
  background: linear-gradient(145deg,
      rgba(20, 40, 60, 0.95),
      rgba(10, 25, 45, 0.98));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  /* Glow border effect */
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 15px 40px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(76, 175, 80, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);

  /* Entry animation */
  animation: menuSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes menuSlideIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -40%) scale(0.9);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Decorative background glow */
.menu-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center,
      rgba(76, 175, 80, 0.12) 0%,
      transparent 50%);
  animation: glowPulse 4s ease-in-out infinite;
  pointer-events: none;
}

.gameover-glow {
  background: radial-gradient(circle at center,
      rgba(244, 67, 54, 0.12) 0%,
      transparent 50%);
}

@keyframes glowPulse {

  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* Animated decoration particles */
.menu-decoration {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.menu-decoration::before,
.menu-decoration::after {
  content: '✨';
  position: absolute;
  font-size: 14px;
  animation: floatParticle 6s ease-in-out infinite;
  opacity: 0.5;
}

.menu-decoration::before {
  top: 15%;
  left: 10%;
  animation-delay: 0s;
}

.menu-decoration::after {
  content: '🌟';
  top: 20%;
  right: 10%;
  animation-delay: 3s;
}

@keyframes floatParticle {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.4;
  }

  50% {
    transform: translateY(-15px) rotate(15deg);
    opacity: 0.8;
  }
}

/* Animated Game Title - Compact */
.game-title-animated {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(90deg,
      #ffd700,
      #ffec8b,
      #ffd700);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
  text-shadow: none;
  filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.25));
  position: relative;
  z-index: 1;
}

@keyframes shimmer {
  0% {
    background-position: 200% center;
  }

  100% {
    background-position: -200% center;
  }
}

/* Tag line - Compact */
.tagline {
  margin: 0 0 14px 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  letter-spacing: 0.3px;
}

/* Skin selector styling - Compact */
.skin-selector {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.skin-selector label {
  display: block;
  font-weight: 600;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.skin-selector select {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #2a3a4a, #1e2a3a);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.skin-selector select:hover {
  background: linear-gradient(135deg, #3a4a5a, #2e3a4a);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.skin-selector select:focus {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(76, 175, 80, 0.3),
    0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Game buttons - Start & Restart - Compact */
#start-btn,
#restart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: white;
  border: none;
  border-radius: 25px;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#start-btn {
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  box-shadow:
    0 8px 24px rgba(76, 175, 80, 0.4),
    0 4px 8px rgba(0, 0, 0, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

#start-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.25),
      transparent);
  transition: 0.5s;
}

#start-btn:hover::before {
  left: 100%;
}

#start-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 12px 32px rgba(76, 175, 80, 0.5),
    0 6px 12px rgba(0, 0, 0, 0.25),
    inset 0 2px 0 rgba(255, 255, 255, 0.25);
}

#start-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow:
    0 4px 12px rgba(76, 175, 80, 0.3),
    inset 0 2px 0 rgba(0, 0, 0, 0.1);
}

#restart-btn {
  background: linear-gradient(135deg, #2196f3 0%, #1565c0 100%);
  box-shadow:
    0 8px 24px rgba(33, 150, 243, 0.4),
    0 4px 8px rgba(0, 0, 0, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

#restart-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.25),
      transparent);
  transition: 0.5s;
}

#restart-btn:hover::before {
  left: 100%;
}

#restart-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 12px 32px rgba(33, 150, 243, 0.5),
    0 6px 12px rgba(0, 0, 0, 0.25);
}

#restart-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Button icon animation - Compact */
.btn-icon {
  font-size: 14px;
  transition: transform 0.3s ease;
}

#start-btn:hover .btn-icon {
  transform: translateX(3px);
}

#restart-btn:hover .btn-icon {
  animation: spinIcon 0.6s ease;
}

@keyframes spinIcon {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Instructions display - Compact */
.menu-instructions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.menu-instructions span {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.3s ease;
}

.menu-instructions span:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* Game Over specific styles - Compact */
.gameover-title {
  margin: 0 0 12px 0;
  font-size: 22px;
  font-weight: 800;
  color: #ff5252;
  text-shadow:
    0 0 12px rgba(255, 82, 82, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.3);
  animation: shakeThenGlow 0.5s ease-out;
}

@keyframes shakeThenGlow {

  0%,
  100% {
    transform: translateX(0);
  }

  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-4px);
  }

  20%,
  40%,
  60%,
  80% {
    transform: translateX(4px);
  }
}

/* Final score container - Compact */
.final-score-container {
  background: linear-gradient(135deg,
      rgba(255, 215, 0, 0.12),
      rgba(255, 215, 0, 0.04));
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 12px;
  padding: 12px 20px;
  margin-bottom: 10px;
}

.final-score-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.final-score-value {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(180deg, #ffd700, #ffaa00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  animation: scorePopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scorePopIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* High score display in game over - Compact */
.high-score-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 10px;
}

.trophy {
  font-size: 18px;
  animation: trophyBounce 1.5s ease-in-out infinite;
}

@keyframes trophyBounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

/* New record celebration - Compact */
.new-record {
  font-size: 13px;
  font-weight: 700;
  color: #ffd700;
  margin-bottom: 12px;
  padding: 6px 14px;
  background: linear-gradient(90deg,
      rgba(255, 215, 0, 0.12),
      rgba(255, 215, 0, 0.2),
      rgba(255, 215, 0, 0.12));
  border-radius: 20px;
  animation: newRecordPulse 0.8s ease-in-out infinite alternate;
}

@keyframes newRecordPulse {
  0% {
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.25);
    transform: scale(1);
  }

  100% {
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.5);
    transform: scale(1.02);
  }
}

/* Secondary button (Main Menu) - Compact */
.secondary-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Speed Debug Overlay - Enhanced game styling */
#debug-overlay {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 8px;
  padding: 4px 12px;
  background: linear-gradient(135deg,
      rgba(76, 175, 80, 0.35),
      rgba(46, 125, 50, 0.3));
  color: #fff;
  font-size: 11px;
  border-radius: 15px;
  border: 1px solid rgba(76, 175, 80, 0.4);
  z-index: 60;
  pointer-events: none;
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.25),
    0 0 6px rgba(76, 175, 80, 0.2);
  font-weight: 700;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ========== COIN & SHOP UI ========== */

/* Coin Counter in Game */
#coin-counter-display {
  position: absolute;
  top: 80px;
  left: 32px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 12px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
}

/* Total Coin Display (Menu) */
.total-coin-display {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(15, 23, 42, 0.85);
  padding: 6px 12px;
  border-radius: 20px;
  color: #ffd700;
  font-size: 1rem;
  font-weight: bold;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 215, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.total-coin-display.shake {
  animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-4px, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(4px, 0, 0);
  }
}

/* Shop Container */
.shop-container {
  width: 100%;
  margin: 10px 0 15px 0;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.shop-title {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-align: left;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 4px;
}

.shop-grid::-webkit-scrollbar {
  width: 4px;
}

.shop-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

/* Skin Card */
.skin-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.skin-card:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
}

.skin-card.selected {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.15);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
}

.skin-card.locked .skin-preview {
  filter: grayscale(1) brightness(0.6);
}

.skin-preview {
  width: 40px;
  height: 40px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skin-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.skin-name {
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 4px;
}

.price-tag {
  font-size: 10px;
  color: #ffd700;
  margin-bottom: 6px;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 10px;
}

.shop-btn {
  width: 100%;
  padding: 4px;
  border-radius: 5px;
  border: none;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  background: #475569;
  color: #fff;
  text-transform: uppercase;
}

.shop-btn.active {
  background: #8b5cf6;
}

.skin-card.locked:not(.selected) .shop-btn {
  background: #10b981;
}

/* Final Coins Container in Game Over */
.final-coins-container {
  font-size: 14px;
  font-weight: 700;
  color: #ffd700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 215, 0, 0.08);
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.coin-icon {
  font-size: 16px;
}