/* Basic layout + background */
body {
  background: radial-gradient(circle at top, #f7fafc 0, #e2e8f0 40%, #cbd5e1 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Keep main content pushed above footer a bit */
main {
  flex: 1 0 auto;
}

/* Card styling */
.calc-card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  background: #ffffff;
}

.calc-card .card-title {
  font-weight: 700;
}

.calc-card .card-text {
  line-height: 1.5;
}

/* Forms */
.calc-form .form-label {
  font-weight: 500;
}

/* Result alerts */
.alert-secondary {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
  font-size: 0.9rem;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border: none;
  font-weight: 600;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #4338ca);
}

/* Footer */
footer {
  flex-shrink: 0;
}

/* Small tweaks for mobile */
@media (max-width: 576px) {
  .display-5 {
    font-size: 1.9rem;
  }
}

/* Button row for each calculator */
.calc-actions {
  display: flex;
  flex-wrap: wrap; /* can wrap on tiny screens */
  gap: 0.5rem; /* space between buttons */
  margin-top: 0.25rem;
}

/* Make buttons just a bit wider than their label text */
.calc-actions .btn {
  width: auto !important;
  padding: 0.4rem 1.2rem;
  white-space: nowrap; /* keep label on one line */
}

/* Put Calculate + Clear on one row with a little gap */
.calc-form button[type="submit"],
.calc-form .calc-clear-btn {
  display: inline-block;
  width: auto;
  padding: 0.4rem 1.2rem;
  white-space: nowrap;
}

.calc-form .calc-clear-btn {
  margin-left: 0.5rem; /* space between the two buttons */
}
