:root {
  --sky: #bae6fd;
  --ink: #0f172a;
  --muted: #64748b;
  --blue: #3b82f6;
  --green: #22c55e;
  --green-dark: #16a34a;
  --card: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Nunito", system-ui, sans-serif;
  background: #0f172a;
  color: var(--ink);
  user-select: none;
  touch-action: none;
}

#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  z-index: 0;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
}

.hidden {
  display: none !important;
}

#hud {
  pointer-events: none;
}

.player-cards {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  z-index: 20;
  pointer-events: none;
}

.player-cards.multi {
  top: auto;
  bottom: 7.2rem;
}

.hud-menu-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  pointer-events: auto;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  z-index: 21;
}

.hud-menu-btn:hover {
  background: #fff;
}

.player-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.15rem;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-radius: 1.15rem;
  padding: 0.5rem 0.95rem 0.5rem 0.75rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  min-width: 9.4rem;
  border-left: 6px solid currentColor;
}

.player-card .meta {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.player-card .name {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.player-card .lives {
  font-size: 0.85rem;
  font-weight: 800;
}

.player-card .score {
  font-size: 1.35rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.player-card.out {
  opacity: 0.45;
  filter: grayscale(0.4);
}

.target-card {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  padding: 0.55rem 1.8rem 0.7rem;
  border-radius: 1.35rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  border-bottom: 5px solid #38bdf8;
  text-align: center;
  min-width: 11rem;
}

.target-card h2 {
  color: #0ea5e9;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.target-card p {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  color: var(--ink);
}

.hint {
  position: absolute;
  bottom: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.45);
  color: white;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.hint.show {
  opacity: 1;
}

#menu,
#gameover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
  overflow-y: auto;
}

#menu:not(.hidden),
#gameover:not(.hidden) {
  pointer-events: auto;
}

.menu-card {
  width: min(820px, 100%);
  background: white;
  border-radius: 2rem;
  padding: 2rem 2rem 1.5rem;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
  animation: pop-in 0.35s ease;
}

@keyframes pop-in {
  from {
    transform: translateY(16px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.menu-card h1 {
  text-align: center;
  font-size: clamp(2rem, 5vw, 2.7rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.subtitle {
  text-align: center;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 0.45rem;
}

.play-counter {
  text-align: center;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.play-counter strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
}

.menu-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
}

@media (max-width: 720px) {
  .menu-grid {
    grid-template-columns: 1fr;
  }

  .menu-card {
    padding: 1.3rem 1rem 1.1rem;
    border-radius: 1.4rem;
  }

  .player-cards {
    flex-wrap: wrap;
  }

  .target-card {
    top: auto;
    bottom: 4.5rem;
  }

  .hud-menu-btn {
    top: 0.7rem;
    right: 0.7rem;
  }
}

section h3 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0.4rem 0 0.6rem;
}

.dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--blue);
  display: inline-block;
}

.dot.green {
  background: var(--green);
}

.chip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.chip-row {
  display: flex;
  gap: 0.45rem;
}

.chip,
.player-btn,
.start-btn,
.ghost-btn {
  font-family: inherit;
  font-weight: 800;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  color: var(--ink);
  cursor: pointer;
  transition: 0.15s ease;
}

.chip {
  border-radius: 999px;
  padding: 0.55rem 0.7rem;
  font-size: 0.92rem;
}

.chip.round {
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
}

.chip:hover,
.player-btn:hover {
  border-color: #cbd5e1;
}

.chip.selected {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
}

.chip.green.selected {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.35);
}

.players-panel {
  background: #f0f9ff;
  border-radius: 1.25rem;
  padding: 0.9rem;
}

.players-panel h3 {
  color: var(--blue);
  font-weight: 900;
}

.note {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.player-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.player-btn {
  border-radius: 1rem;
  padding: 0.85rem 0.4rem;
  font-size: 1.6rem;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.player-btn span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.2rem;
  color: var(--muted);
}

.player-btn.selected {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.35);
}

.player-btn.selected span {
  color: #dbeafe;
}

.start-btn {
  width: 100%;
  margin-top: 1.2rem;
  background: var(--green);
  border: none;
  color: white;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.95rem;
  border-radius: 1rem;
  box-shadow: 0 10px 0 var(--green-dark);
}

.start-btn:hover {
  filter: brightness(1.05);
}

.start-btn:active {
  transform: translateY(3px);
  box-shadow: 0 7px 0 var(--green-dark);
}

.gameover-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ghost-btn {
  width: 100%;
  background: white;
  border-radius: 1rem;
  padding: 0.8rem;
  font-size: 1rem;
}

.final-scores {
  display: grid;
  gap: 0.55rem;
  margin: 0.4rem 0 1.2rem;
}

.final-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border-radius: 1rem;
  padding: 0.7rem 1rem;
  font-weight: 800;
}

.final-row.winner {
  background: #ecfdf5;
  outline: 2px solid #86efac;
}

.final-row .pts {
  font-size: 1.3rem;
  font-weight: 900;
}

.credits {
  width: min(820px, 100%);
  margin-top: 0.85rem;
  text-align: center;
  flex-shrink: 0;
}

.credits-by {
  color: #0f172a;
  font-weight: 800;
  font-size: 0.92rem;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.55rem 0 0.4rem;
}

.social-link {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14);
  color: #0f172a;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.social-link svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.social-link:hover,
.social-link:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.05);
  outline: none;
}

.social-link.instagram {
  color: #e1306c;
}

.social-link.tiktok {
  color: #111827;
}

.social-link.facebook {
  color: #1877f2;
}

.social-link.x {
  color: #111827;
}

.social-link.youtube {
  color: #ff0000;
}

.social-link.web {
  color: #0284c7;
}

.credits-web {
  display: inline-block;
  color: #0369a1;
  font-weight: 800;
  font-size: 0.88rem;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.credits-web:hover,
.credits-web:focus-visible {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .credits {
    margin-top: 0.65rem;
  }

  .credits-by {
    font-size: 0.82rem;
  }

  .social-link {
    width: 2.15rem;
    height: 2.15rem;
  }
}
