:root { color-scheme: dark; --bg: #0b0f14; --panel: #0f1923; --text: #e6f7ff; --muted: #8aa0b4; --accent: #00e5ff; --accent-2: #ff3cac; --glow: rgba(0,229,255,0.45); }
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background:
    radial-gradient(1200px circle at 50% 120%, #001219 0%, #0b0f14 60%),
    repeating-linear-gradient(0deg, rgba(0,229,255,0.06) 0px, rgba(0,229,255,0.06) 1px, transparent 1px, transparent 24px),
    repeating-linear-gradient(90deg, rgba(0,229,255,0.06) 0px, rgba(0,229,255,0.06) 1px, transparent 1px, transparent 24px);
  color: var(--text);
}



.container {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px;
  min-height: 100vh;
  display: grid;
  align-items: center;
}

main h1 {
  text-align: center;
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
  text-shadow: 0 0 12px rgba(0,229,255,0.5), 0 0 2px rgba(0,229,255,0.8);
}

form {
  background: linear-gradient(180deg, rgba(15,25,35,0.85) 0%, rgba(15,25,35,0.75) 100%);
  border: 1px solid rgba(0,229,255,0.25);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 0 24px var(--glow), inset 0 0 12px rgba(0,229,255,0.15);
}

.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; }
.field input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0,229,255,0.25);
  background: #0f1923;
  color: var(--text);
  font-size: 16px;
}
.field input[type="number"]::placeholder { color: var(--muted); }
.field input[type="number"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,229,255,0.25), 0 0 18px var(--glow); }
.field input.invalid { border-color: #ff4d4f; background: rgba(255,77,79,0.08); }
.error { display: block; min-height: 18px; color: var(--accent-2); font-size: 13px; margin-top: 6px; }

.actions { display: flex; gap: 12px; }
button {
  appearance: none;
  padding: 12px 18px;
  border-radius: 12px;
  border: 0;
  font-weight: 700;
  background: linear-gradient(180deg, #00efff 0%, #00bcd4 100%);
  color: #001219;
  box-shadow: 0 0 18px var(--glow), 0 8px 22px rgba(0,229,255,0.25);
  cursor: pointer;
}
button:hover { filter: brightness(1.08); }
button:active { transform: translateY(1px); }
button:disabled { background: #0f1923; color: #587080; cursor: not-allowed; box-shadow: none; }
button.secondary { background: linear-gradient(180deg, #ff3cac 0%, #9750ff 100%); color: #0b0f14; box-shadow: 0 0 18px rgba(255,60,172,0.35), 0 8px 22px rgba(151,80,255,0.25); }

.resultado {
  margin-top: 16px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  color: var(--text);
}

@media (max-width: 768px) {
  form { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
}