:root {
  --fondo-principal: #1e1e2f;
  --fondo-secundario: #29293d;
  --texto-principal: #e0e0f0;
  --texto-secundario: #a0a4c0;
  --input-fondo: #262638;
  --input-borde: #3c3c5c;
  --input-texto: #e0e0f0;
  --boton-fondo: #5a84e8;
  --boton-hover: #3d64cc;
  --borde: #33334d;
  --resultado-color: #f46b8e;
  --sombra-suave: 0 6px 16px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 20px;
  font-family: 'Segoe UI', sans-serif;
  background: var(--fondo-principal);
  color: var(--texto-principal);
  transition: all 0.3s ease;
}

main {
  max-width: 800px;
  margin: auto;
  padding: 40px;
  background: var(--fondo-secundario);
  border-radius: 20px;
  box-shadow: var(--sombra-suave);
}

h1, h2 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--texto-principal);
}

section {
  background: #232336;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 40px;
  border: 1px solid var(--borde);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.25);
}

#notas-container > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 30px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--borde);
}

label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  color: var(--texto-secundario);
  min-width: 160px;
}

label input {
  margin-top: 8px;
  padding: 12px 16px;
  background: var(--input-fondo);
  border: 2px solid var(--input-borde);
  border-radius: 10px;
  color: var(--input-texto);
  font-size: 1em;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.4);
  transition: border-color 0.3s, box-shadow 0.3s;
}

label input:focus {
  border-color: var(--boton-fondo);
  outline: none;
  box-shadow: 0 0 0 3px rgba(90, 132, 232, 0.2);
}

button {
  background: var(--boton-fondo);
  color: #fff;
  padding: 12px 30px;
  font-size: 1em;
  font-weight: bold;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: var(--sombra-suave);
  transition: background 0.3s, transform 0.2s;
}

button:hover {
  background: var(--boton-hover);
  transform: scale(1.05);
}

#toggle-config {
  display: block;
  margin: 20px auto 0;
  width: 180px;
}

.eliminar-nota {
  background: var(--resultado-color);
  color: white;
  padding: 8px 16px;
  font-size: 0.9em;
  border-radius: 10px;
  margin-left: 10px;
  transition: background 0.3s, transform 0.2s;
}

.eliminar-nota:hover {
  background: #cc3a5e;
  transform: scale(1.1);
}

#resultado {
  text-align: center;
  font-size: 1.4em;
  font-weight: bold;
  margin-top: 20px;
  color: var(--resultado-color);
  min-height: 2em;
}

/* Responsive */
@media (max-width: 600px) {
  main {
    padding: 30px 20px;
  }

  #notas-container > div {
    flex-direction: column;
    align-items: stretch;
  }

  label {
    min-width: 100%;
  }

  button,
  #toggle-config,
  .eliminar-nota {
    width: 100%;
    margin-top: 15px;
  }

  .eliminar-nota {
    margin-left: 0;
  }
}
