* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Segoe UI", "Hiragino Sans", sans-serif;
  background: linear-gradient(135deg, #1f2937, #111827);
  color: #f3f4f6;
}

.card {
  background: #1f2937;
  border-radius: 16px;
  padding: 32px 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  text-align: center;
  width: 320px;
}

h1 {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 600;
  color: #9ca3af;
}

.display {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 16px 0 24px;
  font-variant-numeric: tabular-nums;
}

.display.warning {
  color: #f87171;
}

.inputs {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 24px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field label {
  font-size: 12px;
  color: #9ca3af;
}

.field input {
  width: 70px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #374151;
  background: #111827;
  color: #f3f4f6;
  text-align: center;
  font-size: 16px;
}

.field input:focus {
  outline: none;
  border-color: #60a5fa;
}

.controls {
  display: flex;
  gap: 8px;
  justify-content: center;
}

button {
  flex: 1;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}

button:hover:not(:disabled) {
  background: #1d4ed8;
}

button:disabled {
  background: #374151;
  color: #6b7280;
  cursor: not-allowed;
}

#resetBtn {
  background: #4b5563;
}

#resetBtn:hover {
  background: #374151;
}
