* { box-sizing: border-box; }

/* ===== BODY + FONDO GENERAL ===== */
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: #0b1220 url("bg-humanometro.png") center / cover no-repeat fixed;
  color: #f6fffc;
  position: relative;
}

/* ===== LÁMINA SUTIL – ACOMPAÑA EL FONDO ===== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(120,220,255,0.18), transparent 50%),
    radial-gradient(circle at bottom, rgba(100,180,255,0.16), transparent 55%),
    rgba(6,18,40,0.32);
  pointer-events: none;
  z-index: -1;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
#app {
  max-width: 520px;
  margin: auto;
  padding: 20px;
  text-align: center;
  background: rgba(11,18,32,0.58);
  border-radius: 16px;
  box-shadow:
    0 0 26px rgba(0,0,0,0.28),
    0 0 50px rgba(120,255,230,0.10);
}

.hidden { display: none; }

/* ===== LOGO ===== */
.brand {
  margin: 10px 0 14px;
  text-align: center;
}

.brand-main {
  font-family: "Mystery Quest", cursive;
  font-size: clamp(1.6rem, 6.5vw, 2.3rem);
  letter-spacing: 0.08em;
  line-height: 1.15;
  color: #dffaff;
  text-shadow:
    0 0 6px rgba(120,255,230,.8),
    0 0 16px rgba(120,255,230,.6);
  white-space: nowrap;
}

.brand-meta {
  font-size: 0.65rem;
  margin-left: 6px;
  opacity: 0.75;
}

/* ===== TÍTULOS ===== */
.led-title {
  color: #e9fbff;
  text-shadow:
    0 0 6px rgba(120,220,255,0.85),
    0 0 14px rgba(120,220,255,0.6);
}

/* =================================================
   BOTONES
   ================================================= */
button {
  width: 90%;
  max-width: 340px;
  margin: 12px auto;
  padding: 15px;
  border-radius: 40px;
  border: none;
  font-size: 1em;
  cursor: pointer;
  background: linear-gradient(45deg, #6f3a86, #a45fc2);
  color: #ffffff;
  box-shadow:
    0 0 22px rgba(180,120,255,0.85),
    inset 0 0 14px rgba(255,255,255,0.18);
  transition: transform .15s ease, box-shadow .15s ease;
}

button:active { transform: scale(0.96); }

button.premium {
  box-shadow:
    0 0 18px rgba(255,180,0,.85),
    inset 0 0 6px rgba(255,255,255,0.4);
}

/* ===== ON LED ===== */
.on-led {
  margin-left: 8px;
  font-weight: 600;
  color: #6aff9f;
  text-shadow:
    0 0 6px rgba(106,255,159,0.9),
    0 0 16px rgba(106,255,159,0.8);
  animation: ledPulse 2.2s ease-in-out infinite;
}

@keyframes ledPulse {
  0%,100% { opacity: .55; }
  50% { opacity: 1; }
}

/* ===== TERMÓMETROS ===== */
#thermometer, .weekly-thermo {
  width: 100%;
  height: 14px;
  background: rgba(255,255,255,0.14);
  border-radius: 20px;
  margin: 15px 0 25px;
  overflow: hidden;
}

#thermoFill,
#weeklyThermoFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg,#e74c3c,#f1c40f,#2ecc71);
  transition: width .4s ease;
}

/* ===== CÍRCULOS – NUEVO LAYOUT 3x2 ===== */
#circles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  justify-items: center;
  margin: 12px 0 8px;
}

.circle {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-weight: bold;
  font-size: 0.85rem;
  color: #f6fffc;

  animation:
    circleIn 0.6s ease-out both,
    circlePulse 3.6s ease-in-out infinite;

  /* NUEVO HALO LED */
  box-shadow:
    0 0 8px rgba(120,255,230,.45),
    0 0 18px rgba(120,200,255,.35);
}

@keyframes circleIn {
  from { transform: scale(.7); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

@keyframes circlePulse {
  0%,100% {
    box-shadow:
      0 0 8px rgba(120,255,230,.35),
      0 0 16px rgba(120,200,255,.25);
  }
  50% {
    box-shadow:
      0 0 14px rgba(160,255,240,.7),
      0 0 26px rgba(160,220,255,.55);
  }
}

.circle.low  { background: rgba(255, 90, 120, 0.55); }
.circle.mid  { background: rgba(210, 140, 255, 0.55); }
.circle.high { background: rgba(170, 200, 255, 0.55); }

/* ===== SCROLL DEVOLUCIONES ===== */
#tips {
  max-height: 140px;
  overflow-y: auto;
  padding: 10px 12px;
  margin-top: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  position: relative;
}

/* Borde LED */
#tips::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1px;
  background:
    linear-gradient(
      120deg,
      rgba(120,255,230,0.2),
      rgba(160,200,255,0.6),
      rgba(120,255,230,0.2)
    );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: ledBorderPulse 3.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ledBorderPulse {
  0%,100% { opacity: 0.35; }
  50% { opacity: 0.75; }
}

/* ===== BALANZA ===== */
.balance-wrap {
  font-size: 3.2rem;
  margin: 10px 0 18px;
  animation: balanceSwing 3.6s ease-in-out infinite;
}

@keyframes balanceSwing {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(-4deg); }
  50% { transform: rotate(0deg); }
  75% { transform: rotate(4deg); }
  100% { transform: rotate(0deg); }
}

.weekly-result-text {
  font-size: 1.05em;
  line-height: 1.55;
}

button.spaced { margin-top: 26px; }

/* ===== SELLO ===== */
.sello-wrap {
  display: flex;
  justify-content: center;
  margin: 18px auto 6px;
  position: relative;
}

.sello-humanometro {
  width: 140px;
  height: auto;
  animation: freqFloat 6s ease-in-out infinite;
  opacity: 0.65;
  filter:
    drop-shadow(0 0 6px rgba(120,255,230,.6))
    drop-shadow(0 0 14px rgba(120,200,255,.6));
}

.sello-wrap::before {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background:
    conic-gradient(#6aff9f,#6ad0ff,#c77dff,#6aff9f);
  filter: blur(12px);
  opacity: 0.45;
  animation: auraSpin 10s linear infinite;
  z-index: -1;
}

@keyframes freqFloat {
  0%,100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.03) rotate(0.4deg); }
}

@keyframes auraSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
