@import url("https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;700&display=swap");

:root {
  color-scheme: light;
  --bg: #f7fbff;
  --bg-accent: #dff6ff;
  --ink: #3b2a1a;
  --muted: #6b5b4f;
  --accent: #43c1c8;
  --accent-dark: #289aa1;
  --accent-2: #f3b35a;
  --accent-3: #ff7aa2;
  --outline: #5b2c12;
  --card: #ffffff;
  --shadow: 0 16px 32px rgba(59, 42, 26, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Baloo 2", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, var(--bg-accent), transparent 52%),
    radial-gradient(circle at bottom right, #fff2df, transparent 55%),
    var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.app {
  width: min(980px, 100%);
  background: var(--card);
  border-radius: 28px;
  padding: 26px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 24px;
}

.app__header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.app__eyebrow {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 6px 0 0;
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
}

.scoreboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.player {
  background: linear-gradient(135deg, #eaf9ff, #fff6e7);
  border-radius: 22px;
  padding: 18px 18px 22px;
  display: grid;
  gap: 12px;
  text-align: center;
  border: 3px solid var(--outline);
  box-shadow: 0 6px 0 rgba(91, 44, 18, 0.25);
}

.player__name {
  border: 3px solid var(--outline);
  background: #bff0f6;
  border-radius: 16px;
  padding: 10px 12px;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  color: var(--ink);
  outline: none;
}

.player__name:focus {
  border-color: #2b9aa1;
  box-shadow: 0 0 0 3px rgba(67, 193, 200, 0.35);
}

.player__score {
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 700;
}

.btn {
  border: none;
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
}

.btn:active {
  transform: translateY(3px);
}

.btn--score {
  background: linear-gradient(180deg, #67d6dc, #3fb9c0);
  color: #0b3d40;
  border: 3px solid var(--outline);
  box-shadow: 0 6px 0 var(--outline), 0 12px 20px rgba(67, 193, 200, 0.35);
}

.btn--score:hover {
  background: linear-gradient(180deg, #7be2e6, #4fc4ca);
}

.btn--ghost {
  background: linear-gradient(180deg, #ffd47b, #f4aa45);
  color: #5b2c12;
  border: 3px solid var(--outline);
  box-shadow: 0 6px 0 var(--outline), 0 12px 18px rgba(91, 44, 18, 0.2);
}

.history h2 {
  margin: 0 0 12px;
}

.history__list {
  display: grid;
  gap: 10px;
}

.history__item {
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff7ee;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.95rem;
}

.history__empty {
  color: var(--muted);
  margin: 0;
}

.status {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--muted);
  justify-content: space-between;
}

@media (max-width: 640px) {
  .app {
    padding: 20px;
  }

  .btn {
    width: 100%;
    font-size: 1.1rem;
  }

  .status {
    flex-direction: column;
  }
}
