* { box-sizing: border-box; touch-action: manipulation; }

body {
  font-family: system-ui, sans-serif;
  background: #000;
  border: solid #ff000099 .50rem;
  border-radius: 6px ;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 100dvh;
  margin: .10rem;
  padding: .00rem;
  user-select: none;
}

header { width:100%; background: indigo; text-align: center; padding: .5rem 0px; opacity: .66; }

.hd { font-size: 1.4rem; color: #eee; margin: 0; font-weight: 500; }


.count-display {

  font-size: 15rem;
  font-weight: 500;
  color: orange;
  /*margin: .25rem 0;*/
  outline: none;
  transition: background 0.2s;
  user-select: text;
}

.count-display:focus { background: #1f2937; box-shadow: 0 0 0 2px #10b981; }

/* Contenedor al 90% */
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  width: 90%;
  max-width: 900px;
  margin: 20px 0;
}

/* Estilo base 3D para botones redondos (Inspirado en Button 45 de Apple) */
button.btn-action {
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  /* Sombras exterior e interior para efecto bisel y profundidad 3D */
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -3px 6px rgba(0, 0, 0, 0.4);
  text-shadow: 0 -1px 2px rgba(0, 0, 0, 0.7);
  transition: transform 0.1s ease, opacity 0.2s ease;
}

/* Reflexión de cristal en la mitad superior */
button.btn-action::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  border-radius: 50% 50% 0 0;
  pointer-events: none;
}

button.btn-action:active {
  transform: scale(0.95);
  opacity: 0.9;
}

/* Botón "-" (10% más pequeño: 126px) */
.btn-sub {
  background: linear-gradient(180deg, #f87171 0%, #ef4444 40%, #dc2626 100%);
  width: 126px;
  height: 126px;
  font-size: 4.0rem;
}

/* Botón "+" (40% más grande: 196px) */
.btn-add {
  background: linear-gradient(180deg, #34d399 0%, #10b981 40%, #059669 100%);
  width: 196px;
  height: 196px;
  font-size: 6.3rem;
}

.footer-actions { margin-bottom: 10px; }

/* Botón Reset */
.btn-reset {
  align-items: center;
  background-image: linear-gradient(144deg, #AF40FF, #5B42F3 50%, #00DDEB);
  border: 0;
  border-radius: 8px;
  box-shadow: rgba(151, 65, 252, 0.3) 0 10px 20px -5px;
  box-sizing: border-box;
  color: #FFFFFF;
  display: flex;
  font-size: 2.1rem;
  font-weight: 500;
  justify-content: center;
  /*line-height: 2.5em;*/
  max-width: 100%;
  min-width:12rem;
  padding: 3px;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  white-space: nowrap;
  cursor: pointer;
  margin-top: 1rem;
  transition: transform 0.1s ease;
}

.btn-reset:active {
  transform: scale(0.96);
}

.btn-reset span {
  background-color: rgb(5, 6, 45);
  padding: 12px 24px;
  border-radius: 6px;
  width: 100%;
  height: 100%;
  transition: 300ms;
}

.btn-reset:hover span {
  background: none;
}

footer {
  width: 100%; 
  padding: .25rem; 
  background: navy; 
  text-align: center; 
}
