/* ====== ESTILO GENERAL (registro) ====== */
:root {
  --morado: #7e57c2;
  --morado-clarito: #b39ddb;
  --verde: #4caf50;
  --gris-borde: #e5e7eb;
  --sombra: 0 6px 15px rgba(0, 0, 0, 0.15);
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f4f4f9;
  color: #333;
}

/* ====== HEADER ====== */
header {
  width: 100%;
  height: auto;
  padding: 16px;
  box-sizing: border-box;
  background: var(--morado-clarito);
  color: #222;
  text-align: center;
  border-bottom: 3px solid var(--morado);
}
header h1 {
  margin: 0 0 8px 0;
  font-size: clamp(20px, 5vw, 32px);
}
header nav a {
  color: #222;
  text-decoration: none;
  margin: 0 10px;
  font-weight: bold;
}
header nav a:hover {
  color: #4a148c;
}

/* ====== CONTENEDOR Y TARJETA ====== */
.contenedor {
  display: flex;
  justify-content: center;
  padding: 24px 16px;
}

.formulario {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: min(420px, 100%);
  box-shadow: var(--sombra);
  border: 1px solid var(--gris-borde);
}

/* ====== CAMPOS ====== */
.campo {
  margin-bottom: 18px;
}
.campo label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: #333;
}
.campo input[type="text"],
.campo input[type="number"],
.campo select {
  width: 100%;
  height: 48px;
  padding: 10px 12px;
  border: 2px solid var(--morado-clarito);
  border-radius: 8px;
  font-size: 18px;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  box-sizing: border-box;
}
.campo input:focus,
.campo select:focus {
  border-color: var(--morado);
  box-shadow: 0 0 6px rgba(126, 87, 194, 0.35);
}

/* ====== NOTA + BOTONES +/- ====== */
#nota {
  height: 56px;
  font-size: 26px;
  text-align: center;
}

#menos,
#mas {
  width: 64px;
  height: 48px;
  font-size: 22px;
  font-weight: 800;
  border: none;
  border-radius: 10px;
  background: var(--morado);
  color: #fff;
  cursor: pointer;
  transition: filter 0.2s ease;
}
#menos:hover,
#mas:hover {
  filter: brightness(0.9);
}

/* ====== BOTÓN GUARDAR ====== */
button#guardar {
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  background: var(--verde);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.02s ease;
}
button#guardar:hover {
  filter: brightness(0.95);
}
button#guardar:active {
  transform: scale(0.99);
}
button#guardar:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ====== ESTADO (feedback) ====== */
#estado {
  display: inline-block;
  font-weight: 700;
  margin-top: 10px;
}
#estado.ok {
  color: #2e7d32;
} /* verde */
#estado.err {
  color: #c62828;
} /* rojo */

/* ====== RESPONSIVE ====== */
@media (max-width: 480px) {
  .formulario {
    width: 96%;
    padding: 16px;
  }
  #nota {
    height: 54px;
    font-size: 24px;
  }
}
/* Evita que el navegador “encogA” fuentes en móvil */
html {
  -webkit-text-size-adjust: 100%;
}

/* Quita destello azul al tocar en Android/Chrome */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Moto con pantallas muy angostas: sube un poco el tamaño */
@media (max-width: 360px) {
  #nota {
    height: 58px;
    font-size: 26px;
  }
  button#guardar {
    font-size: 19px;
  }
}
