:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #ec4899;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --gradient-main: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.4);
  --font-heading: "Outfit", sans-serif;
  --font-heading-ar: "Cairo", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-body-ar: "Cairo", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* RTL Support */
html[dir="rtl"] body {
  font-family: var(--font-body-ar);
}

html[dir="rtl"] h1,
html[dir="rtl"] h3,
html[dir="rtl"] .logo {
  font-family: var(--font-heading-ar);
}

html[dir="rtl"] .logo {
  gap: 12px;
}

html[dir="rtl"] .btn {
  flex-direction: row-reverse; /* Keep icon on left visual or flip? generic usually flips but here let's keep icon logic */
}
/* Better RTL for specific elements */
html[dir="rtl"] .logo img {
  margin-left: 12px;
  margin-right: 0;
  border-radius: 10px;
}
/* Actually logo uses gap flex so just the direction of flex handles it */

/* Re-alignments for RTL */
html[dir="rtl"] .btn-primary span {
  align-items: flex-end; /* Align text to right in button */
}

/* Header Content */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lang-switch {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
  font-family: var(--font-body);
}

html[dir="rtl"] .lang-switch {
  font-family: var(--font-body-ar);
}

.lang-switch:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Background Effects */
.background-glow {
  position: fixed;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(99, 102, 241, 0.15) 0%,
    rgba(15, 23, 42, 0) 70%
  );
  z-index: -1;
  pointer-events: none;
}

html[dir="rtl"] .background-glow {
  right: auto;
  left: -10%;
}

/* Header */
.header {
  padding: 20px 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
}

.logo img {
  height: 40px;
  width: auto;
  border-radius: 10px;
}

/* Hero Section */
.hero {
  flex: 1;
  display: flex;
  align-items: center;
  padding-top: 100px;
  padding-bottom: 60px;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 100px;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 24px;
}

h1 {
  font-family: var(--font-heading);
  font-size: 4rem;
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 24px;
}

.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text p {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 480px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 32px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: var(--gradient-main);
  color: white;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 35px rgba(99, 102, 241, 0.4);
}

.btn-primary .icon {
  width: 24px;
  height: 24px;
}

.btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.btn-subtext {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
}

.meta-text {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Phone Mockup */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.phone-mockup {
  width: 300px;
  height: 600px;
  background: #000;
  border-radius: 40px;
  border: 8px solid #333;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  z-index: 2;
  overflow: hidden;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-screen img {
  width: 200px;
  height: 200px;
  border-radius: 20px;
}

.app-screen-placeholder {
  width: 80px;
  opacity: 0.8;
}

/* Floating Cards */
.floating-card {
  position: absolute;
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(12px);
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 3;
  animation: float 6s ease-in-out infinite;
}

.card-1 {
  top: 20%;
  left: -20px;
  animation-delay: 0s;
}

html[dir="rtl"] .card-1 {
  left: auto;
  right: -20px;
}

.card-2 {
  bottom: 20%;
  right: -20px;
  animation-delay: 3s;
}

html[dir="rtl"] .card-2 {
  right: auto;
  left: -20px;
}

.icon-box {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.text-box {
  display: flex;
  flex-direction: column;
}

.text-box strong {
  font-size: 0.875rem;
  color: var(--text-main);
}

.text-box span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Features */
.features {
  padding: 80px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(15, 23, 42, 0.5);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.feature-card {
  background: var(--bg-card);
  padding: 30px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  background: rgba(30, 41, 59, 0.8);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 20px;
  background: rgba(99, 102, 241, 0.1);
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Footer */
.footer {
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 968px) {
  h1 {
    font-size: 3rem;
  }
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .hero-text p {
    margin: 0 auto 40px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .card-1 {
    left: 0;
  }
  .card-2 {
    right: 0;
  }
}

/* Secondary Button */
.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.download-area {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  gap: 16px;
  align-items: center; /* Align items vertically */
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: var(--bg-card);
  margin: 15% auto;
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  position: relative;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.3s ease-out forwards;
}


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

.close {
  color: var(--text-muted);
  position: absolute;
  top: 20px;
  right: 25px; /* LTR Position */
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

html[dir="rtl"] .close {
  right: auto;
  left: 25px; /* RTL Position */
}

.close:hover,
.close:focus {
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
}

.modal-content h2 {
  font-family: var(--font-heading);
  color: var(--text-main);
  margin-bottom: 16px;
}

html[dir="rtl"] .modal-content h2 {
  font-family: var(--font-heading-ar);
}

.modal-content p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 1.1rem;
}

.modal-btn {
  /* Specific styles for button inside modal if needed, currently reusing btn-primary */
  width: 100%;
}

.modal-subtext {
  font-size: 0.875rem !important;
  margin-top: 16px;
  opacity: 0.7;
}

@media (max-width: 480px) {
  h1 {
    font-size: 2.5rem;
  }
  .btn {
    width: 100%;
  }
  .floating-card {
    display: none;
  }
  .download-area {
    flex-direction: column;
    align-items: stretch; /* Stretch buttons to full width */
  }
  .btn {
    width: 100%;
  }
}

