/* RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* FONDO APP */
body {
  min-height: 100vh;
  background: linear-gradient(135deg, #1F3C88, #2F5BEA);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  color: #fff;
}

/* TITULO */
h1 {
  font-size: 2.5rem;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  font-weight: 800;
}

.disclaimer {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-bottom: 20px;
}

/* TARJETAS (pantallas) */
#controls,
#result,
#simulator {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  color: #2B2B2B;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  margin-bottom: 20px;

  animation: slideUp 0.5s ease;
}

/* OCULTO */
.hidden {
  display: none;
}

/* ANIMACION ENTRADA */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* AUTOCOMPLETE */
gmp-place-autocomplete {
  width: 100%;
  display: block;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #ced4da;
  font-size: 1rem;
}

/* BOTONES GENERALES */
button {
  border: none;
  border-radius: 50px;
  padding: 14px;
  width: 100%;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:active {
  transform: scale(0.96);
}

/* BOTONES POR ACCION */
#calculate {
  background: linear-gradient(135deg, #7AC943, #A8E063);
  color: #1F3C88;
}

#start {
  background: linear-gradient(135deg, #2F5BEA, #1F3C88);
  color: #fff;
}

#stop {
  background: linear-gradient(135deg, #F4A261, #E76F51);
  color: #fff;
}

#finish {
  background: linear-gradient(135deg, #1F3C88, #162B5B);
  color: #fff;
}

/* BOTON DESHABILITADO */
button:disabled {
  background: #ced4da;
  color: #6c757d;
  cursor: not-allowed;
}

/* RESULTADOS */
#result p {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

/* ===================== */
/* SIMULADOR (HERO VIEW) */
/* ===================== */

#simulator {
  text-align: center;
}

/* TITULO SIMULACION */
#simulator h2 {
  font-size: 1.3rem;
  color: #0d6efd;
  margin-bottom: 10px;
}

/* COSTO ACTUAL – PROTAGONISTA */
#currentCost {
  display: block;
  font-size: 3.6rem;
  font-weight: 800;
  margin: 22px 0;
  color: #1F3C88;
  background: radial-gradient(circle at center, #ECF3FF, #ffffff);
  padding: 28px 0;
  border-radius: 24px;
  box-shadow:
    inset 0 0 0 4px rgba(13,110,253,0.08),
    0 12px 30px rgba(13,110,253,0.25);

  animation: pulse 2s infinite;
}

/* ANIMACION DE VIDA (HUD) */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow:
      inset 0 0 0 4px rgba(13,110,253,0.08),
      0 10px 25px rgba(13,110,253,0.25);
  }
  50% {
    transform: scale(1.03);
    box-shadow:
      inset 0 0 0 4px rgba(13,110,253,0.15),
      0 16px 35px rgba(13,110,253,0.35);
  }
  100% {
    transform: scale(1);
  }
}

/* BOTONES SIMULADOR */
#simulator button {
  max-width: 260px;
  margin-left: auto;
  margin-right: auto;
}

/* MOBILE */
@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  #currentCost {
    font-size: 3rem;
    padding: 22px 0;
  }

  button {
    font-size: 1rem;
  }
}

@keyframes bounce {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.15); }
  60%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

#currentCost.bounce {
  animation: bounce 0.3s ease;
}

/* NOTA LEGAL EN SIMULADOR */
.sim-note {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: -10px;
  margin-bottom: 10px;
}

/* FOOTER */
.footer {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  text-align: center;
  margin-top: auto;
  padding: 12px 10px 0;
  max-width: 420px;
}

.subtitle {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 6px;
}

.logo-card {
  background: #ffffff;
  border-radius: 22px;
  padding: 18px 26px;
  margin-bottom: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);

  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-card img {
  height: 90px;
  max-width: 100%;
}

.hint {
  font-size: 0.8rem;
  color: #ffffff;
  text-align: center;
  margin-top: 8px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}