/* ============================================
   AL-AHIBBA MOSCHEE — SPENDEN-WEBAPP
   Offizielle Farben:
   #1e6044 (Grün), #e4b216 (Gold), #f9f6ed (Creme)
   ============================================ */

:root {
  --green: #1e6044;
  --green-dark: #154832;
  --green-light: #2a8460;
  --gold: #e4b216;
  --gold-light: #f0c83d;
  --cream: #f9f6ed;
  --cream-dark: #f0ead8;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --white: #ffffff;
  --error: #c44545;
  --shadow-sm: 0 2px 8px rgba(30, 96, 68, 0.08);
  --shadow-md: 0 8px 24px rgba(30, 96, 68, 0.12);
  --shadow-lg: 0 16px 48px rgba(30, 96, 68, 0.18);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Manrope', -apple-system, sans-serif;
  --font-numbers: 'Montserrat', -apple-system, sans-serif;
  --font-arabic: 'Amiri', 'Traditional Arabic', serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  user-select: none;
  -webkit-user-select: none;
}

body {
  overscroll-behavior: none;
  position: relative;
}

/* ============================================
   HINTERGRUND-MUSTER (geometrisch, dezent)
   ============================================ */
.bg-pattern {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 20% 80%, rgba(228, 178, 22, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(30, 96, 68, 0.06) 0%, transparent 40%);
  pointer-events: none;
}

.bg-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%231e6044' fill-opacity='0.025'%3E%3Cpath d='M40 0L80 40L40 80L0 40Z' fill='none' stroke='%231e6044' stroke-width='0.5'/%3E%3Ccircle cx='40' cy='40' r='3'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.6;
}

/* ============================================
   SPRACHWECHSLER
   ============================================ */
.lang-switcher {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  gap: 6px;
  background: var(--white);
  padding: 6px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  z-index: 100;
}

[dir="rtl"] .lang-switcher {
  right: auto;
  left: 24px;
}

.lang-btn {
  background: transparent;
  border: none;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 999px;
  transition: all 0.25s ease;
  min-width: 56px;
}

.lang-btn:hover {
  color: var(--green);
}

.lang-btn.active {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(30, 96, 68, 0.3);
}

/* ============================================
   SCREEN-SYSTEM
   ============================================ */
.screen {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
  -webkit-overflow-scrolling: touch;
  display: none;
}

.screen.active {
  display: block;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 32px 32px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* ============================================
   LOGO / HEADER
   ============================================ */
.logo-header {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  animation: fadeInDown 0.6s ease 0.1s both;
}

.logo {
  width: 200px;
  height: auto;
  max-width: 55%;
}

/* ============================================
   AYAH / HADITH KARTE
   ============================================ */
.ayah-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 36px;
  margin-top: 32px;
  box-shadow: var(--shadow-md);
  text-align: center;
  position: relative;
  border: 1px solid rgba(30, 96, 68, 0.08);
  animation: fadeInUp 0.6s ease 0.4s both;
}

.ayah-card::before,
.ayah-card::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border: 2px solid var(--gold);
}

.ayah-card::before {
  top: -1px;
  left: -1px;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: var(--radius-lg);
}

.ayah-card::after {
  bottom: -1px;
  right: -1px;
  border-left: none;
  border-top: none;
  border-bottom-right-radius: var(--radius-lg);
}

.ayah-arabic {
  font-family: var(--font-arabic);
  font-size: 32px;
  line-height: 1.8;
  color: var(--green);
  margin-bottom: 20px;
  direction: rtl;
}

.ayah-translation {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.5;
  color: var(--text);
  font-style: italic;
  margin-bottom: 12px;
  font-weight: 500;
}

.ayah-source {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ============================================
   ÜBERSCHRIFTEN
   ============================================ */
.screen-title {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  margin-bottom: 32px;
  line-height: 1.2;
  animation: fadeInUp 0.6s ease 0.2s both;
}

[lang="ar"] .screen-title,
[dir="rtl"] .screen-title {
  font-family: var(--font-arabic);
  font-weight: 700;
}

/* ============================================
   ZWECK-KARTEN (Homepage)
   ============================================ */
.purpose-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.purpose-card {
  background: var(--white);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  padding: 40px 28px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.purpose-card .purpose-icon,
.purpose-card .purpose-title,
.purpose-card .purpose-subtitle {
  position: relative;
  z-index: 1;
}

/* === "Laufende Kosten" — Grün-Puls === */
.purpose-card[data-purpose="alltag"] {
  animation: pulseGreen 5s ease-in-out infinite;
}

.purpose-card[data-purpose="alltag"] .purpose-icon {
  color: var(--green);
  animation: textPulseLight 5s ease-in-out infinite;
}

.purpose-card[data-purpose="alltag"] .purpose-title {
  color: var(--text);
  animation: textPulseLight 5s ease-in-out infinite;
}

.purpose-card[data-purpose="alltag"] .purpose-subtitle {
  color: var(--text-muted);
  animation: textPulseMuted 5s ease-in-out infinite;
}

@keyframes pulseGreen {
  0%, 100% {
    background: var(--white);
    border-color: transparent;
    box-shadow: var(--shadow-sm);
    transform: translateY(0);
  }
  35%, 55% {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    border-color: var(--gold);
    box-shadow: 0 12px 32px rgba(30, 96, 68, 0.3);
    transform: translateY(-2px);
  }
}

@keyframes textPulseLight {
  0%, 100% { color: var(--text); }
  35%, 55% { color: var(--white); }
}

@keyframes textPulseMuted {
  0%, 100% { color: var(--text-muted); }
  35%, 55% { color: rgba(255, 255, 255, 0.9); }
}

/* === "Moschee-Kaufprojekt" — Gold-Puls (versetzt) === */
.purpose-card[data-purpose="moschee"] {
  animation: pulseGold 5s ease-in-out infinite;
  animation-delay: 2.5s; /* Versetzt zu Alltag */
}

.purpose-card[data-purpose="moschee"] .purpose-icon {
  color: var(--green);
  animation: textPulseDark 5s ease-in-out infinite;
  animation-delay: 2.5s;
}

.purpose-card[data-purpose="moschee"] .purpose-title {
  color: var(--text);
  animation: textPulseDark 5s ease-in-out infinite;
  animation-delay: 2.5s;
}

.purpose-card[data-purpose="moschee"] .purpose-subtitle {
  color: var(--text-muted);
  animation: textPulseDarkMuted 5s ease-in-out infinite;
  animation-delay: 2.5s;
}

@keyframes pulseGold {
  0%, 100% {
    background: var(--white);
    border-color: transparent;
    box-shadow: var(--shadow-sm);
    transform: translateY(0);
  }
  35%, 55% {
    background: linear-gradient(135deg, var(--gold) 0%, #d4a012 100%);
    border-color: var(--green);
    box-shadow: 0 12px 32px rgba(228, 178, 22, 0.45);
    transform: translateY(-2px);
  }
}

@keyframes textPulseDark {
  0%, 100% { color: var(--text); }
  35%, 55% { color: #1a1a1a; }
}

@keyframes textPulseDarkMuted {
  0%, 100% { color: var(--text-muted); }
  35%, 55% { color: #3a3a3a; }
}

/* Beim Tippen — kurzer Feedback-Effekt */
.purpose-card:active {
  transform: scale(0.97);
}

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
  .purpose-card,
  .purpose-card .purpose-icon,
  .purpose-card .purpose-title,
  .purpose-card .purpose-subtitle {
    animation: none;
  }
}

.purpose-icon {
  width: 72px;
  height: 72px;
}

.purpose-icon svg {
  width: 100%;
  height: 100%;
}

.purpose-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
}

.purpose-subtitle {
  font-size: 15px;
  line-height: 1.4;
}

/* ============================================
   ZURÜCK-BUTTON
   ============================================ */
.back-btn {
  background: var(--white);
  border: none;
  padding: 12px 20px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  color: var(--green);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  align-self: flex-start;
  margin-bottom: 24px;
}

.back-btn:hover {
  background: var(--green);
  color: var(--white);
}

.back-btn svg {
  width: 18px;
  height: 18px;
}

[dir="rtl"] .back-btn svg {
  transform: scaleX(-1);
}

/* ============================================
   ZWECK-BADGE (auf Betragsseite)
   ============================================ */
.purpose-badge {
  background: rgba(30, 96, 68, 0.08);
  color: var(--green);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  align-self: center;
  margin-bottom: 20px;
  border: 1px solid rgba(30, 96, 68, 0.15);
}

/* ============================================
   BETRAG-RASTER
   ============================================ */
.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 36px;
  animation: fadeInUp 0.6s ease 0.4s both;
}

.amount-btn {
  background: var(--white);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 28px 16px;
  font-family: var(--font-numbers);
  font-size: 28px;
  font-weight: 600;
  color: var(--green);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  letter-spacing: 0.5px;
}

.amount-btn:hover,
.amount-btn:active {
  background: var(--green);
  color: var(--white);
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ============================================
   EIGENER BETRAG
   ============================================ */
.custom-amount-section {
  animation: fadeInUp 0.6s ease 0.5s both;
}

.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 32px 0 24px;
  color: var(--text-muted);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(30, 96, 68, 0.2), transparent);
}

.custom-input-wrapper {
  position: relative;
  display: flex;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  transition: border-color 0.25s ease;
  margin-bottom: 20px;
}

.custom-input-wrapper:focus-within {
  border-color: var(--gold);
}

.custom-amount-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 24px 28px;
  font-family: var(--font-numbers);
  font-size: 32px;
  font-weight: 600;
  color: var(--green);
  outline: none;
  width: 100%;
  text-align: center;
  letter-spacing: 0.5px;
}

.custom-amount-input::placeholder {
  color: rgba(30, 96, 68, 0.3);
}

.currency-symbol {
  display: flex;
  align-items: center;
  padding-right: 28px;
  font-family: var(--font-numbers);
  font-size: 32px;
  font-weight: 600;
  color: var(--green);
}

[dir="rtl"] .currency-symbol {
  padding-right: 0;
  padding-left: 28px;
}

/* ============================================
   WEITER-BUTTON
   ============================================ */
.continue-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: var(--white);
  border: none;
  padding: 22px 32px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.continue-btn:not(:disabled) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.continue-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--green-light) 0%, var(--green) 100%);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.continue-btn svg {
  width: 22px;
  height: 22px;
}

[dir="rtl"] .continue-btn svg {
  transform: scaleX(-1);
}

/* ============================================
   PAYMENT-SCREEN
   ============================================ */
.payment-container {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
}

.payment-icon-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(30, 96, 68, 0.15);
  animation: pulse 2s ease-out infinite;
}

.payment-pulse::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(30, 96, 68, 0.15);
  animation: pulse 2s ease-out infinite 1s;
}

.payment-icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg);
}

.payment-icon svg {
  width: 56px;
  height: 56px;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.payment-subtitle {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 24px;
  line-height: 1.5;
}

.payment-amount-display {
  background: var(--white);
  padding: 24px 48px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  margin-bottom: 40px;
  border: 2px solid var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.amount-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

.amount-value {
  font-family: var(--font-numbers);
  font-size: 56px;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
  letter-spacing: 1px;
}

/* ============================================
   TIMER
   ============================================ */
.timer-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 32px;
}

.timer-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-bg {
  fill: none;
  stroke: rgba(30, 96, 68, 0.1);
  stroke-width: 6;
}

.timer-fg {
  fill: none;
  stroke: var(--gold);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}

.timer-fg.warning {
  stroke: var(--error);
}

.timer-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-numbers);
  font-size: 36px;
  font-weight: 700;
  color: var(--green);
}

/* ============================================
   GERÄT-HINWEIS (animierter Pfeil nach unten)
   ============================================ */
.device-hint {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
}

.device-hint-text {
  background: var(--error);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 16px rgba(196, 69, 69, 0.4);
  position: relative;
  animation: hintPulse 2.4s ease-in-out infinite;
}

@keyframes hintPulse {
  0%, 100% {
    box-shadow: 0 4px 16px rgba(196, 69, 69, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 8px 28px rgba(196, 69, 69, 0.65);
    transform: scale(1.04);
  }
}

/* Drei nacheinander animierte Pfeile (Wave nach unten) */
.arrow-wave {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--error);
  margin-top: 4px;
}

.arrow-wave svg {
  width: 56px;
  height: 32px;
  opacity: 0;
  animation: arrowWave 1.8s ease-in-out infinite;
}

.arrow-wave svg:nth-child(1) {
  animation-delay: 0s;
}

.arrow-wave svg:nth-child(2) {
  animation-delay: 0.25s;
}

.arrow-wave svg:nth-child(3) {
  animation-delay: 0.5s;
}

@keyframes arrowWave {
  0% {
    opacity: 0;
    transform: translateY(-12px);
  }
  40% {
    opacity: 1;
    transform: translateY(0);
  }
  80%, 100% {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* Bewegungs-Empfindlichkeit respektieren */
@media (prefers-reduced-motion: reduce) {
  .device-hint-text {
    animation: none;
  }
  .arrow-wave svg {
    animation: none;
    opacity: 0.7;
  }
  .arrow-wave svg:nth-child(2) { opacity: 0.85; }
  .arrow-wave svg:nth-child(3) { opacity: 1; }
}
/* Sprachwechsler beim Bezahlen ausblenden — wird via JS gesteuert (Klasse .hide-on-payment) */
.lang-switcher.hide-lang {
  display: none;
}

/* ============================================
   SCHLIEßEN-BUTTON (X oben, Zahlungs-Screen)
   ============================================
   Positionierung: immer auf der GEGENÜBERLIEGENDEN Seite
   des Sprachwechslers, damit nichts überlappt.
   - LTR (DE/EN): Sprache rechts → X links
   - RTL (AR):    Sprache links → X rechts
*/
.close-btn {
  position: fixed;
  top: 24px;
  left: 24px;
  right: auto;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: var(--white);
  color: var(--error);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 100;
  transition: all 0.25s ease;
  padding: 0;
}

.close-btn svg {
  width: 24px;
  height: 24px;
}

.close-btn:hover,
.close-btn:active {
  background: var(--error);
  color: var(--white);
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(196, 69, 69, 0.4);
}

/* RTL: X auf die rechte Seite (gegenüber vom Sprachwechsler links) */
[dir="rtl"] .close-btn {
  left: auto;
  right: 24px;
}

@media (max-width: 768px) {
  .close-btn {
    top: 16px;
    left: 16px;
    width: 44px;
    height: 44px;
  }
  [dir="rtl"] .close-btn {
    left: auto;
    right: 16px;
  }
  .close-btn svg {
    width: 20px;
    height: 20px;
  }
}

/* ============================================
   ERFOLG
   ============================================ */
.success-container {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.success-icon {
  width: 140px;
  height: 140px;
  color: var(--green);
  margin-bottom: 32px;
}

.success-icon svg {
  width: 100%;
  height: 100%;
}

.success-circle {
  stroke-dasharray: 352;
  stroke-dashoffset: 352;
  animation: drawCircle 0.6s ease forwards;
}

.success-check {
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: drawCheck 0.4s ease 0.5s forwards;
}

@keyframes drawCircle {
  to { stroke-dashoffset: 0; }
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

.success-title {
  font-family: var(--font-arabic);
  font-size: 56px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 16px;
  animation: fadeInUp 0.6s ease 0.7s both;
}

.success-subtitle {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text);
  font-style: italic;
  margin-bottom: 32px;
  max-width: 520px;
  line-height: 1.5;
  animation: fadeInUp 0.6s ease 0.8s both;
}

.success-amount {
  background: var(--white);
  padding: 16px 36px;
  border-radius: 999px;
  font-family: var(--font-numbers);
  font-size: 36px;
  font-weight: 700;
  color: var(--green);
  border: 2px solid var(--gold);
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
  animation: fadeInUp 0.6s ease 0.9s both;
  letter-spacing: 1px;
}

.success-redirect {
  font-size: 14px;
  color: var(--text-muted);
  animation: fadeInUp 0.6s ease 1s both;
}

/* ============================================
   FEHLER-SCREEN
   ============================================ */
.error-container {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-icon {
  width: 120px;
  height: 120px;
  color: var(--error);
  margin-bottom: 24px;
}

.error-icon svg {
  width: 100%;
  height: 100%;
}

.error-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.error-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 16px;
  max-width: 480px;
  line-height: 1.5;
}

.error-retry-info {
  font-size: 14px;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 32px;
}

.error-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-primary,
.btn-secondary {
  padding: 16px 32px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  min-width: 180px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--white);
  color: var(--green);
  border: 2px solid rgba(30, 96, 68, 0.2);
}

.btn-secondary:hover {
  background: rgba(30, 96, 68, 0.05);
  border-color: var(--green);
}

/* ============================================
   TOAST
   ============================================ */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--green-dark);
  color: var(--white);
  padding: 16px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 90%;
  text-align: center;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   ANIMATIONEN
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ============================================
   RTL-SUPPORT (Arabisch)
   ============================================ */
[dir="rtl"] {
  font-family: var(--font-arabic);
}

/* Zahlen bleiben in allen Sprachen Montserrat — auch in Arabisch.
   Beträge sind universal lesbar. */
[dir="rtl"] .amount-btn,
[dir="rtl"] .custom-amount-input,
[dir="rtl"] .currency-symbol,
[dir="rtl"] .amount-value,
[dir="rtl"] .timer-text,
[dir="rtl"] .success-amount {
  font-family: var(--font-numbers);
}

[dir="rtl"] .ayah-arabic {
  font-size: 38px;
}

[dir="rtl"] .ayah-translation {
  font-family: var(--font-arabic);
  font-style: normal;
  font-size: 24px;
  font-weight: 700;
}

[dir="rtl"] .purpose-title,
[dir="rtl"] .screen-title,
[dir="rtl"] .error-title {
  font-family: var(--font-arabic);
  font-weight: 700;
}

/* ============================================
   RESPONSIVE — TABLETS UND KLEINER
   ============================================ */
@media (max-width: 768px) {
  .container {
    padding: 32px 20px 24px;
  }

  .lang-switcher {
    top: 16px;
    right: 16px;
    padding: 4px;
  }

  [dir="rtl"] .lang-switcher {
    right: auto;
    left: 16px;
  }

  .lang-btn {
    padding: 8px 14px;
    font-size: 13px;
    min-width: 48px;
  }

  .logo {
    width: 160px;
  }

  .ayah-card {
    padding: 24px 24px;
    margin-bottom: 32px;
  }

  .ayah-arabic {
    font-size: 24px;
  }

  .ayah-translation {
    font-size: 17px;
  }

  .screen-title {
    font-size: 28px;
    margin-bottom: 24px;
  }

  .purpose-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .purpose-card {
    padding: 28px 20px;
  }

  .purpose-icon {
    width: 56px;
    height: 56px;
  }

  .purpose-title {
    font-size: 22px;
  }

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

  .amount-btn {
    padding: 22px 14px;
    font-size: 22px;
  }

  .custom-amount-input,
  .currency-symbol {
    font-size: 26px;
  }

  .amount-value {
    font-size: 44px;
  }

  .success-title {
    font-size: 42px;
  }

  .success-subtitle {
    font-size: 18px;
  }

  .device-hint {
    margin-top: 32px;
  }

  .device-hint-text {
    font-size: 14px;
    padding: 10px 22px;
  }

  .arrow-wave svg {
    width: 44px;
    height: 26px;
  }

  .error-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}

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

  .amount-btn {
    padding: 18px 10px;
    font-size: 19px;
  }

  .ayah-arabic {
    font-size: 20px;
  }
}

/* ============================================
   LANDSCAPE-MODE (Tablet quer)
   ============================================ */
@media (min-width: 1024px) and (orientation: landscape) {
  .amount-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
