/* ============================================
   Theme System - CSS Variables
   ============================================ */

:root {
  /* Dark Theme (Default) */
  --bg-primary: #0f172a;
  --bg-secondary: #020617;
  --bg-tertiary: rgba(15, 23, 42, 0.9);
  --bg-card: rgba(15, 23, 42, 0.92);
  --bg-gradient-start: #020617;
  --bg-gradient-end: #020617;
  
  --text-primary: #f9fafb;
  --text-secondary: #e5e7eb;
  --text-tertiary: #d1d5db;
  --text-muted: #9ca3af;
  --text-light: #6b7280;
  
  --border-color: rgba(148, 163, 184, 0.25);
  --border-color-strong: rgba(148, 163, 184, 0.35);
  --border-color-accent: rgba(148, 163, 184, 0.4);
  
  --accent-green: #22c55e;
  --accent-green-dark: #16a34a;
  --accent-cyan: #38bdf8;
  --accent-cyan-light: #a5f3fc;
  --accent-yellow: #fbbf24;
  --accent-yellow-light: #fde68a;
  
  --shadow-color: rgba(15, 23, 42, 0.75);
  --shadow-color-light: rgba(15, 23, 42, 0.9);
  
  --color-success-bg: rgba(34, 197, 94, 0.09);
  --color-success-text: #bbf7d0;
  --color-success-border: rgba(34, 197, 94, 0.45);
  
  --color-info-bg: rgba(15, 118, 110, 0.22);
  --color-info-text: #a5f3fc;
  --color-info-border: rgba(45, 212, 191, 0.4);
  
  --color-blue-bg: rgba(30, 64, 175, 0.8);
  --color-blue-border: rgba(129, 140, 248, 0.25);
  
  --color-cyan-bg: rgba(56, 189, 248, 0.12);
  --color-cyan-text: #7dd3fc;
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: rgba(255, 255, 255, 0.95);
  --bg-card: rgba(255, 255, 255, 0.98);
  --bg-gradient-start: #f9fafb;
  --bg-gradient-end: #ffffff;
  
  --text-primary: #1f2937;
  --text-secondary: #374151;
  --text-tertiary: #6b7280;
  --text-muted: #9ca3af;
  --text-light: #d1d5db;
  
  --border-color: rgba(209, 213, 219, 0.5);
  --border-color-strong: rgba(209, 213, 219, 0.6);
  --border-color-accent: rgba(209, 213, 219, 0.7);
  
  --accent-green: #16a34a;
  --accent-green-dark: #15803d;
  --accent-cyan: #0369a1;
  --accent-cyan-light: #0284c7;
  --accent-yellow: #d97706;
  --accent-yellow-light: #f59e0b;
  
  --shadow-color: rgba(0, 0, 0, 0.1);
  --shadow-color-light: rgba(0, 0, 0, 0.08);
  
  --color-success-bg: rgba(34, 197, 94, 0.1);
  --color-success-text: #166534;
  --color-success-border: rgba(34, 197, 94, 0.3);
  
  --color-info-bg: rgba(6, 182, 212, 0.1);
  --color-info-text: #0e7490;
  --color-info-border: rgba(6, 182, 212, 0.3);
  
  --color-blue-bg: rgba(59, 130, 246, 0.1);
  --color-blue-border: rgba(59, 130, 246, 0.3);
  
  --color-cyan-bg: rgba(34, 211, 238, 0.1);
  --color-cyan-text: #0369a1;
}

/* ============================================
   Global Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Tajawal", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.7;
  direction: rtl;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

/* ============================================
   Layout
   ============================================ */

.page-wrapper {
  min-height: 100vh;
  padding: 32px 16px 48px;
  display: flex;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 1100px;
  background: radial-gradient(circle at top, var(--bg-gradient-start) 0, var(--bg-gradient-end) 40%, var(--bg-gradient-end) 100%);
  border-radius: 24px;
  border: 1px solid var(--border-color);
  box-shadow: 0 22px 45px var(--shadow-color);
  padding: 28px 22px 40px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.container::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
    circle at 0 0,
    rgba(56, 189, 248, 0.1),
    transparent 55%
  );
  pointer-events: none;
  z-index: -1;
  transition: background 0.3s ease;
}

/* ============================================
   Header
   ============================================ */

header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color-strong);
  padding-bottom: 16px;
  flex-wrap: wrap;
  transition: border-color 0.3s ease;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 0, #38bdf8, #0ea5e9 45%, #0369a1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.4);
  color: #0b1120;
  font-weight: 800;
  font-size: 20px;
  flex-shrink: 0;
}

.logo-text-main {
  font-weight: 800;
  font-size: 22px;
  color: var(--text-primary);
  letter-spacing: 0.03em;
}

.logo-text-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.badge-beta {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--color-success-bg);
  color: var(--color-success-text);
  font-size: 12px;
  border: 1px solid var(--color-success-border);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color-accent);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.theme-toggle:hover {
  background: var(--bg-card);
  border-color: var(--border-color-strong);
}

.theme-toggle span {
  font-size: 16px;
}

/* ============================================
   Main Content
   ============================================ */

main {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 32px;
  align-items: flex-start;
}

@media (max-width: 880px) {
  main {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
  position: relative;
  padding-left: 10px;
  padding-right: 10px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-info-bg);
  border-radius: 999px;
  padding: 4px 10px 4px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--color-info-border);
  font-size: 13px;
  color: var(--color-info-text);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.hero-badge span {
  background: var(--accent-green);
  color: #022c22;
  border-radius: 999px;
  font-size: 12px;
  padding: 2px 8px;
  font-weight: 700;
}

.hero-title {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text-primary);
  line-height: 1.3;
}

.hero-title span {
  background: linear-gradient(135deg, #22c55e, #67e8f9);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-subtitle {
  color: var(--text-tertiary);
  font-size: 16px;
  margin-bottom: 14px;
  line-height: 1.6;
}

.hero-subtitle strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.hero-list {
  list-style: none;
  margin: 10px 0 20px;
  padding: 0;
}

.hero-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 15px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

.hero-list li span.icon {
  margin-top: 4px;
  font-size: 16px;
  flex-shrink: 0;
}

.hero-list li strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.btn-primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #022c22;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 12px 25px rgba(34, 197, 94, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(34, 197, 94, 0.45);
}

.btn-primary span.icon {
  font-size: 16px;
}

.btn-secondary {
  background: var(--bg-tertiary);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px dashed var(--border-color-strong);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--border-color-accent);
}

.btn-secondary span.icon {
  font-size: 16px;
}

.hero-note {
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.5;
}

.hero-note strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.hero-note span.icon {
  font-size: 16px;
  flex-shrink: 0;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

@media (max-width: 640px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: var(--bg-tertiary);
  border-radius: 18px;
  padding: 10px 12px;
  border: 1px solid var(--border-color-accent);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
  line-height: 1.4;
}

.stat-tag {
  margin-top: 6px;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-block;
  background: var(--color-cyan-bg);
  color: var(--color-cyan-text);
  transition: background-color 0.3s ease;
}

/* ============================================
   Right Panel (Pricing)
   ============================================ */

.right-panel {
  background: radial-gradient(
    circle at 0 0,
    var(--color-blue-bg),
    var(--bg-tertiary)
  );
  border-radius: 20px;
  padding: 16px 16px 18px;
  border: 1px solid var(--color-blue-border);
  box-shadow: 0 18px 35px var(--shadow-color-light);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.right-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.right-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.right-subtitle {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

.trust-pill {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color-accent);
  color: var(--text-secondary);
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 880px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

.plan-card {
  background: var(--bg-card);
  border-radius: 18px;
  padding: 12px 13px 13px;
  border: 1px solid var(--border-color-accent);
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.plan-card.highlight {
  background: radial-gradient(
    circle at top,
    rgba(34, 197, 94, 0.18),
    var(--bg-card)
  );
  border-color: rgba(34, 197, 94, 0.65);
  box-shadow: 0 16px 30px rgba(22, 163, 74, 0.35);
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color-accent);
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  transition: background-color 0.3s ease;
}

.plan-badge span {
  font-size: 14px;
}

.plan-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.plan-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 10px;
  line-height: 1.5;
}

.plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}

.plan-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-yellow);
}

.plan-price span.currency {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-yellow-light);
}

.plan-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.plan-credits {
  font-size: 13px;
  color: var(--color-info-text);
  margin-bottom: 10px;
  line-height: 1.5;
}

.plan-credits strong {
  color: var(--color-cyan-text);
  font-weight: 600;
}

.plan-cta {
  margin-top: 6px;
}

.plan-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.plan-cta-primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #022c22;
  box-shadow: 0 12px 24px rgba(34, 197, 94, 0.35);
}

.plan-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(34, 197, 94, 0.45);
}

.plan-cta-secondary {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color-accent);
}

.plan-cta-secondary:hover {
  background: var(--bg-card);
  border-color: var(--border-color-strong);
}

.plan-cta a span.icon {
  font-size: 16px;
}

.plan-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

.bottom-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.6;
}

.bottom-note strong {
  color: var(--text-secondary);
  font-weight: 600;
}

/* ============================================
   Sections
   ============================================ */

section {
  margin-top: 26px;
}

section h2 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--text-primary);
  font-weight: 700;
}

section p {
  color: var(--text-tertiary);
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.6;
}

section ul {
  font-size: 14px;
  color: var(--text-tertiary);
  padding-right: 18px;
  margin: 6px 0;
  line-height: 1.6;
}

section ul li {
  margin-bottom: 4px;
}

/* ============================================
   FAQ Grid
   ============================================ */

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 880px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

.faq-item {
  background: var(--bg-tertiary);
  border-radius: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border-color-accent);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.faq-item h3 {
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--text-secondary);
  font-weight: 600;
}

.faq-item p {
  font-size: 14px;
  color: var(--text-tertiary);
  margin: 0;
  line-height: 1.5;
}

/* ============================================
   Divider
   ============================================ */

.divider {
  height: 1px;
  background: radial-gradient(
    90deg,
    var(--border-color-strong),
    rgba(15, 23, 42, 0.1)
  );
  margin: 18px 0 12px;
  transition: background 0.3s ease;
}

/* ============================================
   Footer
   ============================================ */

footer {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
  line-height: 1.6;
  transition: color 0.3s ease;
}

footer a {
  color: var(--text-muted);
  text-decoration: underline;
}

footer a:hover {
  color: var(--text-secondary);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 640px) {
  .page-wrapper {
    padding: 16px 12px 32px;
  }

  .container {
    padding: 20px 16px 32px;
    border-radius: 16px;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .header-controls {
    width: 100%;
    justify-content: space-between;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .hero-list li {
    font-size: 13px;
  }

  .btn-primary,
  .btn-secondary {
    font-size: 14px;
    padding: 8px 14px;
  }

  .right-title {
    font-size: 15px;
  }

  .plan-name {
    font-size: 15px;
  }

  .plan-price {
    font-size: 20px;
  }

  section h2 {
    font-size: 16px;
  }

  section p {
    font-size: 14px;
  }

  .faq-item h3 {
    font-size: 14px;
  }

  .faq-item p {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .page-wrapper {
    padding: 12px 8px 24px;
  }

  .container {
    padding: 16px 12px 24px;
    border-radius: 12px;
  }

  .logo-text-main {
    font-size: 18px;
  }

  .hero-title {
    font-size: 20px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
  body {
    background: white;
    color: black;
  }

  .container {
    box-shadow: none;
    border: none;
  }

  .theme-toggle {
    display: none;
  }
}
