body {
  font-family: 'Roboto', sans-serif;
  background: #f2f4f8;
  margin: 0;
  display: flex;
  justify-content: center;
  padding: 20px;
  min-height: 100vh;
}

.container {
  background: #fff;
  max-width: 640px;
  width: 100%;
  border-radius: 12px;
  padding: 20px 10px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.12), 0 4px 6px rgba(0,0,0,0.08);
}

.header-image-full {
  width: 100%;
  border-radius: 10px 10px 0 0;
  display: block;
  margin-bottom: 15px;
}

.volver-button {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: #0077b6;
  background-color: #e3f2fd;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  margin-bottom: 7px;

}
.volver-button:hover {
  background-color: #bbdefb;
}

.formulario {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.input-group {
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
}

.input-group label {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 15px;
}

.input-group input {
  padding: 10px;
  font-size: 16px;
  text-align: center;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/* 🎨 Estilos para inputs validados */
.input-valido:not(.en-foco) {
  border: 2px solid #0077b6 !important;
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.25) !important;
}

.input-invalido {
  border: 2px solid #c0392b !important;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.3) !important;
}


.slider-label {
  font-size: 15px;
  font-weight: 500;
  text-align: center;
}

#slider {
  width: 260px;
  appearance: none;
  height: 6px;
  background: #ddd;
  border-radius: 10px;
  outline: none;
  margin-top: 5px;
}

#slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0077b6;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 0 2px rgba(0,0,0,0.3);
  transition: background 0.2s;
}

#slider::-webkit-slider-thumb:hover {
  background: #00b4d8;
}

.slider-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-btn {
  background-color: #0077b6;
  color: white;
  font-size: 18px;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}
.slider-btn:hover {
  background-color: #005a8a;
}


#slider-value {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #0077b6;
  background: #e3f2fd;
  border-radius: 6px;
  padding: 6px 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}


.canvas-wrapper {
  position: relative;
  width: 250px;
  height: 250px;
}

#imgLensMarks {
  position: absolute;
  top: 0;
  left: 0;
  width: 250px;
  z-index: 1;
  transition: transform 0.4s ease-in-out;
}

#lenteCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 250px;
  height: 250px;
  z-index: 0;
}

.limpiar-btn {
  background-color: #0077b6;
  color: white;
  padding: 10px 20px;
  font-size: 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0;  /* 🔽 asegurate que esté en 0 */
}

.limpiar-btn:hover {
  background-color: #005a8a;
}


.resultado-box {
  font-size: 19px;
  font-weight: bold;
  padding: 12px;
  background: linear-gradient(to right, #e0f7fa, #ffffff);
  border: 1px solid #0facee;
  border-radius: 8px;
  color: #0077b6;
  text-align: center;
  width: 100%;
  max-width: 300px;
  margin-top: 10px;
}


@media (max-width: 600px) {
  .container {
    padding: 15px 10px;
    border-radius: 0;
    box-shadow: none;
  }

  .header-image-full {
    border-radius: 0;
  }

  .formulario {
    gap: 15px;
  }

  .input-group,
  .resultado-box,
  .slider-wrapper {
    max-width: 100%;
    width: 100%;
  }

  #slider {
    width: 100%;
  }

  .slider-btn {
    padding: 8px 10px;
    font-size: 16px;
  }

  .limpiar-btn {
    width: 100%;
    font-size: 16px;
    margin-top: 10px;
  }

  #slider-value {
    font-size: 15px;
    padding: 6px 10px;
    width: 100%;
    text-align: center;
  }

  .canvas-wrapper {
    transform: scale(0.85);
    margin-top: -10px;
  }
}
