* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0f1115;
  color: #eaeaea;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 64px;
}
header {
  text-align: center;
  margin-bottom: 24px;
}
h1 { margin: 0 0 8px; font-size: 1.6rem; }
.subtitle { color: #9aa0a6; font-size: 0.95rem; }
nav a {
  color: #8ab4f8;
  text-decoration: none;
  font-size: 0.9rem;
}
nav a:hover { text-decoration: underline; }

.progress {
  color: #9aa0a6;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.round {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.cards .card {
  flex: 1 1 200px;
}

.card {
  background: #1b1e25;
  border: 1px solid #2a2e37;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.card h2 { margin: 0; font-size: 1.1rem; color: #cfd2d8; }
audio { width: 100%; }
.listen-status { font-size: 0.85rem; color: #9aa0a6; }

button {
  appearance: none;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.05s ease, opacity 0.2s ease;
}
button:active { transform: scale(0.97); }
button:disabled { opacity: 0.5; cursor: default; }

.vote-btn {
  background: #8ab4f8;
  color: #0f1115;
  width: 100%;
}
.vote-btn:hover:not(:disabled) { background: #a9c8fb; }

.reveal {
  background: #1b1e25;
  border: 1px solid #2a2e37;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}
.reveal .winner { font-size: 1.1rem; margin-bottom: 6px; }
.reveal .detail { color: #9aa0a6; font-size: 0.9rem; margin-bottom: 16px; }

.next-btn {
  background: #34a853;
  color: #0f1115;
}
.next-btn:hover { background: #4dc26b; }

.done {
  text-align: center;
}
.done a {
  display: inline-block;
  margin-top: 16px;
  background: #8ab4f8;
  color: #0f1115;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

/* results page */
.bar-row {
  width: 100%;
  max-width: 720px;
  margin-bottom: 24px;
}
.bar-row .label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: #cfd2d8;
}
.bar-track {
  display: flex;
  height: 22px;
  border-radius: 6px;
  overflow: hidden;
  background: #2a2e37;
  margin-bottom: 8px;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.legend-item {
  font-size: 0.85rem;
  color: #cfd2d8;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.pair-result {
  width: 100%;
  max-width: 720px;
  background: #1b1e25;
  border: 1px solid #2a2e37;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.pair-result h3 { margin: 0 0 10px; font-size: 1rem; color: #cfd2d8; }

.empty-state { color: #9aa0a6; text-align: center; margin-top: 40px; }

/* admin page */
.admin-lock {
  display: flex;
  gap: 10px;
  align-items: center;
}
.admin-app {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.admin-error { color: #f28b82; font-size: 0.85rem; margin-top: 8px; }
.admin-meta { color: #9aa0a6; font-size: 0.85rem; margin-left: 6px; }

input[type="text"],
input[type="password"] {
  background: #12141a;
  border: 1px solid #2a2e37;
  color: #eaeaea;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  width: 100%;
}
input[type="file"] { color: #cfd2d8; flex: 1; }

#addForm { display: flex; flex-direction: column; gap: 10px; }
.provider-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.provider-row input[type="text"] { flex: 1; }

.song-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #2a2e37;
}
.song-row:last-child { border-bottom: none; }

.delete-btn {
  background: #f28b82;
  color: #0f1115;
  padding: 6px 14px;
  font-size: 0.85rem;
}
.delete-btn:hover { background: #f6a9a1; }
