:root {
  --primary: #2d3e9d;
  --primary-hover: #4f46e5;
  --secondary: #3d0222;
  --background: #05233f;
  --surface: rgba(30, 41, 59, 0.7);
  --surface-border: rgba(255, 255, 255, 0.1);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--background);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Background Effects */
.app-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--background);
  background-image: linear-gradient(rgba(5, 35, 63, 0.7), rgba(5, 35, 63, 0.9)), url('backgroundPortrait.jpeg');
  background-size: cover;
  background-position: left center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  padding: 20px;
}

/* Glassmorphism Card */
.donation-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 40px 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: start;
  max-height: 85vh;
  overflow-y: auto;
}

/* Custom Scrollbar for the form */
.donation-card::-webkit-scrollbar {
  width: 8px;
}

.donation-card::-webkit-scrollbar-track {
  background: transparent;
}

.donation-card::-webkit-scrollbar-thumb {
  background: var(--surface-border);
  border-radius: 4px;
}

.donation-card::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.card-left {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.card-right {
  display: flex;
  flex-direction: column;
}

/* Header */
.card-header {
  text-align: left;
}

.brand-logo {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  object-fit: contain;
  margin-bottom: 24px;
}

.logo-container {
  display: block;
  text-align: center;
}

h1,
h2,
h3,
h4,
h5,
h6,
.selection-title {
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.card-header h1 {
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 12px;
  color: #ffffff;
  white-space: nowrap;
}

.card-header p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.5;
}

/* Toggle (One-time vs Monthly) */
.donation-type-toggle {
  display: flex;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 12px;
  padding: 4px;
  border: 1px solid var(--surface-border);
}

.toggle-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.toggle-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Amount Selection */
.amount-selection {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.selection-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.amount-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--surface-border);
  color: var(--text);
  padding: 16px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.amount-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.amount-btn.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
  color: #a5b4fc;
  box-shadow: inset 0 0 0 1px var(--primary);
}

.custom-amount-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 18px;
}

.custom-amount-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  padding: 16px 16px 16px 36px;
  color: var(--text);
  font-size: 18px;
  font-family: inherit;
  font-weight: 600;
  transition: var(--transition);
}

.custom-amount-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.custom-amount-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

/* Footer & Submit */
.checkout-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.primary-btn {
  position: relative;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  border-radius: 12px;
  padding: 18px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 15px -5px rgba(236, 72, 153, 0.4);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -5px rgba(236, 72, 153, 0.5);
}

.primary-btn:active {
  transform: translateY(0);
}

.primary-btn.loading .btn-text {
  opacity: 0;
}

.primary-btn.loading .btn-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn-loader {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
}

.primary-btn.loading .btn-loader {
  opacity: 1;
}

.btn-processing-text {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.spinner {
  animation: rotate 2s linear infinite;
  width: 24px;
  height: 24px;
}

.spinner .path {
  stroke: white;
  stroke-linecap: round;
  animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }

  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
}

.hidden {
  display: none !important;
}

.secure-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

/* Status Messages */
.status-message {
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 24px;
  text-align: center;
  font-weight: 500;
  animation: slideDown 0.4s ease-out;
}

.status-message.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-message.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Stripe Payment Element Adjustments */
.payment-element-container {
  margin-top: 16px;
  margin-bottom: 24px;
  min-height: 200px;
}

#payment-message {
  color: var(--danger);
  font-size: 14px;
  text-align: center;
  margin-top: 12px;
  font-weight: 500;
}

@keyframes slideDown {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Site Footer */
.site-footer {
  margin-top: 24px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--text);
}

.footer-divider {
  color: rgba(255, 255, 255, 0.2);
  font-size: 14px;
}

.footer-text {
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
}


/* Responsive adjustments */
@media (max-width: 768px) {
  .donation-card {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 24px;
  }

  .card-header {
    text-align: center;
  }

  .container {
    max-width: 480px;
  }
}