* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

:root {
  --bg: #101018;
  --card: #1b1b28;
  --text: #f2f2f7;
  --muted: #9a9ab0;
  --accent: #fbad50;
  --ok: #4d9de0;
  --great: #fb8b24;
  --goat: #ffd93d;
  --radius: 18px;
}

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.app {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  justify-content: center;
}

.tagline {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: center;
}

.team-name {
  font-size: clamp(2rem, 8vw, 3.2rem);
  font-weight: 800;
  text-align: center;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.vote-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 560px) {
  .vote-buttons {
    flex-direction: row;
  }
}

.vote-btn {
  flex: 1;
  min-height: 92px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.12s, border-color 0.15s, background 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.vote-btn .emoji {
  font-size: 2rem;
}

.vote-btn:active {
  transform: scale(0.96);
}

.vote-btn[data-rating="ok"].selected {
  border-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 18%, var(--card));
}

.vote-btn[data-rating="great"].selected {
  border-color: var(--great);
  background: color-mix(in srgb, var(--great) 18%, var(--card));
}

.vote-btn[data-rating="goat"].selected {
  border-color: var(--goat);
  background: color-mix(in srgb, var(--goat) 18%, var(--card));
}

.status {
  text-align: center;
  color: var(--muted);
  min-height: 1.4em;
  font-size: 0.95rem;
}

.waiting {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.waiting .big {
  font-size: 1.6rem;
  font-weight: 700;
}

.pulse {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.7); opacity: 0.35; }
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
}

.leaderboard {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.lb-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 20px;
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.5s forwards;
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.lb-place {
  font-size: 1.5rem;
  width: 2.2rem;
  text-align: center;
  flex-shrink: 0;
}

.lb-name {
  font-weight: 700;
  font-size: 1.15rem;
  flex: 1;
  overflow-wrap: anywhere;
}

.lb-counts {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.lb-score {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--accent);
  min-width: 2.5rem;
  text-align: right;
}

.lb-row.first {
  border: 2px solid var(--goat);
}

.lb-row.first .lb-score {
  color: var(--goat);
}
