:root {
  --primary-color: #2c5282;
  --accent-color: #3182ce;
  --success-color: #22543d;
  --error-color: #742a2a;
  --border-color: #e2e8f0;
  --text-dark: #1a202c;
  --text-light: #718096;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 500px;
}

.donation-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  padding: 40px 30px;
  text-align: center;
}

.header h1 {
  font-size: 28px;
  margin-bottom: 10px;
  font-weight: 700;
}

.subtitle {
  font-size: 14px;
  opacity: 0.9;
  font-weight: 300;
}

form {
  padding: 40px;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 14px;
}

input,
select {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
  font-family: inherit;
}

input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  cursor: pointer;
  accent-color: var(--accent-color);
}

.checkbox-label {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  user-select: none;
}

.checkbox-label span {
  margin: 0;
}

.total-amount-display {
  background: #f7fafc;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 20px;
  font-size: 14px;
}

.total-row,
.fee-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.total-row:last-child,
.fee-row:last-child {
  margin-bottom: 0;
}

.total-label,
.fee-label {
  color: var(--text-light);
  font-weight: 500;
}

.fee-row .fee-label {
  font-size: 13px;
}

.total-value,
.fee-value {
  color: var(--text-dark);
  font-weight: 600;
}

.total-final {
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  margin-top: 8px;
}

.total-final .total-label,
.total-final .total-value {
  font-weight: 700;
  color: var(--primary-color);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

input[type="checkbox"]:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

input::placeholder {
  color: #cbd5e0;
}

.card-element {
  border: 2px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 20px;
  min-height: 50px;
  background: white;
}

.StripeElement--focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.error {
  color: var(--error-color);
  font-size: 13px;
  margin-top: 8px;
  min-height: 18px;
}

#card-errors {
  margin-bottom: 20px;
}

.btn-donate {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-top: 10px;
}

.btn-donate:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(44, 82, 130, 0.3);
}

.btn-donate:active:not(:disabled) {
  transform: translateY(0);
}

.btn-donate:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.payment-status {
  margin-top: 20px;
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
  min-height: 20px;
}

.payment-status.success {
  background: #c6f6d5;
  color: var(--success-color);
  border: 1px solid #9ae6b4;
}

.payment-status.error {
  background: #fed7d7;
  color: var(--error-color);
  border: 1px solid #fc8181;
}

.payment-status.loading {
  color: var(--text-light);
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--accent-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 480px) {
  .donation-card {
    border-radius: 0;
  }

  .header {
    padding: 30px 20px;
  }

  .header h1 {
    font-size: 24px;
  }

  form {
    padding: 20px;
  }

  .btn-donate {
    padding: 12px;
    font-size: 15px;
  }
}
