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

body {
  font-family: "Georgia", serif;
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow: hidden;
}

.game-container {
  display: flex;
  gap: 20px;
  max-width: 1400px;
  width: 100%;
}

.left-panel {
  flex: 1;
  background: linear-gradient(135deg, #8b4513 0%, #654321 100%);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.3);
  border: 4px solid #3e2723;
  position: relative;
}

.left-panel::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 2px solid rgba(139, 69, 19, 0.5);
  border-radius: 10px;
  pointer-events: none;
}

.wood-texture {
  background-image: repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.1) 2px,
      rgba(0, 0, 0, 0.1) 4px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 10px,
      rgba(0, 0, 0, 0.05) 10px,
      rgba(0, 0, 0, 0.05) 20px
    );
}

.game-area {
  flex: 2;
  background: #fff6d6;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
}

h1 {
  text-align: center;
  color: #fff8dc;
  margin-bottom: 10px;
  font-size: 1.8em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-family: "Georgia", serif;
}

.subtitle {
  text-align: center;
  font-size: 1em;
  color: #f5deb3;
  margin-bottom: 20px;
  font-style: italic;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.profile-section {
  background: rgba(101, 67, 33, 0.6);
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 2px solid #3e2723;
}

.profile-section label {
  display: block;
  color: #fff8dc;
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 14px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.profile-section input {
  width: 100%;
  padding: 10px;
  border: 2px solid #3e2723;
  border-radius: 8px;
  font-size: 14px;
  background: #fff8dc;
  font-family: "Georgia", serif;
}

.stats-section {
  background: rgba(101, 67, 33, 0.6);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 2px solid #3e2723;
}

.stats-section h3 {
  color: #fff8dc;
  margin-bottom: 15px;
  text-align: center;
  font-size: 1.2em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(62, 39, 35, 0.5);
  font-size: 14px;
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-label {
  color: #f5deb3;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.stat-value {
  color: #fff8dc;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.message-box {
  background: rgba(101, 67, 33, 0.6);
  border-left: 4px solid #ffd700;
  padding: 15px;
  border-radius: 8px;
  color: #fff8dc;
  font-weight: 500;
  min-height: 80px;
  margin-bottom: 20px;
  font-size: 14px;
  border: 2px solid #3e2723;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.reset-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #8b4513, #654321);
  color: #fff8dc;
  border: 2px solid #3e2723;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  font-family: "Georgia", serif;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.reset-btn:hover {
  background: linear-gradient(135deg, #654321, #8b4513);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.training-arena {
  position: relative;
  height: 400px;
  background: linear-gradient(180deg, #87ceeb 0%, #4682b4 100%);
  border-radius: 15px;
  margin-bottom: 30px;
  overflow: hidden;
  border: 4px solid #2d3748;
  transition: all 0.5s ease;
}

/* Nation-specific backgrounds */
.training-arena.water-nation {
  background-image: url("water-tribe-atla-cropped.jpeg");
  background-size: 100%;
}

.training-arena.earth-nation {
  background-image: url("Earth_Kingdom_Royal_Palace.jpeg");
  background-size: 80%;
  background-position: center;
}

.training-arena.fire-nation {
  background-image: url("avatar_firelordthrone_color.webp");
  background-size: 65%;
  background-position: center;
}

.training-arena.air-nation {
  background-image: url("Restored_Eastern_Air_Temple.jpeg");
  background-size: 100%;
  background-position: center;
}

.target-zone {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  cursor: crosshair;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

.target-zone:hover {
  transform: scale(1.2);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

.projectile {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 25px;
  pointer-events: none;
  animation: shoot 0.5s linear forwards;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

@keyframes shoot {
  from {
    bottom: 20px;
    opacity: 1;
    transform: scale(0.5);
  }
  to {
    bottom: 400px;
    opacity: 0;
    transform: scale(1.5);
  }
}

.explosion {
  position: absolute;
  font-size: 60px;
  pointer-events: none;
  animation: explode 0.6s ease-out forwards;
}

@keyframes explode {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: scale(2) rotate(180deg);
    opacity: 0;
  }
}

.elements-control {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.element-btn {
  padding: 15px;
  border: 3px solid transparent;
  border-radius: 12px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  color: white;
  position: relative;
  font-family: "Georgia", serif;
}

.element-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.element-btn.active {
  border-color: #ffd700;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
  transform: scale(1.05);
}

.water {
  background: linear-gradient(135deg, #1e40af, #1e3a8a);
}
.earth {
  background: linear-gradient(135deg, #15803d, #166534);
}
.fire {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}
.air {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.game-instructions {
  text-align: center;
  color: #4a5568;
  font-size: 16px;
  margin-bottom: 20px;
  padding: 15px;
  background: #e5d0a7;
  border-radius: 10px;
  border-left: 4px solid #654321;
  font-family: "Georgia", serif;
}

.timer-bar {
  width: 100%;
  height: 10px;
  background: #fff8dc;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 2px solid #2d3748;
}

.timer-fill {
  height: 100%;
  background: linear-gradient(90deg, #48bb78, #38a169);
  transition: width 0.1s linear;
}

.combo-indicator {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 32px;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
  animation: pulse 0.5s ease-in-out;
  font-family: "Georgia", serif;
}

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