body {
  background: #181a1b;
  color: #f5f6fa;
  font-family: "Segoe UI", Arial, sans-serif;
  margin: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.container {
  background: #23272a;
  padding: 2rem 2.5rem;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  text-align: center;
  width: 90vw;
  max-width: 1200px;
}
.hud {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
#game-area {
  position: relative;
  width: 100%;
  height: 70vh;
  background: #2c2f33;
  border-radius: 12px;
  margin: 0 auto 1.5rem auto;
  overflow: hidden;
  border: 2px solid #7289da;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='14' fill='none' stroke='green' stroke-width='1.5'/%3E%3Ccircle cx='16' cy='16' r='2' fill='green'/%3E%3Cline x1='16' y1='4' x2='16' y2='12' stroke='green' stroke-width='1.5'/%3E%3Cline x1='16' y1='20' x2='16' y2='28' stroke='green' stroke-width='1.5'/%3E%3Cline x1='4' y1='16' x2='12' y2='16' stroke='green' stroke-width='1.5'/%3E%3Cline x1='20' y1='16' x2='28' y2='16' stroke='green' stroke-width='1.5'/%3E%3C/svg%3E")
      16 16,
    crosshair;
}

/* Tracking mode styles */
.tracking-target {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 71, 87, 0.5); /* More opaque */
  border: 3px solid #ff4757; /* Thicker border */
  box-shadow: 0 0 20px rgba(255, 71, 87, 0.6); /* Stronger glow */
  transition: all 0.2s ease;
  will-change: transform, left, top;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  perspective: 1000px;
  z-index: 10;
}

.tracking-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ff4757;
  box-shadow: 0 0 10px rgba(255, 71, 87, 0.8);
}

.tracking-cursor {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid white;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 20;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.tracking-target.on-target {
  background: rgba(38, 222, 129, 0.5); /* More opaque */
  border: 3px solid #26de81; /* Thicker border */
  box-shadow: 0 0 25px rgba(38, 222, 129, 0.8); /* Stronger glow */
}

.tracking-target.on-target .tracking-inner {
  background: #26de81;
  box-shadow: 0 0 15px rgba(38, 222, 129, 0.9);
}

.tracking-multiplier {
  position: absolute;
  color: #ffd32a;
  font-size: 24px;
  font-weight: bold;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  animation: multiplierFade 1s forwards;
  z-index: 100;
  transform: translate(-50%, -50%);
}

@keyframes multiplierFade {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -150%) scale(1.5);
  }
}

/* Flick Shot mode styles */
.flick-target {
  position: absolute;
  background: #ff4757;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 15px rgba(255, 71, 87, 0.6);
  animation: flickPulse 0.8s infinite alternate;
  transform-origin: center center;
  will-change: transform, box-shadow;
}

@keyframes flickPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 15px rgba(255, 71, 87, 0.6);
  }
  100% {
    transform: scale(1.1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 71, 87, 0.8);
  }
}

.flick-combo {
  position: absolute;
  top: -20px;
  right: -10px;
  background: #ffa502;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.combo-effect {
  position: absolute;
  color: #ffa502;
  font-size: 24px;
  font-weight: bold;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  animation: comboFade 1s forwards;
  z-index: 100;
  transform: translate(-50%, -50%);
}

@keyframes comboFade {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -100%) scale(1.5);
  }
}

/* Quick Reflex mode styles */
.reflex-mode {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  cursor: pointer;
  transition: background-color 0.01s linear;
  will-change: background-color;
  backface-visibility: hidden;
  -webkit-tap-highlight-color: transparent;
}

.reflex-mode.wait {
  background-color: #ff4757;
  cursor: not-allowed;
}

.reflex-mode.go {
  background-color: #26de81;
}

.reflex-mode.early {
  background-color: #f39c12;
}

.reflex-text {
  font-size: 2.5rem;
  font-weight: bold;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  text-align: center;
  max-width: 80%;
  user-select: none;
}

.reflex-results {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(35, 39, 42, 0.9);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  z-index: 20;
  width: 80%;
  max-width: 500px;
  text-align: center;
}

.reflex-results h2 {
  margin-top: 0;
  color: #7289da;
}

.reflex-results ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  text-align: left;
}

.reflex-results li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
}

.reflex-results li:last-child {
  border-bottom: none;
}

.reflex-results .average {
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid #7289da;
}

.reflex-results button {
  background: #7289da;
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 1rem;
  transition: background 0.2s;
}

.reflex-results button:hover {
  background: #5865f2;
}
.target {
  position: absolute;
  width: 48px;
  height: 48px;
  background: #ff4757;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: background 0.1s;
  will-change: transform, left, top;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  perspective: 1000px;
}
.target:active {
  background: #ffa502;
}
/* Add a pulsating effect for moving targets */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 71, 87, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0);
  }
}

/* Add animation for cursor indicator */
@keyframes cursorPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.7;
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
    box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
  }
}

.cursor-indicator {
  pointer-events: none;
  z-index: 1000;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(255, 255, 255, 0.4) 70%,
    rgba(255, 255, 255, 0) 100%
  );
}

.game-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 15px;
}
.mode-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mode-selector select {
  padding: 0.5rem;
  font-size: 1rem;
  background: #2c2f33;
  color: #fff;
  border: 1px solid #7289da;
  border-radius: 6px;
  cursor: pointer;
}
.button-group {
  display: flex;
  gap: 10px;
}
#start-btn,
#stop-btn {
  padding: 0.7rem 2rem;
  font-size: 1.1rem;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
#start-btn {
  background: #7289da;
}
#start-btn:hover {
  background: #5865f2;
}
#stop-btn {
  background: #f04747;
}
#stop-btn:hover {
  background: #d03737;
}
#stop-btn:disabled {
  background: #666;
  cursor: not-allowed;
}
