/* ═══════════════════════════════════════════════════
   Nûr-ul Esmâ — Ana Stil Dosyası
   Premium İslami Glassmorphism Tasarım
   ═══════════════════════════════════════════════════ */

/* ─── CSS Değişkenleri ─── */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #0d1425;
  --bg-tertiary: #111b30;
  --bg-emerald: #0d2818;
  --bg-emerald-deep: #071f12;

  --gold: #d4a853;
  --gold-light: #e8b44d;
  --gold-pale: #f0d090;
  --gold-dark: #b08a3a;
  --gold-glow: rgba(212, 168, 83, 0.35);
  --gold-glow-subtle: rgba(212, 168, 83, 0.12);

  --emerald: #4a7c59;
  --emerald-light: #5a9a6e;
  --emerald-glow: rgba(74, 124, 89, 0.25);

  --text-primary: #f0ece4;
  --text-secondary: rgba(240, 236, 228, 0.7);
  --text-muted: rgba(240, 236, 228, 0.4);
  --text-gold: #d4a853;

  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-bg-hover: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.15);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --glass-shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.4);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --font-arabic: 'Scheherazade New', 'Amiri', serif;
  --font-heading: 'Amiri', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', sans-serif;

  --header-height: 80px;
  --mobile-nav-height: 72px;
  --z-particles: 0;
  --z-overlay: 1;
  --z-content: 2;
  --z-header: 100;
  --z-nav: 100;
  --z-modal: 1000;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--gold);
  color: var(--bg-primary);
}

::-moz-selection {
  background: var(--gold);
  color: var(--bg-primary);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* ─── Parçacık Canvas ─── */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-particles);
  pointer-events: none;
}

/* ─── Geometrik Desen Overlay ─── */
.geometric-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-overlay);
  pointer-events: none;
  opacity: 0.03;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(212, 168, 83, 0.15) 1px, transparent 1px),
    radial-gradient(circle at 75% 75%, rgba(74, 124, 89, 0.1) 1px, transparent 1px),
    linear-gradient(30deg, transparent 45%, rgba(212, 168, 83, 0.02) 45%, rgba(212, 168, 83, 0.02) 55%, transparent 55%),
    linear-gradient(150deg, transparent 45%, rgba(74, 124, 89, 0.02) 45%, rgba(74, 124, 89, 0.02) 55%, transparent 55%);
  background-size: 60px 60px, 60px 60px, 80px 80px, 80px 80px;
}

/* ─── Glassmorphism Kartları ─── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card-hover:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  box-shadow: var(--glass-shadow-hover);
  transform: translateY(-4px);
}

.glass-card-gold {
  border-color: rgba(212, 168, 83, 0.2);
  box-shadow: var(--glass-shadow), 0 0 30px var(--gold-glow-subtle);
}

.glass-card-gold:hover {
  border-color: rgba(212, 168, 83, 0.4);
  box-shadow: var(--glass-shadow-hover), 0 0 40px var(--gold-glow);
}

/* ─── Tipografi ─── */
.arabic-text {
  font-family: var(--font-arabic);
  font-size: 1.5rem;
  color: var(--gold);
  line-height: 1.8;
  direction: rtl;
}

.arabic-large {
  font-family: var(--font-arabic);
  font-size: 2.5rem;
  color: var(--gold);
  line-height: 1.6;
  direction: rtl;
  text-shadow: 0 0 30px var(--gold-glow-subtle);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--gold);
  text-align: center;
  margin-bottom: 0.5rem;
  position: relative;
  text-shadow: 0 0 20px var(--gold-glow-subtle);
}

.section-title::after {
  content: '✦';
  display: block;
  text-align: center;
  font-size: 0.7rem;
  color: var(--gold-dark);
  margin-top: 0.3rem;
  letter-spacing: 1em;
  opacity: 0.5;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 300;
}

/* ─── Layout ─── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.app-content {
  position: relative;
  z-index: var(--z-content);
  padding-top: calc(var(--header-height) + 60px);
  padding-bottom: 2rem;
  min-height: 100vh;
}

.section {
  display: none;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}

.section.active {
  display: block;
}

/* ─── Header ─── */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: var(--z-header);
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-bottom: 1px solid rgba(212, 168, 83, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-content {
  text-align: center;
}

.header-title-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.header-arabic {
  font-family: var(--font-arabic);
  font-size: 1.8rem;
  color: var(--gold);
  text-shadow: 0 0 30px var(--gold-glow);
  line-height: 1.3;
  animation: pulse-gold 4s ease-in-out infinite;
}

.header-subtitle {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

/* ─── Navigasyon — Masaüstü ─── */
.desktop-nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  background: rgba(10, 14, 26, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-items {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.nav-item:hover {
  color: var(--gold-light);
  background: var(--glass-bg);
}

.nav-item.active {
  color: var(--gold);
  background: rgba(212, 168, 83, 0.1);
  border-color: rgba(212, 168, 83, 0.2);
  box-shadow: 0 0 20px var(--gold-glow-subtle);
}

.nav-icon {
  font-size: 1.1rem;
}

/* ─── Navigasyon — Mobil ─── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--mobile-nav-height);
  z-index: var(--z-nav);
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-top: 1px solid rgba(212, 168, 83, 0.1);
  justify-content: space-around;
  align-items: center;
  padding: 0 0.5rem;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-nav .nav-item {
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.65rem;
  border-radius: var(--radius-md);
}

.mobile-nav .nav-icon {
  font-size: 1.3rem;
}

/* ─── Footer ─── */
.app-footer {
  position: relative;
  z-index: var(--z-content);
  padding: 2rem 1.5rem;
  text-align: center;
}

.footer-divider {
  width: 80px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-dark), transparent);
  margin: 0 auto 1.5rem;
}

.footer-disclaimer {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.footer-copyright {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.5;
}

/* ─── Animasyonlar ─── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse-gold {
  0%, 100% {
    text-shadow: 0 0 20px var(--gold-glow-subtle);
  }
  50% {
    text-shadow: 0 0 40px var(--gold-glow), 0 0 60px rgba(212, 168, 83, 0.1);
  }
}

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

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

@keyframes tapPulse {
  0% { box-shadow: 0 0 0 0 var(--gold-glow); }
  70% { box-shadow: 0 0 0 30px rgba(212, 168, 83, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 168, 83, 0); }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out both;
}

.fade-in {
  animation: fadeIn 0.5s ease-out both;
}

/* ─── Yardımcı Sınıflar ─── */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--text-muted);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.source-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: rgba(212, 168, 83, 0.1);
  border: 1px solid rgba(212, 168, 83, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  color: var(--gold);
}

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-secondary);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  :root {
    --header-height: 65px;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-nav {
    display: flex;
  }

  .app-content {
    padding-top: calc(var(--header-height) + 16px);
    padding-bottom: calc(var(--mobile-nav-height) + 1rem);
  }

  .section {
    padding: 0 1rem 1rem;
  }

  .header-arabic {
    font-size: 1.4rem;
  }

  .header-subtitle {
    font-size: 0.65rem;
    letter-spacing: 0.3em;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .arabic-large {
    font-size: 2rem;
  }

  .glass-card {
    border-radius: var(--radius-md);
  }

  .app-footer {
    padding-bottom: calc(var(--mobile-nav-height) + 2rem);
  }
}

@media (max-width: 480px) {
  .header-arabic {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .arabic-large {
    font-size: 1.6rem;
  }
}

@media (min-width: 769px) {
  .desktop-nav {
    display: block;
  }

  .mobile-nav {
    display: none;
  }
}
