.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: grid;
  place-items: center;
  z-index: 50;
  backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  width: min(520px, 92vw);
  background: rgba(20,22,28,.9);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  transform: scale(.92);
  opacity: 0;
  animation: popIn .18s ease forwards;
}

.modal.exit {
  animation: popOut .18s ease forwards;
}

.modal .title {
  font-size: 28px;
  margin: 0 0 8px;
  font-weight: 900;
  letter-spacing: .5px;
}

.modal .subtitle {
  margin: 0 0 14px;
  color: #d6d6e7;
}

.modal .actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

.modal.action .title {
  font-size: 54px;
  text-align: center;
}

.modal.action .subtitle {
  text-align: center;
}

.modal .color-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 6px;
}

.color-dot {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.6);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  transition: transform .12s ease;
}

.color-dot:hover {
  transform: translateY(-2px) scale(1.04);
}

.dot-red {
  background: var(--uno-red);
}

.dot-yellow {
  background: var(--uno-yellow);
}

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

.dot-blue {
  background: var(--uno-blue);
}

@keyframes popIn {
  from {
    transform: scale(.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes popOut {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(.92);
    opacity: 0;
  }
}
.modal.victory {
  width: min(640px, 95vw);
  max-height: 80vh;
  overflow-y: auto;
  display: grid;
  gap: 14px;
}

.summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.summary-list li {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
}

.cards-details {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
}

.cards-details + .cards-details {
  margin-top: 12px;
}

.cards-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.cards-details summary::-webkit-details-marker {
  display: none;
}

.cards-details[open] {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.cards-list,
.cards-scroll {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: #d6d6e7;
}

.cards-scroll {
  max-height: 220px;
  overflow-y: auto;
  padding-left: 18px;
  list-style: decimal;
}
