/* ==========================================================================
   FreeWebAPK - Modern SaaS Stylesheet
   Brand Color System: Emerald (#10B981) + Cyan (#06B6D4) + Indigo (#6366F1)
   Dark Theme Matrix: Midnight Obsidian (#070A13) & Cyber Slate Surface (#0E1526)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --brand-primary: #10B981;
  --brand-primary-hover: #059669;
  --brand-cyan: #06B6D4;
  --brand-indigo: #6366F1;
  --bg-dark: #070A13;       /* Premium Midnight Obsidian Canvas */
  --bg-card: #0E1526;       /* Cyber Slate Surface Card */
  --bg-card-hover: #141E34; /* Card Hover Elevation */
  --border-dark: #1B273E;   /* Clean Futuristic Border */
  --border-highlight: #2A3C5E;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
}

/* Base resets & typography */
html, body {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

code, pre, .font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Midnight Obsidian Theme Overrides for Tailwind Slate utility classes */
.bg-\[\#13080C\], .bg-\[\#070A13\], .bg-\[\#0B0F19\], .bg-slate-950 {
  background-color: #070A13 !important;
}

.bg-slate-900 {
  background-color: #0E1526 !important;
}

.bg-slate-900\/40, .bg-slate-900\/50, .bg-slate-900\/60, .bg-slate-900\/70, .bg-slate-900\/80 {
  background-color: rgba(14, 21, 38, 0.75) !important;
}

.bg-slate-900\/90, .bg-slate-900\/95 {
  background-color: rgba(14, 21, 38, 0.95) !important;
}

.border-slate-800, .border-slate-800\/80, .border-slate-800\/60 {
  border-color: #1B273E !important;
}

.border-slate-700, .border-slate-700\/80 {
  border-color: #263654 !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #070A13;
}

::-webkit-scrollbar-thumb {
  background: #1B273E;
  border-radius: 9999px;
  border: 2px solid #070A13;
}

::-webkit-scrollbar-thumb:hover {
  background: #2A3C5E;
}

/* Glassmorphism & Card Glows */
.glass-panel {
  background: rgba(11, 16, 29, 0.85) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.glass-dropdown {
  background: rgba(9, 13, 24, 0.96) !important;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.8);
}

.glow-card {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glow-card:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 185, 129, 0.45) !important;
  box-shadow: 0 12px 30px -10px rgba(16, 185, 129, 0.2);
}

/* Gradient Highlights */
.gradient-text {
  background: linear-gradient(135deg, #10B981 0%, #06B6D4 50%, #6366F1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-alt {
  background: linear-gradient(135deg, #38BDF8 0%, #818CF8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-border {
  position: relative;
  background: linear-gradient(#0E1526, #0E1526) padding-box,
              linear-gradient(135deg, #10B981, #06B6D4, #6366F1) border-box;
  border: 1px solid transparent;
}

/* Pulsing Ambient Background Blobs (Emerald + Electric Cyan Aurora Glows) */
.ambient-glow-1 {
  position: absolute;
  top: -10%;
  left: 20%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0) 70%);
  pointer-events: none;
  filter: blur(65px);
  z-index: 0;
}

.ambient-glow-2 {
  position: absolute;
  top: 15%;
  right: 15%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, rgba(99, 102, 241, 0.08) 70%);
  pointer-events: none;
  filter: blur(75px);
  z-index: 0;
}

/* Interactive Phone Mockup Frame */
.android-phone-mockup {
  width: 260px;
  height: 520px;
  border-radius: 38px;
  background: #030712;
  border: 7px solid #1E293B;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8),
              0 0 0 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.android-camera-punchhole {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0F172A;
  margin: 10px auto 4px auto;
  border: 1.5px solid #334155;
}

.android-speaker-slit {
  width: 50px;
  height: 4px;
  border-radius: 2px;
  background: #1E293B;
  margin: 4px auto 8px auto;
}

/* Interactive Conversion Visual Flow */
@keyframes pulseGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes beamSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

.conversion-beam {
  position: relative;
  overflow: hidden;
}

.conversion-beam::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.6), transparent);
  animation: beamSlide 2.5s infinite linear;
}

/* Animations */
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin-slow {
  animation: spinSlow 12s linear infinite;
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Custom form elements */
.form-input-focus:focus {
  outline: none;
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  animation: slideInUp 0.3s ease-out forwards;
  transition: all 0.3s ease;
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Google AdSense Compliant Advertisement Slots
   - Must be clearly labeled as "ADVERTISEMENT"
   - Never placed deceptively next to action / download buttons
   - Clean responsive sizing and styling
   ========================================================================== */
.ad-slot-wrapper {
  margin: 2.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.ad-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748B;
  margin-bottom: 6px;
  font-weight: 600;
  text-align: center;
}

.ad-slot-container {
  background: rgba(15, 23, 42, 0.4);
  border: 1px dashed rgba(71, 85, 105, 0.4);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  width: 100%;
  max-width: 970px;
  padding: 12px;
  transition: border-color 0.2s ease;
  overflow: hidden;
}

.ad-slot-container:hover {
  border-color: rgba(16, 185, 129, 0.3);
}

.ad-slot-rect {
  min-height: 250px;
  max-width: 336px;
}

.ad-placeholder-text {
  font-size: 11px;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   Light Mode Color Theme
   Clean, modern, high-contrast light mode for FreeWebAPK
   ========================================================================== */
html.light-theme, .light-theme {
  --bg-dark: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F1F5F9;
  --border-dark: #E2E8F0;
  --border-highlight: #CBD5E1;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  color-scheme: light;
}

.light-theme body,
.light-theme html {
  background-color: #F8FAFC !important;
  color: #0F172A !important;
}

/* Background overrides in light mode */
.light-theme .bg-\[\#070A13\],
.light-theme .bg-\[\#13080C\],
.light-theme .bg-\[\#0B0F19\],
.light-theme .bg-slate-950 {
  background-color: #F8FAFC !important;
}

.light-theme .bg-slate-900 {
  background-color: #FFFFFF !important;
}

.light-theme .bg-slate-900\/40,
.light-theme .bg-slate-900\/50,
.light-theme .bg-slate-900\/60,
.light-theme .bg-slate-900\/70,
.light-theme .bg-slate-900\/80,
.light-theme .bg-slate-900\/90,
.light-theme .bg-slate-900\/95 {
  background-color: rgba(255, 255, 255, 0.95) !important;
}

.light-theme .bg-slate-800,
.light-theme .bg-slate-800\/60,
.light-theme .bg-slate-800\/80 {
  background-color: #F1F5F9 !important;
}

.light-theme .bg-slate-950\/80 {
  background-color: rgba(248, 250, 252, 0.9) !important;
}

/* Text overrides in light mode */
.light-theme .text-white {
  color: #0F172A !important;
}

.light-theme .text-slate-100 {
  color: #0F172A !important;
}

.light-theme .text-slate-200 {
  color: #1E293B !important;
}

.light-theme .text-slate-300 {
  color: #334155 !important;
}

.light-theme .text-slate-400 {
  color: #64748B !important;
}

/* Color accents adjusted for rich readability on light backgrounds */
.light-theme .text-emerald-400 { color: #059669 !important; }
.light-theme .text-cyan-400 { color: #0284C7 !important; }
.light-theme .text-indigo-400 { color: #4F46E5 !important; }
.light-theme .text-amber-400 { color: #D97706 !important; }
.light-theme .text-rose-400 { color: #E11D48 !important; }
.light-theme .text-teal-400 { color: #0D9488 !important; }
.light-theme .text-purple-400 { color: #7C3AED !important; }
.light-theme .text-pink-400 { color: #DB2777 !important; }
.light-theme .text-blue-400 { color: #2563EB !important; }


/* Borders in light mode */
.light-theme .border-slate-800,
.light-theme .border-slate-800\/80,
.light-theme .border-slate-800\/60 {
  border-color: #E2E8F0 !important;
}

.light-theme .border-slate-700,
.light-theme .border-slate-700\/80 {
  border-color: #CBD5E1 !important;
}

/* Glassmorphism in light mode */
.light-theme .glass-panel {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.06) !important;
}

.light-theme .glass-dropdown {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15) !important;
}

.light-theme .glow-card {
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.06);
}

.light-theme .glow-card:hover {
  border-color: rgba(16, 185, 129, 0.6) !important;
  box-shadow: 0 12px 30px -10px rgba(16, 185, 129, 0.25) !important;
}

.light-theme .gradient-border {
  background: linear-gradient(#FFFFFF, #FFFFFF) padding-box,
              linear-gradient(135deg, #10B981, #06B6D4, #6366F1) border-box;
}

/* Ambient glow adjustment for light mode */
.light-theme .ambient-glow-1,
.light-theme .ambient-glow-2 {
  opacity: 0.35;
}

/* Scrollbar for light mode */
.light-theme ::-webkit-scrollbar-track {
  background: #F8FAFC;
}

.light-theme ::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border: 2px solid #F8FAFC;
}

.light-theme ::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Form inputs in light mode */
.light-theme input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
.light-theme textarea,
.light-theme select {
  background-color: #FFFFFF !important;
  color: #0F172A !important;
  border-color: #CBD5E1 !important;
}

.light-theme input::placeholder,
.light-theme textarea::placeholder {
  color: #94A3B8 !important;
}

/* Footer in light mode */
.light-theme footer {
  background-color: #F1F5F9 !important;
  border-color: #E2E8F0 !important;
}

/* Ad slots in light mode */
.light-theme .ad-slot-container {
  background: rgba(241, 245, 249, 0.8) !important;
  border-color: #CBD5E1 !important;
}

/* Cookie consent banner in light mode */
.light-theme #cookie-consent-banner {
  background-color: rgba(255, 255, 255, 0.98) !important;
  border-color: #E2E8F0 !important;
  color: #334155 !important;
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.15) !important;
}

.light-theme #cookie-consent-banner h4 {
  color: #0F172A !important;
}

/* Mobile drawer in light mode */
.light-theme #mobile-drawer {
  background-color: #FFFFFF !important;
  border-color: #E2E8F0 !important;
}

/* Theme toggle button styling */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(14, 21, 38, 0.85);
  border: 1px solid #1B273E;
  color: #FBBF24; /* warm amber sun */
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  background: rgba(20, 30, 52, 0.95);
  border-color: #2A3C5E;
  color: #F59E0B;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.light-theme .theme-toggle-btn {
  background: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
  color: #4F46E5 !important; /* deep indigo moon */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.light-theme .theme-toggle-btn:hover {
  background: #E2E8F0 !important;
  border-color: #94A3B8 !important;
  color: #4338CA !important;
}


