/* SalatNow - Minimalist Prayer Times & Qibla Compass */
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --primary-emerald: #10b981;
  --primary-emerald-glow: rgba(16, 185, 129, 0.35);
  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.3);
  --bg-dark-base: #0b0f17;
  --bg-dark-surface: #111827;
  --bg-dark-card: rgba(30, 41, 59, 0.7);
  --border-dark: rgba(255, 255, 255, 0.08);
}

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

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.font-arabic {
  font-family: 'Amiri', serif;
}

/* Islamic Arabesque Geometric Pattern Background */
.islamic-bg-pattern {
  background-image: 
    radial-gradient(rgba(16, 185, 129, 0.07) 1.5px, transparent 1.5px),
    radial-gradient(rgba(245, 158, 11, 0.04) 1.5px, transparent 1.5px);
  background-size: 36px 36px;
  background-position: 0 0, 18px 18px;
}

.dark .islamic-bg-pattern {
  background-image: 
    radial-gradient(rgba(16, 185, 129, 0.12) 1.5px, transparent 1.5px),
    radial-gradient(rgba(245, 158, 11, 0.06) 1.5px, transparent 1.5px);
}

/* Subtle SVG Arabesque Overlay */
.geometric-overlay {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2310b981' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.dark .glass-panel {
  background: rgba(17, 24, 39, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.dark .glass-card {
  background: rgba(30, 41, 59, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Active Prayer Glowing Card */
.active-prayer-card {
  position: relative;
  border-color: #10b981 !important;
  box-shadow: 0 0 24px -2px rgba(16, 185, 129, 0.35), 0 0 8px 0 rgba(16, 185, 129, 0.2);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.03) 100%) !important;
}

.dark .active-prayer-card {
  border-color: #10b981 !important;
  box-shadow: 0 0 28px -2px rgba(16, 185, 129, 0.45), 0 0 10px 0 rgba(16, 185, 129, 0.25);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 78, 59, 0.2) 100%) !important;
}

.active-prayer-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, #10b981, #f59e0b, #10b981);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: borderRotate 6s linear infinite;
}

@keyframes borderRotate {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* Pulsing Indicator */
.pulse-emerald {
  animation: pulseGlow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.05);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}

/* Qibla Compass Specific Styles */
.compass-dial-container {
  width: 300px;
  height: 300px;
  position: relative;
  border-radius: 50%;
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.25), inset 0 2px 10px rgba(255, 255, 255, 0.1);
  user-select: none;
  touch-action: none;
}

@media (min-width: 640px) {
  .compass-dial-container {
    width: 360px;
    height: 360px;
  }
}

.compass-dial {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  transition: transform 0.15s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: transform;
}

.compass-dial.smooth {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Qibla Needle */
.qibla-needle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: transform;
}

/* When heading aligns with Qibla */
.compass-aligned {
  animation: alignedPulse 1.5s infinite alternate;
}

@keyframes alignedPulse {
  0% {
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.5), inset 0 0 20px rgba(16, 185, 129, 0.4);
  }
  100% {
    box-shadow: 0 0 50px rgba(16, 185, 129, 0.9), inset 0 0 35px rgba(16, 185, 129, 0.7);
  }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.5);
  border-radius: 9999px;
}

.dark ::-webkit-scrollbar-thumb {
  background: rgba(75, 85, 99, 0.5);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 185, 129, 0.7);
}

/* Range Slider Styling */
input[type="range"] {
  accent-color: #10b981;
}

/* Shimmer animation for loading states */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-shimmer {
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
