/* ==========================================================================
   XARJI | خەرجی - APP LANDING PAGE & DOWNLOAD STYLES
   ========================================================================== */

:root {
  /* Core Color Palette matching Flutter App */
  --bg-dark: #0D1321;
  --surface-dark: #111A2B;
  --surface-card: #182236;
  --surface-hover: #1F2E48;
  --border-color: #1E293B;
  --border-glow: rgba(16, 185, 129, 0.3);

  /* Primary Accents */
  --mint-accent: #10B981;
  --mint-glow: rgba(16, 185, 129, 0.25);
  --mint-light: #B8F4D2;
  
  --coral-accent: #FF947A;
  --coral-glow: rgba(255, 148, 122, 0.25);
  
  --blue-accent: #38BDF8;
  --purple-accent: #818CF8;
  
  /* Text Colors */
  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  
  /* Default System Fonts to prevent broken fonts on mobile */
  --font-arabic-kurdish: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-english: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Basic Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-arabic-kurdish);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Container */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Background Ambient Glows & Grid */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(130px);
  pointer-events: none;
  z-index: -2;
  opacity: 0.45;
  animation: pulseGlow 10s ease-in-out infinite alternate;
}

.bg-glow-mint {
  width: 450px;
  height: 450px;
  top: -100px;
  right: -100px;
  background: radial-gradient(circle, var(--mint-accent) 0%, transparent 70%);
}

.bg-glow-coral {
  width: 400px;
  height: 400px;
  bottom: -50px;
  left: -100px;
  background: radial-gradient(circle, var(--coral-accent) 0%, transparent 70%);
}

.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: -3;
  pointer-events: none;
}

/* Floating Widgets Background Animation */
.floating-widget {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(17, 26, 43, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 1;
  animation: floatAnimation 8s ease-in-out infinite alternate;
}

.widget-1 {
  top: 18%;
  right: 5%;
  animation-delay: 0s;
}

.widget-2 {
  top: 55%;
  left: 4%;
  animation-delay: 2.5s;
}

.widget-3 {
  bottom: 22%;
  right: 6%;
  animation-delay: 4.5s;
}

@media (max-width: 900px) {
  .floating-widget {
    display: none;
  }
}

.widget-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.icon-income {
  background: rgba(16, 185, 129, 0.15);
  color: var(--mint-accent);
}

.icon-expense {
  background: rgba(255, 148, 122, 0.15);
  color: var(--coral-accent);
}

.icon-shield {
  background: rgba(56, 189, 248, 0.15);
  color: var(--blue-accent);
}

.widget-content {
  display: flex;
  flex-direction: column;
}

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

.widget-amount {
  font-size: 0.9rem;
  font-weight: 700;
}

.text-mint { color: var(--mint-accent); }
.text-coral { color: var(--coral-accent); }

/* Header & Language Picker */
.navbar {
  padding: 24px 0;
  z-index: 10;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nav-brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-main);
}

.language-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-dark);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 24px;
  transition: var(--transition-fast);
}

.language-picker:hover {
  border-color: var(--mint-accent);
  box-shadow: 0 0 15px var(--mint-glow);
}

.lang-icon {
  display: flex;
  align-items: center;
  color: var(--text-muted);
}

.language-picker select {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

.language-picker select option {
  background: var(--surface-dark);
  color: var(--text-main);
}

/* Hero Main Section */
.hero-section {
  padding: 30px 0 60px 0;
  position: relative;
  z-index: 2;
}

.hero-card {
  background: rgba(17, 26, 43, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 28px;
  padding: 48px 36px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--mint-accent), var(--coral-accent), transparent);
}

/* App Logo Styling */
.logo-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 24px auto;
}

.app-logo {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  object-fit: cover;
  position: relative;
  z-index: 2;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-wrapper:hover .app-logo {
  transform: scale(1.05) rotate(2deg);
}

.logo-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110px;
  height: 110px;
  border-radius: 28px;
  background: var(--mint-glow);
  filter: blur(15px);
  z-index: 1;
  animation: logoPulse 3s ease-in-out infinite alternate;
}

.app-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.app-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--mint-accent);
  margin-bottom: 16px;
}

.hero-description {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 36px auto;
  line-height: 1.7;
}

/* Download Actions Section */
.download-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}

@media (min-width: 640px) {
  .download-actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* Common Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  border-radius: 18px;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-smooth);
  width: 100%;
  max-width: 340px;
  border: none;
  position: relative;
  box-sizing: border-box;
}

/* Android Button */
.btn-android {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
}

.btn-android:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 35px rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
}

.pulse-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 18px;
  border: 2px solid var(--mint-accent);
  animation: buttonPulse 2.5s infinite;
  pointer-events: none;
}

/* iOS Button */
.btn-ios-wrapper {
  width: 100%;
  max-width: 340px;
}

.btn-ios {
  background: var(--surface-dark);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  cursor: not-allowed;
  opacity: 0.85;
  justify-content: space-between;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-text {
  display: flex;
  flex-direction: column;
  text-align: start;
  flex: 1;
}

.btn-primary-text {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.btn-secondary-text {
  font-size: 0.78rem;
  opacity: 0.85;
  margin-top: 2px;
}

.btn-arrow {
  display: flex;
  align-items: center;
  transition: transform var(--transition-fast);
}

.btn-android:hover .btn-arrow {
  transform: translateY(2px);
}

.badge-coming-soon {
  background: rgba(255, 148, 122, 0.15);
  color: var(--coral-accent);
  border: 1px solid rgba(255, 148, 122, 0.3);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

/* App Specs Chips */
.app-specs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.spec-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 36px;
}

.feature-card {
  background: var(--surface-dark);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: 20px;
  text-align: start;
  transition: var(--transition-smooth);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--surface-card);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-mint {
  background: rgba(16, 185, 129, 0.12);
  color: var(--mint-accent);
}

.feature-blue {
  background: rgba(56, 189, 248, 0.12);
  color: var(--blue-accent);
}

.feature-coral {
  background: rgba(255, 148, 122, 0.12);
  color: var(--coral-accent);
}

.feature-purple {
  background: rgba(129, 140, 248, 0.12);
  color: var(--purple-accent);
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

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

/* Animations */
@keyframes logoPulse {
  0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.4; }
  100% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.8; }
}

@keyframes buttonPulse {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.04); opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}

@keyframes pulseGlow {
  0% { opacity: 0.3; transform: scale(0.95); }
  100% { opacity: 0.55; transform: scale(1.1); }
}

@keyframes floatAnimation {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-16px); }
}
