/**
 * Huzur Vakti - Ana Stil Dosyası
 * Özel değişkenler, karanlık mod ve animasyonlar
 */

/* Tailwind CSS: /css/tailwind.css dosyasından yüklenir */

/* ========================================
   Özel Renk Değişkenleri
   ======================================== */
:root {
  /* Ana tema renkleri */
  --color-primary: #0F7A5C;
  --color-primary-light: #14A07A;
  --color-primary-dark: #0A5A43;
  --color-gold: #C9A227;
  --color-gold-light: #D4B44A;
  --color-gold-dark: #A8881F;
  --color-bg: #F7F8FA;
  --color-bg-card: #FFFFFF;
  --color-text: #1F2937;
  --color-text-muted: #6B7280;
  --color-border: #E5E7EB;

  /* Karanlık mod renkleri */
  --color-dark-bg: #111827;
  --color-dark-bg-card: #1F2937;
  --color-dark-text: #F9FAFB;
  --color-dark-text-muted: #9CA3AF;
  --color-dark-border: #374151;

  /* Geçiş süreleri */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;
}

/* ========================================
   Özel Font Tanımları
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=Noto+Naskh+Arabic:wght@400;500;600;700&display=swap');

/* ========================================
   Temel Stilller
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Başlık fontu */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.3;
}

/* Arapça metin stili */
.arabic-text {
  font-family: 'Noto Naskh Arabic', serif;
  direction: rtl;
  line-height: 2;
  font-size: 1.25rem;
}

/* ========================================
   Karanlık Mod
   ======================================== */
.dark {
  --color-bg: var(--color-dark-bg);
  --color-bg-card: var(--color-dark-bg-card);
  --color-text: var(--color-dark-text);
  --color-text-muted: var(--color-dark-text-muted);
  --color-border: var(--color-dark-border);
}

.dark body,
.dark {
  background-color: var(--color-dark-bg);
  color: var(--color-dark-text);
}

.dark .bg-white {
  background-color: var(--color-dark-bg-card);
}

.dark .bg-gray-50 {
  background-color: var(--color-dark-bg);
}

.dark .text-gray-900 {
  color: var(--color-dark-text);
}

.dark .text-gray-600,
.dark .text-gray-500 {
  color: var(--color-dark-text-muted);
}

.dark .text-gray-700 {
  color: var(--color-dark-text);
}

.dark .text-gray-800 {
  color: #E5E7EB;
}

.dark .text-emerald-700,
.dark .text-emerald-600 {
  color: #34D399;
}

.dark select option {
  background-color: #374151;
  color: #F9FAFB;
}

.dark .bg-gray-100 {
  background-color: #374151;
}

.dark .text-gray-400 {
  color: #9CA3AF;
}

.dark .border-gray-200,
.dark .border-gray-100 {
  border-color: var(--color-dark-border);
}

.dark .bg-gray-200 {
  background-color: #374151;
}

.dark .bg-emerald-100 {
  background-color: #064E3B;
}

.dark .bg-blue-100 { background-color: #1E3A5F; }
.dark .bg-amber-100 { background-color: #5C3D1A; }
.dark .bg-purple-100 { background-color: #3B1F5E; }

.dark .text-blue-700 { color: #60A5FA; }
.dark .text-amber-700 { color: #FBBF24; }
.dark .text-purple-700 { color: #C084FC; }

.dark .bg-emerald-50 { background-color: #022C22; }
.dark .bg-gold-50 { background-color: #2D2108; }
.dark .bg-blue-50 { background-color: #0C1929; }
.dark .bg-purple-50 { background-color: #1A0A2E; }

.dark .text-gold-600,
.dark .text-gold-500 { color: #FCD34D; }
.dark .text-blue-600 { color: #60A5FA; }
.dark .text-purple-600 { color: #C084FC; }

.dark .shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Özel Kaydırma Çubuğu
   ======================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 4px;
  transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-dark);
}

.dark ::-webkit-scrollbar-track {
  background: var(--color-dark-bg);
}

.dark ::-webkit-scrollbar-thumb {
  background: var(--color-primary-light);
}

/* Firefox için */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) var(--color-bg);
}

/* ========================================
   Animasyon Sınıfları
   ======================================== */

/* Solma animasyonu */
.fade-in {
  animation: fadeIn var(--transition-normal) ease-out;
}

.fade-out {
  animation: fadeOut var(--transition-normal) ease-out;
}

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

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

/* Kaydırma animasyonu */
.slide-up {
  animation: slideUp var(--transition-normal) ease-out;
}

.slide-down {
  animation: slideDown var(--transition-normal) ease-out;
}

.slide-left {
  animation: slideLeft var(--transition-normal) ease-out;
}

.slide-right {
  animation: slideRight var(--transition-normal) ease-out;
}

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

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

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

@keyframes slideRight {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Ölçeklendirme animasyonu */
.scale-in {
  animation: scaleIn var(--transition-normal) ease-out;
}

.scale-out {
  animation: scaleOut var(--transition-normal) ease-out;
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes scaleOut {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(0.9); opacity: 0; }
}

/* Nabız animasyonu */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Döndürme animasyonu */
.spin-slow {
  animation: spin 3s linear infinite;
}

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

/* ========================================
   Bileşen Stillleri
   ======================================== */

/* Namaz vakti kartı */
.prayer-card {
  background: var(--color-bg-card);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all var(--transition-fast);
  border: 1px solid var(--color-border);
}

.prayer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dark .prayer-card {
  background: var(--color-dark-bg-card);
  border-color: var(--color-dark-border);
}

/* Aktif namaz vakti */
.prayer-card.active {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: white;
}

/* Tesbih butonu */
.tasbih-btn {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--color-primary), var(--color-primary-dark));
  color: white;
  font-size: 3rem;
  font-weight: bold;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 8px 24px rgba(15, 122, 92, 0.3);
  border: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.tasbih-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(15, 122, 92, 0.4);
}

.tasbih-btn:active {
  transform: scale(0.95);
  box-shadow: 0 4px 12px rgba(15, 122, 92, 0.3);
}

/* İlerleme çubuğu */
.progress-bar {
  height: 8px;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-gold));
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Tema değiştirme butonu */
.theme-toggle {
  position: relative;
  width: 60px;
  height: 30px;
  background: var(--color-border);
  border-radius: 15px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.theme-toggle.active {
  background: var(--color-primary);
}

.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-toggle.active .theme-toggle-thumb {
  transform: translateX(30px);
}

/* ========================================
   Duyarlı Yardımcılar
   ======================================== */
.container-custom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container-custom {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container-custom {
    padding: 0 2rem;
  }
}

/* Mobil menü */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: var(--color-bg-card);
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  overflow-y: auto;
}

.mobile-menu.open .mobile-menu-content {
  transform: translateX(0);
}

/* ========================================
   Yazdırma Stilleri
   ======================================== */
@media print {
  body {
    background: white !important;
    color: black !important;
    font-size: 12pt;
  }

  .no-print,
  nav,
  footer,
  .theme-toggle,
  .tasbih-btn,
  button {
    display: none !important;
  }

  .prayer-card {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }

  a {
    text-decoration: underline;
    color: black;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  .container-custom {
    max-width: 100%;
    padding: 0;
  }
}

/* ========================================
   Erişilebilirlik
   ======================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Odak göstergesi */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ========================================
   Swipe / Touch Navigasyon
   ======================================== */

/* Dokunmatik geri bildirim */
.swipe-indicator {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 4px;
  z-index: 100;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.swipe-indicator-left {
  left: 0;
  background: linear-gradient(to right, var(--color-primary), transparent);
}

.swipe-indicator-right {
  right: 0;
  background: linear-gradient(to left, var(--color-primary), transparent);
}

/* Dokunmatik cihazlarda vurgulama engelleme */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Kaydırma animasyonu sayfa geçişleri */
@keyframes pageInFromRight {
  from { transform: translateX(100%); opacity: 0.5; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes pageInFromLeft {
  from { transform: translateX(-100%); opacity: 0.5; }
  to { transform: translateX(0); opacity: 1; }
}

/* Hareket azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================
   Özel Bileşenler
   ======================================== */

/* Altın gradient metin */
.text-gradient-gold {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Cam efekti */
.glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dark .glass {
  background: rgba(31, 41, 55, 0.8);
}

/* Gölge efektleri */
.shadow-soft {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.shadow-glow {
  box-shadow: 0 0 20px rgba(15, 122, 92, 0.3);
}

/* Kenar yuvarlaklığı */
.rounded-xl {
  border-radius: 12px;
}

.rounded-2xl {
  border-radius: 16px;
}

.rounded-full {
  border-radius: 9999px;
}

/* ========================================
   Kuran Sayfası Bileşenleri
   ======================================== */

/* Scrollbar için özel stiller */
.quran-scroll::-webkit-scrollbar {
  width: 4px;
}

.quran-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.quran-scroll::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 2px;
}

/* Sure listesi hover efektleri */
.surah-item {
  position: relative;
  transition: all 0.2s ease;
}

.surah-item::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--color-primary);
  border-top: 2px solid var(--color-primary);
  rotate: 45deg;
  opacity: 0;
  transition: all 0.2s ease;
}

.surah-item:hover::after {
  opacity: 1;
  right: 0.75rem;
}

/* Tab geçişleri */
.tab-indicator {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Karanlık mod düzeltmeleri */
.dark input::placeholder {
  color: rgba(167, 243, 208, 0.4);
}

/* Header gradient overlay */
.header-pattern {
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.03) 0%, transparent 50%);
}

/* Stagger animation for surah list */
.stagger-item {
  opacity: 0;
  transform: translateY(10px);
  animation: staggerFadeIn 0.3s ease forwards;
}

@keyframes staggerFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sayaç rozetleri */
.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Kart gölgelendirme */
.card-shadow {
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.03),
    0 8px 24px rgba(0, 0, 0, 0.02);
}

.dark .card-shadow {
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Sayfa kartı hover */
.page-card {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-card:hover {
  transform: translateY(-2px) scale(1.05);
}

/* Cüz kartı animasyonu */
.juz-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.juz-card:hover .juz-number {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(15, 122, 92, 0.3);
}

/* İslami desen için ek stiller */
.islamic-pattern-bg {
  background-color: rgba(255, 255, 255, 0.03);
  background-image: 
    linear-gradient(30deg, rgba(255, 255, 255, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.05) 87.5%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.05) 87.5%),
    linear-gradient(30deg, rgba(255, 255, 255, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.05) 87.5%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.05) 87.5%);
  background-size: 40px 70px;
}
