* {
  font-family: "Nunito Sans", system-ui, sans-serif;
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 32px 16px;
  background:
    radial-gradient(circle at top left, rgba(76, 126, 243, 0.22), transparent 28rem),
    linear-gradient(135deg, #0b1020, #111827);
  color: #f8fafc;
}

.game-container {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

header {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

h1 {
  font-size: clamp(2.3rem, 6vw, 4rem);
  line-height: 1;
  margin: 0;
}

.rounds {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}

.round-label {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: #93c5fd;
}

.guessing-area {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.guess {
  min-width: 300px;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.computer-guess {
  background: rgba(148, 163, 184, 0.14);
}

.human-guess {
  border-color: rgba(96, 165, 250, 0.45);
}

.guess-title,
.target-guess {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.guess-title {
  margin-bottom: 24px;
}

.guess-label {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0;
}

.score-label {
  font-size: 0.9rem;
  color: #cbd5e1;
  font-weight: 700;
  margin: 4px 0 0;
}

#computer-guess {
  font-size: 4rem;
  font-weight: 900;
  color: #93c5fd;
  margin-top: 26px;
}

.guess input {
  height: 92px;
  width: 92px;
  font-size: 2.2rem;
  font-weight: 900;
  text-align: center;
  margin: 0 auto 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #f8fafc;
  color: #0f172a;
}

.number-controls {
  font-size: 0;
  margin-bottom: 22px;
}

.number-control {
  border: 1px solid #60a5fa;
  background: rgba(96, 165, 250, 0.12);
  display: inline-block;
  width: 48px;
  height: 38px;
  font-size: 1.4rem;
  font-weight: 900;
  color: #bfdbfe;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.number-control:hover:not([disabled]) {
  transform: translateY(-2px);
  background: rgba(96, 165, 250, 0.24);
}

.number-controls button[disabled] {
  color: #64748b;
  cursor: default;
}

.left {
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

.right {
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
  border-left-width: 0;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.button {
  background: #60a5fa;
  color: #061015;
  cursor: pointer;
  border-radius: 999px;
  border: none;
  transition: transform 160ms ease, background 160ms ease;
}

.button:hover:not([disabled]) {
  transform: translateY(-2px);
  background: #93c5fd;
}

#guess {
  padding: 18px 24px;
  min-width: 170px;
  height: 58px;
  font-weight: 900;
  font-size: 0.95rem;
}

input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

#next-round {
  width: 190px;
  height: 60px;
  font-size: 1rem;
  font-weight: 900;
  margin: 0 auto 42px;
}

.button[disabled] {
  background: #334155;
  color: #94a3b8;
  cursor: default;
}

.instructions {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  width: 100%;
  display: flex;
  justify-content: space-around;
  gap: 16px;
  padding: 18px;
  flex-wrap: wrap;
}

.instruction {
  width: 190px;
  padding: 8px;
  text-align: center;
  color: #cbd5e1;
}

.instructions h3 {
  font-size: 0.95rem;
  color: #f8fafc;
  margin-bottom: 6px;
}

.winning-text,
.winning-text[disabled] {
  color: #f87171;
  font-weight: 900;
}

@media (max-width: 640px) {
  body {
    padding: 20px 12px;
  }

  .guess {
    min-width: 100%;
  }

  .instructions {
    flex-direction: column;
    align-items: center;
  }
}