body {
  font-family: 'Press Start 2P', cursive;
  background: linear-gradient(180deg, #f5e8c7 0%, #d4a017 100%);
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.game-wrapper {
  width: 100%;
  max-width: 400px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

#message {
  font-size: 1rem;
  color: #fff;
  text-shadow: 2px 2px 4px #000;
  text-align: center;
  margin: 20px 0;
  animation: pulse 1.5s infinite;
}

.players {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  justify-content: space-between;
}

.player-left, .player-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

#score1, #score2 {
  font-size: 0.9rem;
  color: #fff;
  text-shadow: 1px 1px 2px #000;
  margin: 10px 0;
}

#chrono1, #chrono2 {
  font-size: 0.8rem;
  color: #ff0;
  text-shadow: 1px 1px 2px #000;
  margin: 5px 0;
}

.touch-zone {
  width: 100%;
  height: 40%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #fff;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.1s, background 0.2s, filter 0.2s;
  cursor: pointer; /* For desktop hover effect */
}

.touch-zone:active, .touch-zone.active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.3);
  filter: brightness(1.2);
}

.cowboy {
  width: 80px;
  height: 80px;
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform 0.2s, filter 0.2s;
}

.cowboy.idle {
  background-image: url('cowboy_idle.png');
}

.cowboy.tir {
  background-image: url('cowboy_shoot.png');
  transform: scale(1.1);
  filter: drop-shadow(0 0 5px #ff0);
}

.cowboy.mort {
  background-image: url('cowboy_dead.png');
  transform: scale(0.9);
  filter: grayscale(80%) brightness(0.7);
}

.cowboy.rate {
  background-image: url('cowboy_miss.png');
  transform: rotate(-10deg);
  filter: drop-shadow(0 0 5px #f00);
}

.victory-message {
  position: absolute;
  bottom: 10px;
  color: #0f0;
  font-size: 0.9rem;
  text-shadow: 1px 1px 2px #000;
  animation: fadeIn 0.5s;
}

.defeat-message {
  position: absolute;
  bottom: 10px;
  color: #f00;
  font-size: 0.9rem;
  text-shadow: 1px 1px 2px #000;
  animation: fadeIn 0.5s;
}

.mute-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: #444;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.mute-btn:hover, .mute-btn:active {
  transform: scale(1.1);
  background: #666;
}

.shake {
  animation: shake 0.3s;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 400px) {
  #message { font-size: 0.8rem; }
  #score1, #score2 { font-size: 0.7rem; }
  #chrono1, #chrono2 { font-size: 0.6rem; }
  .cowboy { width: 60px; height: 60px; }
}

@media (min-width: 768px) {
  .game-wrapper { max-width: 600px; }
  #message { font-size: 1.2rem; }
  .cowboy { width: 100px; height: 100px; }
}