body {
  margin: 0;
  background-color: #0f0606;
  color: #d4af37; /* Dorado elegante */
  font-family: "Playfair Display", serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.app {
  text-align: center;
  max-width: 340px;
  width: 90%;
}

header h1 {
  background: linear-gradient(90deg, #be860d, #cc980b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

#medida {
  color: #f2f2f2;
  font-weight: 500;
}

.viewer {
  position: relative;
  width: 300px;
  height: 400px;
  margin: 0 auto;
  background-color: #1c1c1c;
  border-radius: 20px;
  overflow: hidden;
}

.finger-outline {
  position: absolute;
  top: 40px;
  left: 50%;
  width: 90px;
  height: 300px;
  margin-left: -45px;
  border: 1px solid #a7a7a7;
  border-radius: 45px 45px 25px 25px;
  opacity: 0.5;
}

.linea, .linea-derecha {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
}

.linea {
  background-color: #FFD700;
}

.linea-derecha {
  border-right: 2px dashed #888;
}


.controles {
  margin: 20px 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  position: relative; /* asegura que esté por encima */
  z-index: 10;        /* prioridad sobre otros elementos */
}


button {
  background-color: #D4AF37;
  color: #111;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 26px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(212,175,55,0.4);
}

button:hover {
  background-color: #FFD700;
  box-shadow: 0 0 12px rgba(255,215,0,0.7);
}


.calibracion {
  background-color: #222;
  border: 1px solid #444;
  border-radius: 12px;
  padding: 15px;
  color: #EEE;
}

.calibracion h2 {
  color: #D4AF37;
}


.calibracion p {
  font-size: 14px;
  color: #ccc;
}

.moneda {
  width: 100px;
  height: 100px;
  border: 2px dashed #FFD700;
  border-radius: 50%;
  margin: 15px auto;
  box-shadow: 0 0 10px rgba(255,215,0,0.4);
  pointer-events: none;

}


#sliderCalibracion {
  width: 80%;
  margin-top: 10px;
}

/* Ajustes para pantallas móviles */
@media (max-width: 480px) {
  body { padding: 10px; height: auto; }
  
 .app {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 50px;
}
.viewer {
  position: relative;
  width: 90vw;             /* Ocupa casi todo el ancho del celular */
  height: 80vw;            /* Altura proporcional al ancho */
  max-width: 350px;        /* Límite máximo para pantallas grandes */
  max-height: 350px;
  margin: 20px auto;       /* Centrado y con espacio */
  background: #1d1d1d;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.linea, .linea-derecha {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
}

.linea {
  background-color: yellow;
  left: 25%;            /* Posición inicial */
}

.linea-derecha {
  border-right: 2px dashed #aaa;
  left: 50%;            /* Posición inicial */
}

  .controles { gap: 6px; }
  button { width: 40px; height: 40px; font-size: 22px; }
  .calibracion { padding: 10px; font-size: 13px; }
  .calibracion h2 { font-size: 16px; }
  .calibracion p { font-size: 12px; }
  #sliderCalibracion { width: 100%; }
}
