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

body {
  min-height: 100vh;
  background: #090d1c;
  color: white;
  font-family: Arial, sans-serif;
  padding: 16px;
}

.game {
  width: 100%;
  max-width: 900px;
  margin: auto;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0 25px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand span {
  font-size: 38px;
}

.brand h1 {
  font-size: 24px;
  letter-spacing: 3px;
}

.brand small {
  font-size: 10px;
  color: #91a2c8;
  letter-spacing: 3px;
}

.tag {
  background: #222c49;
  color: #9bb6ff;
  padding: 10px 15px;
  border-radius: 20px;
  font-size: 11px;
}

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

.stats > div {
  min-width: 0;
  background: #171f38;
  border: 1px solid #283453;
  border-radius: 15px;
  padding: 13px;
}

.stats small {
  color: #8999bd;
  font-size: 10px;
  letter-spacing: 1px;
}

.stats strong {
  display: block;
  margin-top: 7px;
  font-size: 24px;
  white-space: nowrap;
}

#lives {
  font-size: 17px;
  letter-spacing: -2px;
}

.arena {
  height: min(65vh, 580px);
  min-height: 350px;
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid #34466d;
  background:
    radial-gradient(ellipse at 50% 100%, #253c64, transparent 65%),
    linear-gradient(160deg, #17213e, #0b1227);
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #070b19d9;
  padding: 20px;
}

.overlay.hidden {
  display: none;
}

.panel {
  width: 100%;
  max-width: 390px;
  text-align: center;
  background: #182442;
  border: 1px solid #34476f;
  border-radius: 22px;
  padding: 30px 22px;
}

.fruits {
  font-size: 52px;
  margin-bottom: 20px;
}

.panel h2 {
  font-size: 25px;
  letter-spacing: 2px;
}

.panel p {
  color: #a6b5d2;
  font-size: 14px;
  line-height: 1.6;
  margin: 15px 0;
}

input {
  width: 100%;
  padding: 15px;
  border: 1px solid #40557e;
  border-radius: 12px;
  background: #0d1730;
  color: white;
  outline: none;
  margin: 8px 0 12px;
  font-size: 15px;
}

input:focus {
  border-color: #6997ff;
}

button {
  width: 100%;
  padding: 16px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: linear-gradient(100deg, #3778ff, #8655ff);
  font-weight: bold;
  cursor: pointer;
}

button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.status {
  min-height: 20px;
  overflow-wrap: anywhere;
}

footer {
  text-align: center;
  color: #7888aa;
  font-size: 10px;
  letter-spacing: 1px;
  padding: 20px 5px;
}

@media (max-width: 500px) {
  .arena {
    height: 65vh;
    min-height: 380px;
  }

  .stats {
    gap: 6px;
  }

  .stats > div {
    padding: 9px 6px;
  }

  .stats small {
    font-size: 9px;
  }

  .stats strong {
    font-size: 19px;
  }

  #lives {
    font-size: 14px;
  }
}
