* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #1C1B1A;
  color: #F2EFE9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

h1 {
  font-family: "Fredoka", sans-serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: #F2EFE9;
}

h1::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  background: #E8804A;
  margin-top: 16px;
  border-radius: 4px;
}

#admin-btn {
  margin-top: 24px;
}

form {
  margin: 24px 0;
  padding: 22px;
  background: #272524;
  border: 1px solid #3A3733;
  border-radius: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

form br {
  display: none;
}

input, select {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 14px;
  border: 1px solid #3A3733;
  border-radius: 12px;
  background: #1C1B1A;
  color: #F2EFE9;
}

input::placeholder {
  color: #9C9890;
}

input:focus, select:focus {
  outline: none;
  border-color: #E8804A;
}

input[type="number"] {
  width: 90px;
}

select {
  cursor: pointer;
}

button {
  font-family: "Fredoka", sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border: none;
  border-radius: 999px;
  background: #E8804A;
  color: #1C1B1A;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

button:hover {
  background: #F2956A;
}

button:active {
  transform: scale(0.97);
}

button.delete-btn {
  background: transparent;
  color: #9C9890;
  border: 1px solid #3A3733;
  font-family: inherit;
  font-weight: 400;
  padding: 6px 14px;
  font-size: 13px;
}

button.delete-btn:hover {
  background: #3A3733;
  color: #F2EFE9;
}

#leaderboard {
  margin-top: 32px;
  background: #272524;
  border: 1px solid #3A3733;
  border-radius: 20px;
  padding: 8px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9C9890;
  padding: 14px 16px 12px;
}

td {
  padding: 14px 16px;
  border-top: 1px solid #3A3733;
  font-size: 15px;
}

tbody tr:hover {
  background: #2E2B29;
}

tbody tr:first-child td {
  font-weight: 600;
  color: #F2EFE9;
}

tbody tr:first-child td:first-child {
  color: #E8804A;
  font-family: "Fredoka", sans-serif;
}

tr:first-child td {
  border-top: none;
}

tbody tr td:last-child {
  text-align: right;
}

.tabs {
  display: flex;
  align-items: bottom;
  gap: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #3A3733;
}

.tabs a {
  font-family: "Fredoka", sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #9C9890;
  padding: 10px 18px;
  border-radius: 999px 999px 0 0;
  transition: color 0.15s ease, background 0.15s ease;
}

.tabs a:hover {
  color: #F2EFE9;
  background: #272524;
}

.tabs a.active {
  color: #1C1B1A;
  background: #E8804A;
}

#history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.match-card {
  background: #272524;
  border: 1px solid #3A3733;
  border-radius: 16px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.match-players {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 16px;
}

.match-players .winner {
  font-weight: 600;
  color: #F2EFE9;
}

.match-players span:not(.winner):not(.score) {
  color: #9C9890;
}

.match-players .score {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  color: #E8804A;
  font-size: 15px;
  background: #1C1B1A;
  padding: 4px 12px;
  border-radius: 999px;
}

.match-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #9C9890;
}

.elo-change {
  font-weight: 600;
  color: #E8804A;
}

.empty-state {
  color: #9C9890;
  font-style: italic;
  padding: 20px 0;
}

.logo {
  height: 30px;
  width: auto;
  margin-right: 12px;
  border-radius: 6px;
}