* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef0f2;
  color: #1a1a1a;
  margin: 0;
  padding: 24px 16px 64px;
}

.container {
  max-width: 640px;
  margin: 0 auto;
}

.container.wide {
  max-width: 900px;
}

.bracket {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.bracket-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 230px;
  flex: 1;
}

.bracket-column:nth-child(2) {
  justify-content: space-around;
}

.bracket-column:nth-child(3) {
  justify-content: center;
}

.bracket .card {
  margin-bottom: 0;
}

h1 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.subtitle {
  color: #666;
  margin-top: 0;
  margin-bottom: 20px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.tab-button {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 999px;
  background: #d9dde1;
  font-weight: 600;
  cursor: pointer;
}

.tab-button.active {
  background: #1a1a1a;
  color: #fff;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.card.locked {
  opacity: 0.7;
}

.card-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 8px;
}

.matchup {
  display: flex;
  gap: 10px;
}

.team-option {
  flex: 1;
  padding: 12px;
  border: 2px solid #d9dde1;
  border-radius: 10px;
  background: #fff;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.team-option.selected {
  border-color: #1a1a1a;
  background: #f0f0f0;
}

.team-option.correct {
  border-color: #1e9e5a;
  background: #e6f7ee;
}

.team-option.incorrect {
  border-color: #d94f4f;
  background: #fbe9e9;
}

.team-option:disabled {
  cursor: default;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #d9dde1;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 16px;
}

.score-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.score-row input {
  margin-bottom: 0;
}

button.primary {
  width: 100%;
  padding: 14px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

button.primary:disabled {
  background: #aaa;
  cursor: default;
}

.status-msg {
  text-align: center;
  margin-top: 12px;
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #eee;
}

th {
  background: #f5f5f5;
  font-size: 0.85rem;
  color: #666;
}

tr:last-child td {
  border-bottom: none;
}

.rank {
  font-weight: 700;
  width: 32px;
}

.footer {
  text-align: center;
  font-size: 0.75rem;
  color: #999;
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.footer-icon {
  width: 14px;
  height: 14px;
  vertical-align: middle;
}
