* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f4f6;
  color: #111827;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

main {
  width: min(100%, 720px);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  padding: 28px;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(2rem, 2.5vw, 2.5rem);
}

.add-player,
.controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.add-player label {
  line-height: 2.4;
}

.add-player input {
  flex: 1;
  min-width: 160px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  font-size: 1rem;
}

button {
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  background: #2563eb;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s ease;
}

button:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

button:hover:not(:disabled) {
  background: #1d4ed8;
}

button.edit {
  background: #059669;
}

button.edit:hover:not(:disabled) {
  background: #047857;
}

button.delete {
  background: #dc2626;
}

button.delete:hover:not(:disabled) {
  background: #b91c1c;
}

.scoreboard {
  display: grid;
  gap: 14px;
}

.player-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.player-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.player-name {
  font-size: 1.1rem;
  font-weight: 700;
}

.player-wins {
  font-size: 0.95rem;
  color: #4b5563;
}

.player-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.player-actions button {
  padding: 10px 12px;
  min-width: 110px;
}

.empty-state {
  margin: 0;
  color: #6b7280;
}
