/* =============== Reset =============== */

* {

  margin: 0;

  padding: 0;

  box-sizing: border-box;

}



/* =============== Fondo & tipografía =============== */

body {

  background: linear-gradient(180deg, #ffffff 0%, #ffe6f0 100%);

  color: #333;

  font-family: "Poppins", Arial, sans-serif;

  display: flex;

  flex-direction: column;

  min-height: 100vh;

  justify-content: space-between;

  align-items: center;

  padding: 20px;

}



/* =============== Barra superior (controles) =============== */

.top-bar {

  width: 100%;

  display: flex;

  justify-content: center;

  position: relative;

}



.btn-group {

  display: flex;

  gap: 10px;

}



.pill-btn {

  background-color: #ffe6f0;

  color: #d63384;

  border: 1px solid #f5c2e7;

  padding: 6px 14px;

  border-radius: 20px;

  font-size: 14px;

  cursor: pointer;

  transition: background 0.3s, transform 0.2s;

}



.pill-btn:hover {

  background-color: #ffb3d9;

  transform: scale(1.05);

}



/* =============== Menú de pasos (+10, +1, etc.) =============== */

.step-menu {

  display: none;               /* se muestra con JS */

  position: absolute;

  top: 35px;

  background-color: #ffe6f0;

  border: 1px solid #f5c2e7;

  border-radius: 8px;

  overflow-y: auto;            /* scroll si es largo */

  max-height: 200px;

  flex-direction: column;

  box-shadow: 0 4px 12px rgba(214, 51, 132, 0.2);

  z-index: 10;

}



.step-menu button {

  background: none;

  border: none;

  color: #d63384;

  text-align: left;

  padding: 8px 16px;

  cursor: pointer;

  font-family: inherit;

  font-size: 14px;

}



.step-menu button:hover {

  background-color: #ffb3d9;

}



/* =============== Zona del contador =============== */

.counter-area {

  flex-grow: 1;

  display: flex;

  flex-direction: column;

  justify-content: center;

  align-items: center;

}



.counter-display {

  font-size: 80px;

  font-weight: bold;

  margin-bottom: 20px;

  color: #d63384;

  text-shadow: 0 0 12px #ffb3d9;

}



/* Animación suave del número */

.counter-display.animate {

  animation: softPop 300ms ease-out;

}



@keyframes softPop {

  0%   { transform: scale(1);    opacity: 1;   filter: drop-shadow(0 0 0 rgba(214,51,132,0)); }

  50%  { transform: scale(1.12); opacity: 0.92; filter: drop-shadow(0 6px 10px rgba(214,51,132,0.18)); }

  100% { transform: scale(1);    opacity: 1;   filter: drop-shadow(0 0 0 rgba(214,51,132,0)); }

}



/* =============== Dial / botones grandes ↑ ↓ =============== */

.dial {

  display: flex;

  flex-direction: column;

  align-items: center;

  position: relative;

}



.dial-up {

  width: 140px;

  height: 140px;

  border-radius: 50%;

  background: linear-gradient(145deg, #fff0f6, #ffd6eb);

  border: none;

  display: flex;

  justify-content: center;

  align-items: center;

  cursor: pointer;

  box-shadow: 0 4px 10px rgba(214, 51, 132, 0.3);

}



.dial-down {

  margin-top: -30px;

  width: 60px;

  height: 60px;

  border-radius: 50%;

  background: linear-gradient(145deg, #ffd6eb, #fff0f6);

  border: none;

  display: flex;

  justify-content: center;

  align-items: center;

  cursor: pointer;

  box-shadow: 0 2px 6px rgba(214, 51, 132, 0.25);

}



/* Chevrons (flechas) */

.chevron {

  display: inline-block;

  border-style: solid;

  border-width: 0.25em 0.25em 0 0;

  content: '';

  width: 1.5em;

  height: 1.5em;

}



.chevron-up {

  transform: rotate(-45deg);

  border-color: #d63384;

}



.chevron-down {

  transform: rotate(135deg);

  border-color: #d63384;

}



/* =============== Input al editar (EDIT) =============== */

.edit-input {

  font-size: 80px;

  font-weight: bold;

  text-align: center;

  color: #d63384;

  background: none;

  border: none;

  outline: none;

  width: 220px;

}



/* =============== Sparkles (brillos) al tocar el fondo =============== */

.sparkle {

  position: absolute;

  width: 14px;                /* más grande */

  height: 14px;

  background: radial-gradient(circle, #ffb3d9 0%, rgba(255,182,193,0) 70%);

  border-radius: 50%;

  pointer-events: none;

  animation: sparkleAnim 1000ms ease-out forwards;

  z-index: 9999;

}



@keyframes sparkleAnim {

  0%   { transform: scale(0.5); opacity: 1; }

  50%  { transform: scale(1.6); opacity: 0.8; }

  100% { transform: scale(0.2) translateY(-40px); opacity: 0; }

}



/* =============== Botón flotante de Info + overlay =============== */

.info-btn {

  position: fixed;

  top: 16px;

  right: 16px;

  width: 48px;

  height: 48px;

  border-radius: 50%;

  border: none;

  background: linear-gradient(145deg, #ffe6f0, #ffd6eb);

  color: #d63384;

  font-size: 22px;

  cursor: pointer;

  box-shadow: 0 4px 10px rgba(214, 51, 132, 0.3);

  transition: transform 0.2s, background 0.3s;

  z-index: 2000;

}



.info-btn:hover {

  transform: scale(1.1);

  background: linear-gradient(145deg, #ffd6eb, #ffe6f0);

}



/* Capa de información (pantalla completa, scrollable) */

.info-overlay {

  display: none; /* se controla con JS */

  position: fixed;

  inset: 0;

  background: rgba(255, 230, 240, 0.95);

  z-index: 3000;

  justify-content: center;

  align-items: flex-start;

  overflow-y: auto;

  padding: 40px 20px;

}



/* Tarjeta interior del overlay */

.info-content {

  position: relative;

  background: #fff;

  border-radius: 16px;

  padding: 24px;

  max-width: 600px;

  width: 100%;

  margin: 0 auto;

  box-shadow: 0 8px 24px rgba(214, 51, 132, 0.25);

  color: #7a3a5a;

}



.info-content h2 {

  color: #d63384;

  margin: 12px 0 6px;

}



.info-content p {

  margin-bottom: 10px;

  line-height: 1.5;

}



/* Botón cerrar overlay */

.close-info {

  position: absolute;

  top: 16px;

  right: 18px;

  border: none;

  background: none;

  font-size: 24px;

  color: #d63384;

  cursor: pointer;

}



/* =============== Footer créditos =============== */

.site-footer {

  width: 100%;

  display: flex;

  gap: 10px;

  justify-content: center;

  align-items: center;

  padding: 10px 0;

  color: #d63384;

  font-size: 13px;

  opacity: 0.95;

}



.site-footer span:first-child {

  filter: drop-shadow(0 0 6px #ffb3d9);

}



/* =============== Responsive tweaks =============== */

@media (max-width: 420px) {

  .counter-display, .edit-input {

    font-size: 64px;

  }



  .dial-up { width: 120px; height: 120px; }

  .dial-down { width: 56px; height: 56px; }

}

