/* Reset/normalización breve */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #1f2937;
  background: linear-gradient(135deg, #ffc0cb, #ffb6c1);
}

/* Layout base */
.app {
  min-height: 100svh;          /* altura real en móviles */
  display: grid;
  place-items: center;
  padding: 24px;
}

.container {
  width: 100%;
  max-width: 640px;
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  text-align: left;
}

/* Ícono como imagen (no emoji) */
.icono-principal{
  display:block;
  margin: 0px auto 0px;
  width: 100px;
  height: auto;
  object-fit: contain;
  height: 100;
}

h1 {
  margin: 4px 0 8px;
  font-size: clamp(22px, 3.6vw, 30px);
  text-align: center;
}

.subtexto { margin: 0 0 16px; color: #6b7280; }

label { display: block; font-weight: 600; margin: 14px 0 6px; }
input, textarea, select {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: #fb57a8;
  box-shadow: 0 0 0 3px rgba(251,87,168,.15);
}

/* Textarea autoajustable */
textarea {
  min-height: 140px;
  resize: none;          /* evita redimensionado manual */
  overflow-y: hidden;    /* oculta scroll */
}

.info-importar {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color:#6b7280;
  margin-top: 8px;
}

button {
  width: 100%;
  margin-top: 18px;
  padding: 14px 18px;
  font-weight: 700;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  background: #D31C92;
  color: #fff;
  transition: transform .05s ease, filter .2s ease;
}
button:hover { filter: brightness(.96); }
button:active { transform: translateY(1px); }

/* Pantalla 2 */
.cuenta-regresiva { width: min(100%, 640px); margin: 0 auto; text-align: left; }
#lista-participantes { list-style: none; padding: 0; margin: 12px 0 14px; }
#lista-participantes li {
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  margin: 6px 0;
}

.reloj { position: relative; width: 180px; height: 180px; margin: 24px auto 6px; }
.reloj svg { transform: rotate(-90deg); width: 100%; height: 100%; display: block; }
.reloj circle { fill: none; stroke-width: 10; }
.fondo { stroke: #eee; }
.tiempo {
  stroke: #d11fa5;
  transition: stroke-dashoffset 1s linear;
  stroke-linecap: round;
}
.contador-numero {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 36px; font-weight: 800;
}
.resultado { text-align: center; font-weight: 700; font-size: 18px; margin-top: 10px; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .app { padding: 0; }
  .container {
    max-width: none;
    border-radius: 0;
    box-shadow: none;
    min-height: 100svh;
    display: grid;
    align-content: start;
    gap: 2px;
    padding: 20px 16px;
  }
  .info-importar { font-size: 13px; }
  .reloj { width: 160px; height: 160px; }
  .contador-numero { font-size: 32px; }
  .cuenta-regresiva { width: 100%; padding: 12px 16px; }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .tiempo { transition: none; }
}

/* ---- FIX select dentro de la app (evitar estilos de Astra) ---- */
.app input,
.app select,
.app textarea,
.app button{
  font: inherit !important;
  margin: 0 !important;
  box-shadow: none !important;
  vertical-align: middle !important;
}

/* Select consistente con los inputs */
.app select{
  -webkit-appearance: none;
  appearance: none;
  background-color: #fff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 10px !important;
  padding: 12px 42px 12px 14px !important; /* espacio para el caret */
  line-height: 1.2 !important;
  min-height: 44px;              /* misma altura que el input */
  width: 100%;
}

/* Oculta flecha vieja en IE/Edge antiguos */
.app select::-ms-expand{ display:none; }

/* Caret personalizado (SVG) */
.app select{
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}

/* Al enfocar, mismo estilo que inputs */
.app select:focus{
  border-color: #fb57a8 !important;
  box-shadow: 0 0 0 3px rgba(251,87,168,.15) !important;
  outline: none !important;
}

#tituloParticipantes {
    color: crimson;
    font-size: 18px;
}
