/* styles.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: fixed;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: #111;
  color: #fff;
  height: 100dvh;
}

.screen {
  width: 100%;
  height: 100%;
  text-align: center;
  padding: 20px; /* Adiciona um respiro nas laterais */
}

/* --- Tela de Seleção de Personagem --- */
#character-selection {
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centraliza verticalmente */
  align-items: center;
  gap: 20px;
}

#character-selection h1 {
  margin: 0;
}

/* --- Novo Contêiner dos Personagens --- */
.character-options-container {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.character-option {
  cursor: pointer;
  border: 3px solid transparent;
  padding: 15px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.character-option:hover {
  background-color: #333;
  border-color: #eee;
}

.character-option img {
  width: 100px;
  height: 100px;
}

/* --- Seletor de Dificuldade --- */
#difficulty-selection {
  margin-bottom: 20px;
}

#difficulty-selection h2 {
  margin-bottom: 15px;
  font-size: 1.5em;
  color: #ccc;
}

.difficulty-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.difficulty-btn {
  padding: 10px 20px;
  font-size: 1em;
  font-weight: bold;
  color: #fff;
  background-color: #444;
  border: 2px solid #666;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.difficulty-btn:hover {
  background-color: #555;
  border-color: #888;
}

.difficulty-btn.active {
  background-color: #a88532;
  border-color: #f0c363;
  box-shadow: 0 0 10px #f0c363;
}

/* --- Painel de Preview dos Power-ups --- */
#powerup-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  width: 100%;
  max-width: 400px;
}

.powerup-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 80px;
}

.powerup-item img {
  width: 40px;
  height: 40px;
  margin-bottom: 5px;
}

.powerup-item p {
  font-size: 0.8em;
  color: #ddd;
}

/* --- Tela do Jogo --- */
#game-screen {
  position: relative;
  width: 100%;
  height: 100%;
  display: none;
  padding: 0; /* Remove o padding da tela do jogo */
}

#gameCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #222;
  z-index: 1;
}

#hud {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  font-size: 1.2em;
  pointer-events: none;
  z-index: 20;
}

.life-heart {
  width: 24px;
  height: 24px;
  background: url('images/heart_small.png') no-repeat center center;
  background-size: contain;
}

.message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px 40px;
  background-color: rgba(0, 0, 0, 0.8);
  border: 2px solid #fff;
  border-radius: 10px;
  font-size: 2em;
  cursor: pointer;
  z-index: 30;
}

#joystick-zone {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  z-index: 10;
}

@media (min-width: 1024px) {
  #joystick-zone {
    display: none;
  }
}