* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background: linear-gradient(#1e1e1e, #343434);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.game-container {
  max-width: 700px;
  width: 100%;
  background: #2a2a2a;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  text-align: center;
}

h1 {
  margin-bottom: 20px;
  font-size: 2rem;
  color: #ffd700;
}

.battlefield {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.character {
  width: 45%;
  margin-bottom: 20px;
}

.character img {
  width: 100%;
  max-width: 150px;
  margin-bottom: 10px;
  transition: transform 0.2s;
}

.health-bar {
  height: 20px;
  background-color: #555;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 5px;
}

.health {
  height: 100%;
  background-color: #4caf50;
  transition: width 0.3s ease-in-out;
}

.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#attack-btn {
  padding: 10px 30px;
  font-size: 18px;
  background-color: #e63946;
  border: none;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
  margin-bottom: 20px;
}

#attack-btn:hover {
  background-color: #c72b3b;
}

#message {
  font-size: 1.1rem;
  font-style: italic;
  color: #aaa;
  text-align: center;
}

.victory-screen {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: rgba(0,0,0,0.9);
  color: white;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 99;
}

.victory-screen h2 {
  font-size: 3rem;
  margin-bottom: 20px;
}

.victory-screen button {
  padding: 10px 20px;
  font-size: 1.1rem;
  background: #ffd700;
  border: none;
  border-radius: 8px;
  color: #000;
  cursor: pointer;
}

/* Shake effect */
.shake {
  animation: shake 0.3s;
}

@keyframes shake {
  0% { transform: translate(1px, 1px); }
  20% { transform: translate(-1px, -2px); }
  40% { transform: translate(-3px, 0px); }
  60% { transform: translate(3px, 2px); }
  80% { transform: translate(1px, -1px); }
  100% { transform: translate(1px, 1px); }
}

@media (max-width: 600px) {
  .character {
    width: 100%;
  }
}
