body {
  background: linear-gradient(to bottom, #0b1a55ff, #b9c9efff, #e9c77bff);
  /* elegante y dinámico */
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.card {
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  background: #ffffffee;
  padding: 2rem;
  width: 100%;
  max-width: 600px;
}

.btn-iniciar {
  background-color: #1a2a6c;
  color: #fff;
  border-radius: 30px;
  transition: 0.3s;
}

.btn-iniciar:hover {
  background-color: #b21f1f;
  color: #fff;
}

.card img {
  object-fit: cover;
  height: 300px;
  width: 100%;
}

.btn-ingresar {
  background-color: #1a2a6c;
  color: #fff;
  border-radius: 30px;
  transition: 0.3s;
}

.btn-ingresar:hover {
  background-color: #b21f1f;
  color: #fff;
}

.btn-rank {
  background-color: #b21f1f;
  color: #fff;
  border-radius: 30px;
  transition: 0.3s;
}

.btn-rank:hover {
  background-color: #1a2a6c;
  color: #fff;
}

.timer {
  font-size: 1.5rem;
  font-weight: bold;
  color: #b21f1f;
  margin-bottom: 1rem;
}
.btn-enviar {
  background-color: #1a2a6c;
  color: #fff;
  border-radius: 30px;
  transition: 0.3s;
}
.btn-enviar:hover {
  background-color: #b21f1f;
  color: #fff;
}

.btn-acerca {
  background-color: #3858d4;
  color: #fff;
  border-radius: 30px;
  transition: 0.3s;
}
.btn-acerca:hover {
  background-color: #e57a7a;
  color: #272626;
}

.progress-container {
  width: 90%;
  max-width: 500px;
}
.progress {
  height: 35px;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}
.progress-bar {
  background: #4caf50;
  font-weight: bold;
  font-size: 1rem;
}

.card-custom {
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
}
.puntaje-global {
  background: linear-gradient(135deg, #2563eb, #1e3a8a);
  color: white;
  border-radius: 15px;
  padding: 40px;
  text-align: center;
  font-size: 3rem;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.puntaje-label {
  font-size: 1.2rem;
  font-weight: normal;
  margin-top: 10px;
  color: #e0e7ff;
}

.ranking-title {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 20px;
  color: #1e3a8a;
  text-align: center;
}

.ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ranking-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: #f1f5f9;
  transition: all 0.2s ease-in-out;
}

.ranking-list li:hover {
  background: #e0e7ff;
  transform: scale(1.01);
}

.ranking-pos {
  font-weight: bold;
  color: #2563eb;
  margin-right: 15px;
  font-size: 1.2rem;
}

.ranking-name {
  flex-grow: 1;
  font-size: 1.2rem;
}

.ranking-score {
  font-weight: bold;
  color: #16a34a;
  font-size: x-large;
}
.timer {
  position: fixed;
  bottom: 15px;
  left: 15px;
  background: #343a40;
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 1.2rem;
  z-index: 1055;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

.form-label {
  font-weight: 500;
  color: slategray;
}

.stage {
  width: min(980px, 94%);
  max-width: 1000px;
  padding: 2rem;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.02)
  );
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(2, 6, 23, 0.6);
  text-align: center;
  position: relative;
  overflow: visible; /* confetti outside is ok */
}

/* CONFETTI */
.confetti {
  position: absolute;
  top: -10vh;
  pointer-events: none;
  width: 10px;
  height: 14px;
  opacity: 0.95;
  will-change: transform, opacity;
  transform-origin: center;
  border-radius: 2px;
}

@keyframes fall {
  0% {
    transform: translate3d(var(--tx, 0), -20vh, 0) rotate(var(--r0, 0deg));
    opacity: 1;
  }
  60% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--tx, 0), 110vh, 0) rotate(var(--r1, 360deg));
    opacity: 0;
  }
}

/* little sideways wobble */
@keyframes sway {
  0% {
    transform: translateX(0) rotate(var(--rot, 0deg));
  }
  50% {
    transform: translateX(var(--sw, 30px))
      rotate(calc(var(--rot, 0deg) + 90deg));
  }
  100% {
    transform: translateX(0) rotate(calc(var(--rot, 0deg) + 180deg));
  }
}

.ranking-details {
  font-size: small;
  padding-left: 15px;
  color: dimgray;
}

.smaller {
  font-size: 0.7em;
}
