* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow: hidden;
  background: #0a1a0a;
  user-select: none;
  -webkit-user-select: none;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
}

#game-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  cursor: crosshair;
  touch-action: none;
}

#vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.88) 100%);
  z-index: 10;
}

/* HUD */
#hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  pointer-events: none;
}

#score-display {
  font-size: 2.8rem;
  font-weight: 900;
  color: white;
  font-family: 'Arial Black', 'Arial', sans-serif;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.4), 2px 2px 6px rgba(0, 0, 0, 0.9);
  letter-spacing: 2px;
  min-width: 120px;
}

#lives-display {
  display: flex;
  gap: 6px;
  font-size: 2rem;
}

.life {
  transition: opacity 0.3s, filter 0.3s, transform 0.3s;
  display: inline-block;
}

.life.lost {
  opacity: 0.2;
  filter: grayscale(1);
  transform: scale(0.8);
}

/* Combo display */
#combo-display {
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 30;
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffdd00;
  font-family: 'Arial Black', 'Arial', sans-serif;
  text-shadow: 0 0 30px rgba(255, 220, 0, 0.9), 2px 2px 6px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
}

#combo-display.visible {
  opacity: 1;
}

/* Buttons */
.button-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 30;
  display: flex;
  gap: 10px;
}

.game-button {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.55);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background 0.2s, border-color 0.2s;
}

.game-button:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

.modal-content {
  background: rgba(10, 30, 10, 0.55);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(120, 220, 120, 0.18);
  border-radius: 20px;
  padding: 36px 32px;
  max-width: 420px;
  width: 92%;
  text-align: center;
  color: white;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.modal-content h2 {
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 12px;
  color: #90ff90;
  text-shadow: 0 0 25px rgba(100, 255, 100, 0.6);
  font-family: 'Arial Black', 'Arial', sans-serif;
  letter-spacing: 1px;
}

.modal-desc {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 16px;
  font-size: 1rem;
}

.rules {
  text-align: left;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 4px;
}

.rule {
  padding: 5px 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.9rem;
  line-height: 1.4;
}

.score-stats {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-bottom: 22px;
}

.score-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 14px 28px;
  flex: 1;
}

.score-stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.score-stat-value {
  font-size: 2.2rem;
  font-weight: 900;
  color: #90ff90;
  font-family: 'Arial Black', 'Arial', sans-serif;
}

.new-highscore-badge {
  background: linear-gradient(135deg, #ffaa00, #ff6600);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 16px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 14px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  box-shadow: 0 4px 15px rgba(255, 150, 0, 0.4);
  animation: pulse-badge 1s ease-in-out infinite alternate;
}

@keyframes pulse-badge {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

.btn-primary {
  background: linear-gradient(135deg, #2d8a2d, #1a5a1a) !important;
  border-color: #2d8a2d !important;
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 1rem;
  transition: background 0.2s, transform 0.1s !important;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3daa3d, #2d8a2d) !important;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Outline button (Home / Bestenliste) */
.sf-btn-outline {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s !important;
}

.sf-btn-outline:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: white !important;
}

/* Close button */
.sf-close-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
  transition: color 0.2s, background 0.2s;
}

.sf-close-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

/* Leaderboard list */
.sf-lb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.sf-lb-item:last-child {
  border-bottom: none;
}

.sf-lb-item.sf-lb-me {
  background: rgba(100, 255, 100, 0.08);
  border-radius: 8px;
  padding-left: 8px;
  padding-right: 8px;
}

.sf-lb-rank {
  width: 32px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.sf-lb-name {
  flex: 1;
  font-weight: 700;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: white;
}

.sf-lb-score {
  font-weight: 900;
  font-size: 1rem;
  color: #90ff90;
  flex-shrink: 0;
}

.sf-muted {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.9rem;
}
