:root {
  --bg: #0f172a;
  --card-bg: #1e293b;
  --card-bg-hover: #273549;
  --accent: #38bdf8;
  --win: #22c55e;
  --lose: #ef4444;
  --text: #f8fafc;
  --muted: #94a3b8;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

header {
  text-align: center;
}

h1 {
  margin: 0 0 0.25rem;
  font-size: 2rem;
}

.subtitle {
  margin: 0;
  color: var(--muted);
}

.round-counter {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.category-name {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.champions-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
}

.champions-list li {
  background: var(--card-bg);
  border-radius: 0.75rem;
  padding: 0.9rem 1.1rem;
  text-align: left;
}

.champions-list .champion-category {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.champions-list .champion-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
}

.arena {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  max-width: 960px;
}

.arena.hidden {
  display: none;
}

.card {
  flex: 1;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 2px solid transparent;
  border-radius: 1rem;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  text-align: center;
}

.card:hover {
  background: var(--card-bg-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card:active {
  transform: scale(0.98);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
}

.card-winning {
  border-color: var(--win);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.35);
  transform: scale(1.03);
}

.card-losing {
  border-color: var(--lose);
  opacity: 0.35;
  transform: scale(0.96);
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-reveal {
  animation: reveal 0.35s ease-out;
}

.vs {
  font-weight: 800;
  color: var(--muted);
  font-size: 1rem;
}

.result-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  max-width: 640px;
  animation: reveal 0.4s ease-out;
}

.result-screen.visible {
  display: flex;
}

.result-label {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
}


#play-again {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 0.75rem;
  background: var(--accent);
  color: #0f172a;
  cursor: pointer;
}

#play-again:hover {
  filter: brightness(1.1);
}

footer {
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 640px) {
  .arena {
    flex-direction: column;
  }

  .card {
    width: 100%;
    min-height: 160px;
  }

  h1 {
    font-size: 1.5rem;
  }
}
