/* Apple-like minimalist responsive style */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f5f5f7;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  color: #1d1d1f;
}

.container {
  background: #fff;
  margin: 2rem;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  max-width: 600px;
  width: 100%;
  box-sizing: border-box;
}

h1 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem; /* consistent spacing */
}

label {
  font-weight: 500;
  margin-bottom: 0.3rem;
  display: block;
}

input, select {
  width: 100%;
  max-width: 100%; /* prevent overflow */
  padding: 0.8rem 1rem;
  border: 1px solid #d2d2d7;
  border-radius: 12px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box; /* ensures padding doesn’t break width */
}

input:focus, select:focus {
  border-color: #0071e3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2);
}

.credit-card {
  padding: 1rem;
  border: 1px solid #e5e5ea;
  border-radius: 12px;
  background: #fafafa;
}

.credit-card h3 {
  margin: 0 0 1rem 0;
}

.buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap; /* keeps buttons aligned on mobile */
}

button {
  flex: 1;
  min-width: 120px;
  padding: 0.9rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.1s ease;
}

button[type="submit"] {
  background: #0071e3;
  color: white;
}

button[type="submit"]:hover {
  background: #005bb5;
}

button[type="button"] {
  background: #f2f2f7;
  color: #1d1d1f;
}

button[type="button"]:hover {
  background: #e5e5ea;
}

button:active {
  transform: scale(0.98);
}

#result {
  margin-top: 2rem;
  padding: 1.2rem;
  border-radius: 12px;
  background: #f9f9fb;
  white-space: pre-line;
  font-size: 1rem;
  line-height: 1.5;
}
