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

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #0f172a 0, #020617 40%, #020617 100%);
  color: #e5e7eb;
  min-height: 100vh;
  padding: 1.5rem;
  direction: rtl;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  margin-bottom: 1.5rem;
  border-radius: 999px;
}

.nav nav {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
}

.nav nav a {
  opacity: 0.8;
}

.nav nav a:hover {
  opacity: 1;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.logo .dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #a3e635);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.8);
}

.mode-toggle {
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.6fr);
  gap: 1.5rem;
  padding: 1.8rem;
  border-radius: 1.8rem;
  margin-bottom: 2.5rem;
}

.hero-text h1 {
  font-size: 2rem;
  line-height: 1.3;
  margin-bottom: 0.6rem;
}

.subtitle {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-bottom: 1.1rem;
}

.badge {
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
  margin-bottom: 0.6rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.btn {
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(18px);
  cursor: pointer;
}

.btn.small {
  font-size: 0.8rem;
  padding-inline: 0.9rem;
}

.btn.primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: transparent;
  color: #022c22;
  font-weight: 600;
}

.btn.ghost {
  background: transparent;
}

.btn:hover {
  transform: translateY(-1px);
}

.hero-card {
  padding: 1.4rem;
  border-radius: 1.4rem;
}

.hero-card h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.stat {
  padding: 0.7rem 0.8rem;
  border-radius: 0.9rem;
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.12), rgba(15, 23, 42, 0.9));
}

.stat-label {
  display: block;
  font-size: 0.7rem;
  opacity: 0.8;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.pill {
  font-size: 0.7rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px dashed rgba(148, 163, 184, 0.6);
}

.mini-footer {
  font-size: 0.75rem;
  opacity: 0.85;
}

.ayah {
  font-size: 0.8rem;
  margin-top: 0.7rem;
  opacity: 0.9;
}

.ayah-ref {
  opacity: 0.7;
  margin-right: 0.3rem;
}

.section {
  margin-bottom: 2.4rem;
}

.section h2 {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.section-subtitle {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-bottom: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  padding: 1rem;
  border-radius: 1.2rem;
  font-size: 0.9rem;
}

.card h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.steps {
  font-size: 0.9rem;
  line-height: 1.7;
  padding-right: 1.2rem;
  margin-bottom: 1rem;
}

.steps li + li {
  margin-top: 0.1rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8rem;
  background: rgba(15, 23, 42, 0.8);
  padding: 0.1rem 0.35rem;
  border-radius: 0.4rem;
}

.footer {
  font-size: 0.8rem;
  opacity: 0.7;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.glass {
  background: radial-gradient(circle at top, rgba(148, 163, 184, 0.12), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(20px);
}

.glass.strong {
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.18), rgba(15, 23, 42, 0.98));
}

.section.last {
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .nav nav {
    display: none;
  }

  body {
    padding: 1rem;
  }
}

@media (max-width: 640px) {
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding: 1.2rem;
  }

  .stats-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

body.light {
  background: radial-gradient(circle at top, #e0f2fe 0, #f9fafb 35%, #e5e7eb 100%);
  color: #020617;
}

body.light .glass {
  background: radial-gradient(circle at top, rgba(148, 163, 184, 0.09), rgba(255, 255, 255, 0.96));
  border-color: rgba(148, 163, 184, 0.4);
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.8);
}

body.light .glass.strong {
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.16), rgba(255, 255, 255, 0.98));
}

body.light .badge {
  background: rgba(22, 163, 74, 0.1);
  color: #166534;
}

body.light .btn {
  background: rgba(255, 255, 255, 0.9);
}

body.light .btn.ghost {
  background: transparent;
}

body.light code {
  background: rgba(15, 23, 42, 0.06);
}
