:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #ec4899;
  --accent: #f59e0b;
  --success: #10b981;

  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --border: #e2e8f0;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-primary: #0a0a0f;
  --bg-secondary: #13131a;
  --bg-card: #1a1a24;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --border: #2a2a3a;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  padding-top: 80px;
  padding-bottom: 2rem;
}

/* Animated Background */
.bg-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-gradient-1,
.bg-gradient-2,
.bg-gradient-3 {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
}

.bg-gradient-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3), transparent);
  top: -200px;
  left: -200px;
}

.bg-gradient-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.25), transparent);
  top: 40%;
  right: -150px;
  animation-delay: 7s;
}

.bg-gradient-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2), transparent);
  bottom: -200px;
  left: 40%;
  animation-delay: 14s;
}

.bg-mesh {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
      rgba(99, 102, 241, 0.02) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(99, 102, 241, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(20px, -30px) scale(1.05);
  }
  66% {
    transform: translate(-15px, 15px) scale(0.95);
  }
}

/* Floating Navigation */
.floating-nav {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 600px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: var(--transition);
}

[data-theme="dark"] .floating-nav {
  background: rgba(26, 26, 36, 0.85);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
}

.nav-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
}

.nav-actions {
  display: flex;
  gap: 0.5rem;
}

.nav-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
  color: var(--text-primary);
}

.nav-btn:active {
  transform: scale(0.95);
}

.nav-btn svg,
.nav-btn i {
  width: 18px;
  height: 18px;
  color: var(--text-primary);
}

/* Dark mode specific styling for nav buttons */
[data-theme="dark"] .nav-btn {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .nav-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .nav-btn i {
  color: var(--text-primary);
}

.theme-icon {
  width: 18px;
  height: 18px;
  position: absolute;
  transition: var(--transition);
}

.theme-icon.theme-light {
  color: #f59e0b !important;
}

.theme-icon.theme-dark {
  color: #6366f1 !important;
}

[data-theme="light"] .theme-light {
  opacity: 0;
  transform: rotate(-90deg);
}

[data-theme="light"] .theme-dark {
  opacity: 1;
  transform: rotate(0);
}

[data-theme="dark"] .theme-light {
  opacity: 1;
  transform: rotate(0);
}

[data-theme="dark"] .theme-dark {
  opacity: 0;
  transform: rotate(90deg);
}

/* Container */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Donate Header */
.donate-header {
  text-align: center;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.6s ease-out;
}

.donate-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ec4899, #ef4444);
  border-radius: 50%;
  animation: heartbeat 2s ease-in-out infinite;
}

.donate-icon i {
  width: 32px;
  height: 32px;
  color: white;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  10%,
  30% {
    transform: scale(1.1);
  }
  20% {
    transform: scale(0.95);
  }
}

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

.donate-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.donate-header p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* Donate Card */
.donate-card {
  background: transparent;
}

/* Section */
.section {
  margin-bottom: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.section-header i {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

/* Amount Input */
.amount-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0 1rem;
  transition: var(--transition);
}

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

.currency-symbol {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-right: 0.5rem;
}

.amount-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 1rem 0;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  outline: none;
}

.amount-input::placeholder {
  color: var(--text-tertiary);
}

.currency-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-left: 0.5rem;
}

/* Stars Conversion */
.stars-conversion {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.1),
    rgba(245, 158, 11, 0.1)
  );
  border-radius: var(--radius-md);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.stars-conversion i {
  width: 20px;
  height: 20px;
  color: #f59e0b;
}

.stars-conversion span {
  font-weight: 700;
  font-size: 1.125rem;
  color: #f59e0b;
}

.stars-label {
  font-size: 0.875rem !important;
  color: var(--text-secondary) !important;
  font-weight: 500 !important;
}

/* Quick Amounts */
.quick-amounts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.625rem;
}

.quick-amount-btn {
  padding: 0.875rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.quick-amount-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

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

.quick-amount-btn.selected {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: var(--primary);
  color: white;
}

/* Donation Message */
.donation-message {
  width: 100%;
  padding: 0.875rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text-primary);
  resize: vertical;
  transition: var(--transition);
}

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

.donation-message::placeholder {
  color: var(--text-tertiary);
}

.char-counter {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.375rem;
}

/* User ID Display */
.user-id-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.user-id-display span {
  flex: 1;
  font-weight: 600;
  color: var(--text-primary);
}

.user-id-display input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
}

/* Donate Button */
.donate-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #ec4899, #ef4444);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 1rem;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.3);
}

.donate-btn i {
  width: 20px;
  height: 20px;
}

.donate-btn:not(:disabled):hover {
  box-shadow: 0 6px 24px rgba(236, 72, 153, 0.4);
  transform: translateY(-2px);
}

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

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

/* Info Note */
.info-note {
  display: flex;
  gap: 0.75rem;
  padding: 0.875rem;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  margin-top: 1rem;
}

.info-note i {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.info-note p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Why Donate */
.why-donate {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.why-donate h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--text-primary);
}

.why-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.why-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.why-item i {
  width: 20px;
  height: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

.why-item span {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Responsive */
@media (max-width: 640px) {
  body {
    padding-top: 76px;
  }

  .container {
    padding: 0 0.75rem;
    padding-top: 0.75rem;
  }

  .section {
    padding: 1rem;
  }

  .section:first-child {
    margin-top: 0.5rem;
  }

  .donate-header h1 {
    font-size: 1.5rem;
  }

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

  .donate-icon i {
    width: 28px;
    height: 28px;
  }

  .amount-input {
    font-size: 1.75rem;
  }

  .quick-amounts {
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  }

  .why-items {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  body {
    padding-top: 80px;
  }

  .amount-input {
    font-size: 1.5rem;
  }
}