:root {
  font-family: "Poppins", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #fde68a, #f97316 45%, #b45309 100%);
  color: #0f172a;
}

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

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.layout {
  width: min(1100px, 100%);
  backdrop-filter: blur(4px);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.35);
  padding: 3rem;
  display: grid;
  gap: 2.5rem;
}

.intro,
.outro {
  text-align: center;
  display: grid;
  gap: 1.5rem;
}

.intro h1 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.intro p {
  font-size: 1.2rem;
  line-height: 1.6;
  color: #475569;
}

button {
  border: none;
  border-radius: 9999px;
  padding: 0.9rem 2.6rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: linear-gradient(135deg, #facc15, #f97316);
  color: #0f172a;
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.45);
}

button:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 16px 35px rgba(248, 113, 31, 0.6);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.battle {
  display: grid;
  gap: 2rem;
}

.battle__header {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.fighter {
  background: rgba(15, 23, 42, 0.7);
  border-radius: 20px;
  padding: 1.5rem;
  position: relative;
  color: #f8fafc;
  display: grid;
  gap: 1rem;
  justify-items: center;
}

.fighter h2 {
  font-size: 1.6rem;
  letter-spacing: 0.08em;
}

.fighter img {
  width: clamp(160px, 20vw, 240px);
  object-fit: contain;
}

.hp-bar {
  width: 100%;
  height: 18px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  overflow: hidden;
}

.hp-bar__value {
  height: 100%;
  width: 100%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  transition: width 0.4s ease;
}

.battle__log {
  background: rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 1.5rem;
  min-height: 110px;
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #1e293b;
}

.battle__actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
}

.action {
  padding: 1.2rem;
  font-size: 1.05rem;
}

.outro h2 {
  font-size: 2.4rem;
}

.outro p {
  color: #334155;
  font-size: 1.1rem;
}

#kevinSprite {
  width: 240px;
  height: 300px;

  background-image: url("public/Kevin/monkey_d_kevin.png");
  background-repeat: no-repeat;

  margin: 5px;
  image-rendering: pixelated;
  animation: kevinSprite infinite 600ms step-start;
}

@keyframes kevinSprite {
  0% {
    background-position: 0 0;
  }
  14.28% {
    background-position: -240px 0;
  }
  28.57% {
    background-position: -480px 0;
  }
  42.85% {
    background-position: -720px 0;
  }
  57.14% {
    background-position: -960px 0;
  }
  71.43% {
    background-position: -1200px 0;
  }
  85.71% {
    background-position: -1440px 0;
  }
}

#log {
  margin: 0 auto;
}