:root {
  --bg: #050714;
  --card: rgba(255, 255, 255, 0.08);
  --card-solid: #ffffff;
  --text: #f9fbff;
  --muted: rgba(249, 251, 255, 0.7);
  --accent: #29c386;
  --accent-strong: #1f9f6d;
  --border: rgba(255, 255, 255, 0.15);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top right, #18307b, transparent 55%),
    radial-gradient(circle at 20% 20%, rgba(41, 195, 134, 0.35), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.12), transparent 35%);
  z-index: -2;
}

.gradient-bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 7, 20, 0.8), rgba(5, 7, 20, 0.95));
  z-index: -1;
}

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

a:hover {
  opacity: 0.85;
}

main,
.site-header,
.site-footer {
  width: min(1200px, 90%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0;
  backdrop-filter: blur(20px);
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  font-weight: 600;
}

.brand-title {
  font-weight: 600;
  margin: 0;
}

.brand-tagline {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
  font-size: 0.95rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.language-switch select {
  background: transparent;
  border: none;
  color: var(--text);
  font-weight: 500;
}

.language-switch select:focus {
  outline: none;
}

.button {
  border-radius: 999px;
  padding: 0.65rem 1.4rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--accent);
  color: #02140c;
}

.button.secondary,
.button.ghost {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  align-items: center;
  padding: 4rem 0 3rem;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  margin-bottom: 1rem;
}

.hero-subtitle {
  color: var(--muted);
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.trust-badges {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.trust-badges .badge-value {
  font-weight: 600;
  font-size: 1.4rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.app-card {
  width: min(360px, 90vw);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 1.5rem;
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  color: var(--muted);
}

.card-word {
  text-align: center;
  margin: 1.5rem 0;
}

.card-word .arabic {
  font-size: 2.3rem;
  margin: 0;
}

.card-word .translit {
  margin: 0.3rem 0;
  color: var(--muted);
}

.meaning {
  margin: 0;
  font-weight: 500;
}

.progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.progress-fill {
  width: 75%;
  height: 100%;
  background: linear-gradient(90deg, #29c386, #65f6b5);
}

.card-highlights {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--muted);
}

.panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 32px;
  padding: 3.5rem clamp(1.5rem, 5vw, 4rem);
  margin: 3rem auto;
  box-shadow: 0 50px 80px rgba(0, 0, 0, 0.25);
}

.panel.alt {
  background: rgba(255, 255, 255, 0.08);
}

.panel header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(41, 195, 134, 0.15);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}

.feature-card p {
  color: var(--muted);
  margin: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.step-card {
  padding: 2rem 1.5rem;
  background: rgba(5, 7, 20, 0.35);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.step-index {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  font-weight: 600;
  margin-bottom: 1rem;
}

.community-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  align-items: center;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: rgba(5, 7, 20, 0.45);
  border-radius: 18px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-value {
  font-size: 2rem;
  margin: 0;
}

.stat-label {
  color: var(--muted);
  margin: 0.35rem 0 0;
}

.cta {
  text-align: center;
}

.store-buttons {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.store.apple span {
  font-size: 1.8rem;
}

.store.play img {
  height: 44px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0 4rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

/* Privacy page */
.privacy-page main,
.privacy-page .site-header,
.privacy-page .site-footer {
  width: min(900px, 90%);
}

.privacy-header {
  justify-content: space-between;
}

.privacy-nav a {
  font-weight: 500;
  color: var(--text);
}

.privacy-main {
  padding: 3rem 0 2rem;
}

.privacy-hero h1 {
  font-size: clamp(2.25rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.privacy-hero p {
  color: var(--muted);
  max-width: 70ch;
}

.privacy-section {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 1.75rem;
  margin-top: 2rem;
  box-shadow: var(--shadow);
}

.privacy-section h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.privacy-section p {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--muted);
}

.privacy-section ul {
  padding-left: 1.2rem;
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.privacy-section li + li {
  margin-top: 0.35rem;
}

.privacy-footer {
  margin-top: 2rem;
  text-align: center;
}

@media (max-width: 768px) {
  .site-header {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .site-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .hero-cta,
  .trust-badges {
    flex-direction: column;
  }

  .site-footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

html[dir='rtl'] body {
  direction: rtl;
}

html[dir='rtl'] .hero-content,
html[dir='rtl'] .panel header,
html[dir='rtl'] .feature-card,
html[dir='rtl'] .step-card,
html[dir='rtl'] .stat-card,
html[dir='rtl'] .cta,
html[dir='rtl'] .site-footer {
  text-align: right;
}

html[dir='rtl'] .site-nav {
  margin-left: 0;
  margin-right: auto;
}

html[dir='rtl'] .hero-cta,
html[dir='rtl'] .trust-badges,
html[dir='rtl'] .store-buttons,
html[dir='rtl'] .footer-links {
  flex-direction: row-reverse;
}
