/* ============================================
   DONATION PAGE — The CIA Asset & The Man Who Didn't Take The Bait
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --gold: #c9a84c;
  --gold-light: #e2c97e;
  --gold-dark: #a8872e;
  --dark: #0d0d0d;
  --dark-surface: #1a1a1a;
  --dark-card: #141414;
  --dark-border: #2a2a2a;
  --text-primary: #f0ece4;
  --text-secondary: #a8a49c;
  --text-muted: #6b6760;
  --accent-green: #4caf50;
  --accent-red: #e74c3c;
  --shadow-gold: 0 0 30px rgba(201, 168, 76, 0.15);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--dark);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background Gradient Overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at top center, rgba(201, 168, 76, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at bottom center, rgba(13, 13, 13, 1) 0%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

/* Main Container */
.donation-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

/* Book Cover Section */
.book-cover-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.book-cover {
  width: 260px;
  max-width: 65%;
  border-radius: var(--radius);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(201, 168, 76, 0.1),
    inset 0 0 0 1px rgba(201, 168, 76, 0.1);
  transition: var(--transition);
  transform: rotateY(0deg);
}

.book-cover:hover {
  transform: rotateY(-3deg) scale(1.02);
  box-shadow: 
    0 25px 70px rgba(0, 0, 0, 0.7),
    0 0 50px rgba(201, 168, 76, 0.15),
    inset 0 0 0 1px rgba(201, 168, 76, 0.2);
}

/* Title Section */
.title-section {
  text-align: center;
  padding: 0 1rem;
}

.title-section h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.02em;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(201, 168, 76, 0.2);
}

.title-section .subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.title-section .tagline {
  font-size: 0.95rem;
  color: var(--gold-light);
  font-weight: 400;
  font-style: italic;
  margin-top: 1rem;
  line-height: 1.7;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

/* Donation Card */
.donation-card {
  width: 100%;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-card);
}

/* Card Heading */
.card-heading {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
}

/* Toggle Section */
.toggle-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--dark-border);
}

.toggle-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  cursor: pointer;
  user-select: none;
}

.toggle-label.active {
  color: var(--gold);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--dark-border);
  border-radius: 28px;
  transition: var(--transition);
  border: 1px solid rgba(201, 168, 76, 0.2);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: var(--gold);
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: rgba(201, 168, 76, 0.2);
  border-color: var(--gold);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(24px);
}

/* Amount Buttons Grid */
.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.amount-btn {
  position: relative;
  background: var(--dark-surface);
  border: 1.5px solid var(--dark-border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  text-align: center;
  outline: none;
}

.amount-btn:hover {
  border-color: var(--gold-dark);
  background: rgba(201, 168, 76, 0.06);
  transform: translateY(-1px);
}

.amount-btn.selected {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.1);
  color: var(--gold);
  box-shadow: var(--shadow-gold);
}

.amount-btn .frequency-hint {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
  transition: var(--transition);
}

.amount-btn.selected .frequency-hint {
  color: var(--gold-dark);
}

/* Rockstar Row */
.rockstar-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.donation-card .rockstar-row .amount-btn.rockstar-btn {
  background: linear-gradient(135deg, #1a7a2e, #22a53a);
  border: 2px solid #2ecc40;
  color: #fff;
  font-size: 1.15rem;
  padding: 0.95rem 2rem;
  min-width: 140px;
  box-shadow: 0 0 20px rgba(46, 204, 64, 0.25);
}

.donation-card .rockstar-row .amount-btn.rockstar-btn:hover {
  background: linear-gradient(135deg, #22a53a, #2ecc40);
  border-color: #4cdf5a;
  box-shadow: 0 0 30px rgba(46, 204, 64, 0.4);
  transform: translateY(-2px);
}

.donation-card .rockstar-row .amount-btn.rockstar-btn.selected {
  background: linear-gradient(135deg, #22a53a, #2ecc40);
  border-color: #4cdf5a;
  color: #fff;
  box-shadow: 0 0 35px rgba(46, 204, 64, 0.5);
}

.rockstar-label {
  font-size: 1.05rem;
  font-weight: 600;
  color: #2ecc40;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* Invitation Section */
.invitation-section {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-top: 1px solid var(--dark-border);
  text-align: left;
}

.invitation-hook {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.invitation-text {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.invitation-perks {
  margin: 1.25rem 0;
  padding-left: 0.25rem;
}

.invitation-perks p {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 0.6rem;
  padding-left: 0.25rem;
}

.invitation-bold {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-light);
  text-align: center;
  margin: 1.25rem 0;
  letter-spacing: 0.03em;
}

.invitation-cta {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
  text-align: center;
  margin: 1.25rem 0;
}

.invitation-rallycry {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-top: 1.25rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.15), rgba(201, 168, 76, 0.05));
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
  line-height: 1.6;
}

/* Custom Amount Input */
.custom-amount-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

.custom-amount-wrapper .dollar-sign {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
  transition: var(--transition);
}

.custom-amount-wrapper.focused .dollar-sign {
  color: var(--gold);
}

.custom-amount-input {
  width: 100%;
  background: var(--dark-surface);
  border: 1.5px solid var(--dark-border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem 0.9rem 2.2rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

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

.custom-amount-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

/* Donate Button */
.donate-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--dark);
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
}

.donate-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.donate-btn:hover::before {
  left: 100%;
}

.donate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(201, 168, 76, 0.35);
}

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

.donate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.donate-btn:disabled:hover::before {
  left: -100%;
}

/* Selected amount display */
.selected-display {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  min-height: 1.25rem;
  transition: var(--transition);
}

.selected-display span {
  color: var(--gold);
  font-weight: 600;
}

/* Secure badge */
.secure-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.secure-badge svg {
  width: 14px;
  height: 14px;
  fill: var(--text-muted);
}

/* Footer */
.footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 0.5rem;
}

.footer a {
  color: var(--gold-dark);
  text-decoration: none;
}

.footer a:hover {
  color: var(--gold);
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(13, 13, 13, 0.3);
  border-top-color: var(--dark);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 480px) {
  body {
    padding: 1.25rem 0.75rem;
  }

  .donation-container {
    gap: 1.25rem;
  }

  .book-cover {
    width: 220px;
  }

  .title-section h1 {
    font-size: 1.3rem;
  }

  .donation-card {
    padding: 1.5rem 1.25rem;
  }

  .amount-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
  }

  .amount-btn {
    padding: 0.75rem 0.25rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 360px) {
  .amount-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}