/* ========================================
   INDEX PAGE - HOME + TABS NAVIGATION
   SIMPLE & CLEAN DESIGN
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* ========================================
   ROOT VARIABLES
   ======================================== */
:root {
  --bg-primary: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 100%);
  --bg-surface: rgba(255, 255, 255, 0.95);
  --bg-card: rgba(255, 255, 255, 0.9);
  --text-primary: #064e3b;
  --text-secondary: #047857;
  --text-tertiary: #6b7280;
  --accent: #10b981;
  --accent-dark: #059669;
  --accent-soft: #d1fae5;
  --accent-mist: #ecfdf5;
  --border-light: rgba(255, 255, 255, 0.4);
  --border-solid: #e2e8f0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
}

body.dark {
  --bg-primary: linear-gradient(145deg, #0a0f1c 0%, #0f172a 100%);
  --bg-surface: rgba(17, 24, 39, 0.95);
  --bg-card: rgba(17, 24, 39, 0.9);
  --text-primary: #ecfdf5;
  --text-secondary: #a7f3d0;
  --text-tertiary: #94a3b8;
  --accent: #34d399;
  --accent-dark: #10b981;
  --accent-soft: #1a3a2c;
  --accent-mist: #0b241b;
  --border-light: rgba(255, 255, 255, 0.05);
  --border-solid: #1f2a3e;
}

body {
  font-family: 'Inter', 'Cairo', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========================================
   SPLASH SCREEN
   ======================================== */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}
.splash-screen.hide { opacity: 0; pointer-events: none; }
.splash-content { text-align: center; animation: fadeInUp 0.6s ease; }
.splash-icon {
  font-size: 4rem;
  color: var(--accent);
  margin-bottom: 1rem;
  animation: pulse 1.5s infinite;
}
.splash-content h2 {
  font-size: 1.8rem;
  color: var(--text-primary);
  font-weight: 700;
}
.splash-content p {
  color: var(--text-tertiary);
  margin-top: 0.5rem;
}
.splash-spinner {
  width: 40px;
  height: 40px;
  margin: 1.5rem auto 0;
  border: 3px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

/* ========================================
   APP CONTAINER & STATUS BAR
   ======================================== */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-primary);
  position: relative;
}

.status-bar {
  padding: 12px 20px 6px;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  display: flex;
  justify-content: space-between;
  font-weight: 500;
}

/* ========================================
   HEADER & LOGO
   ======================================== */
.app-header {
  padding: 8px 20px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: white;
}
.logo-text h1 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}
.logo-text h1 span { color: var(--accent); }
.logo-text p {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  margin-top: -2px;
}
.theme-toggle {
  width: 44px;
  height: 44px;
  background: var(--bg-surface);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0.5px solid var(--border-solid);
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: 0.2s;
}
.theme-toggle:active { transform: scale(0.95); }

/* ========================================
   TOP TABS NAVIGATION
   ======================================== */
.top-tabs {
  display: flex;
  gap: 8px;
  margin: 8px 20px 20px 20px;
  background: var(--bg-surface);
  padding: 6px;
  border-radius: 40px;
  border: 0.5px solid var(--border-solid);
}
.top-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 32px;
  font-family: 'Inter', 'Cairo', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: 0.2s;
}
.top-tab i { font-size: 1rem; }
.top-tab.active {
  background: var(--accent);
  color: white;
}
.top-tab:active { transform: scale(0.97); }

/* ========================================
   SECTIONS
   ======================================== */
.section {
  display: none;
  padding: 0 20px 80px;
}
.section.active { display: block; }

/* ========================================
   HERO BANNER WITH VIDEO BACKGROUND
   ======================================== */
.hero-banner {
  position: relative;
  border-radius: 28px;
  margin-bottom: 24px;
  overflow: hidden;
  min-height: 200px;
}
.hero-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.7), rgba(5, 150, 105, 0.8));
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 40px 24px;
  color: white;
}
.hero-content h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}
.gradient-text {
  color: #ffd700;
}
.hero-content p {
  font-size: 0.85rem;
  opacity: 0.9;
  line-height: 1.5;
}

/* ========================================
   FEATURES SECTION
   ======================================== */
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.section-title span { color: var(--accent); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.feature-card {
  background: var(--bg-surface);
  border-radius: 20px;
  padding: 16px 12px;
  text-align: center;
  border: 0.5px solid var(--border-solid);
  cursor: pointer;
  transition: 0.2s;
}
.feature-card:active { transform: scale(0.97); }
.feature-icon {
  width: 50px;
  height: 50px;
  background: var(--accent-soft);
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}
.feature-icon i {
  font-size: 1.4rem;
  color: var(--accent);
}
.feature-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.feature-card p {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-bottom: 10px;
  line-height: 1.3;
}
.feature-btn {
  background: transparent;
  border: 1px solid var(--accent);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  transition: 0.2s;
}
.feature-btn:hover {
  background: var(--accent);
  color: white;
}
.feature-btn:active { transform: scale(0.96); }

/* ========================================
   QUOTE CARD
   ======================================== */
.quote-card {
  background: var(--bg-surface);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  gap: 14px;
  border: 0.5px solid var(--border-solid);
}
.quote-icon i {
  font-size: 1.8rem;
  color: var(--accent);
  opacity: 0.6;
}
.quote-content p {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 6px;
}
.quote-source {
  font-size: 0.65rem;
  color: var(--accent-dark);
  font-weight: 600;
}

/* ========================================
   STATS SECTION
   ======================================== */
.stats-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: var(--bg-surface);
  border-radius: 20px;
  padding: 16px 12px;
  border: 0.5px solid var(--border-solid);
}
.stat-item {
  text-align: center;
}
.stat-number {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
}
.stat-label {
  font-size: 0.6rem;
  color: var(--text-tertiary);
}

/* ========================================
   IFRAME WRAPPER
   ======================================== */
.iframe-wrapper {
  width: 100%;
  height: 70vh;
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg-surface);
  border: 0.5px solid var(--border-solid);
}
.content-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 480px) {
  .top-tabs { margin: 8px 16px 16px 16px; gap: 6px; padding: 4px; }
  .top-tab { padding: 8px 6px; font-size: 0.7rem; gap: 4px; }
  .top-tab i { font-size: 0.8rem; }
  .hero-content { padding: 30px 20px; }
  .hero-content h1 { font-size: 1.4rem; }
  .features-grid { gap: 8px; }
  .feature-card { padding: 12px 8px; }
  .feature-icon { width: 44px; height: 44px; }
  .feature-icon i { font-size: 1.2rem; }
  .feature-card h3 { font-size: 0.8rem; }
  .feature-card p { font-size: 0.65rem; }
  .stats-section { gap: 6px; padding: 12px 8px; }
  .stat-number { font-size: 1rem; }
  .section { padding: 0 16px 80px; }
}

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
  width: 3px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--accent-soft);
  border-radius: 10px;
}