﻿/* ============================================================
   1. FONT TANIMLARI
   ============================================================ */
@font-face { font-family: 'Harrington'; src: url('fonts/HARNGTON.TTF') format('truetype'); }
@font-face { font-family: 'Lucida'; src: url('fonts/LucidaCalligraphyTurkish.ttf') format('truetype'); }

/* ============================================================
   2. NAVBAR TASARIMI (GÜNDÜZ)
   ============================================================ */
.navbar {
  position: fixed !important;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 98%;
  height: 95px;
  background-color: #eeeeee !important;
  border-top: 1px solid lightgray;
  border-bottom: 1px solid darkgray;
  border-left: 1px solid #EEEEEE;
  border-right: none;
  z-index: 1000;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.05);
  padding: 0px 10px;
  box-sizing: border-box;
}

.navbar input[type=text] { padding: 4px; font-size: 14px; }
.navbar input[type=submit] { padding: 4px 10px; font-size: 14px; }

/* Navbar içindeki mektup başlığı */
.navbar td, .sticky-top td { 
    text-align: center !important; 
    color: #0B6605 !important; 
    font-weight: bold !important; 
}

/* ============================================================
   3. GENEL SAYFA YAPISI (GÜNDÜZ)
   ============================================================ */
body {
  font-family: "Bookman Old Style", serif;
  line-height: 1.6;
  background-color: #EEEEEE !important;
  color: #000 !important;
  margin: 0 !important;
  padding-top: 95px !important; /* Navbar yüksekliği kadar boşluk */
}

.main-content { 
    width: 74% !important; 
    padding-bottom: 150px !important; 
}
@media (max-width: 800px) { .main-content { width: 94% !important; } }

p, .metin { text-align: justify !important; font-size: 18px; margin: 0.8em 0; }

/* Renkler Gündüz */
.ayet { color: #0B6605 !important; font-weight: bold !important; display: block; }
.baslik-yesil { color: #0B6605 !important; font-weight: bold !important; display: block; text-align: center; }
.hadis, .kirmizi { color: #b50a0c !important; }
.kudsi, .mavi { color: #0a0b99 !important; }
.siir { font-family: "Lucida", "Lucida Calligraphy TR", cursive !important; color: #373737 !important; text-align: center !important; font-size: 0.9em !important; }
.vurgulu { font-family: 'Harrington', cursive !important; color: inherit !important; }

/* Sayfa yapısı ne olursa olsun en alta boşluk zorlar */
body {
    padding-bottom: 75px !important;
}

/* Tablo yapısı kullanıyorsanız hücrelere de baskı yapalım */
td.main-content {
    padding-bottom: 75px !important;
    vertical-align: top;
}

/* Sayfaların en altında ok ve metinle ilgili düzenleme */
.tercume-link {
  display: inline-flex;
  align-items: center;     /* dikey hizalama */
  gap: 8px;                /* ok ile metin arası boşluk */
  text-decoration: none;   /* alt çizgiyi kaldırır */
}

/* ============================================================
   4. GECE MODU AYARLARI (NAVBAR DAHİL)
   ============================================================ */
body.dark-mode { background-color: #1a1a1a !important; color: #eeeeee !important; }

/* Gece Modunda Navbar Karartma */
body.dark-mode .navbar {
  background-color: #252525 !important;
  border-color: #444 !important;
  box-shadow: 0 3px 10px rgba(0,0,0,0.5);
}

body.dark-mode .navbar td, body.dark-mode .sticky-top td { 
    color: #4eb548 !important; 
}

body.dark-mode .navbar input {
  background-color: #333 !important;
  color: #fff !important;
  border: 1px solid #555 !important;
}

/* Gece Modu Metin Renkleri */
body.dark-mode p, body.dark-mode .metin { color: #eeeeee !important; }
body.dark-mode .ayet { color: #4eb548 !important; }
body.dark-mode .hadis, body.dark-mode .kirmizi { color: #ff6b6b !important; }
body.dark-mode .kudsi, body.dark-mode .mavi { color: #748ffc !important; }

/* ============================================================
   5. DÜĞMELER VE SCROLL SİSTEMİ (TEMİZLENMİŞ)
   ============================================================ */

/* Düğmelerin Ortak Temeli */
.floating-btn, #themeToggle, #custom-mobile-scroll {
    position: fixed !important;
    z-index: 100000 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
    transition: all 0.6s ease-in-out !important;
}

/* Aktif Haller (Görünür olduklarında) */
.floating-btn.visible, #themeToggle.show {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* GECE MODU BUTONU (SOLDA) */
#themeToggle.show {
    left: 20px !important;
    right: auto !important;
    bottom: 20px !important; /* Mevcut yerini koruduk */
    padding: 6px 12px !important;
    border-radius: 50px !important;
    background: #333 !important;
    color: #fff !important;
    border: 2px solid #666 !important;
    font-weight: bold !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* GERİ DÖN BUTONU (SAĞDA - KİTAP İKONU) */
.floating-btn.visible {
    right: 20px !important;
    left: auto !important;
    bottom: 30px !important; /* Kitabı yukarı taşıdık (Gece moduyla hizalı durması için) */
    width: 43px;
    height: 28px;
}

/* İnce Scroll Çubuğu */
#custom-mobile-scroll {
    right: 2px;
    width: 6px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    bottom: 0 !important;
}
#custom-mobile-scroll.active { opacity: 1 !important; visibility: visible !important; }

/* Modlara Göre Renk Değişimleri */
body.dark-mode #themeToggle { background: #eeeeee !important; color: #000 !important; border-color: #ccc !important; }
#custom-mobile-scroll.dark { background: rgba(255, 255, 255, 0.8) !important; }

/* iPhone ve Safari için placeholder gizleme */
input:focus::-webkit-input-placeholder {
    color: transparent !important;
}

/* Diğer tarayıcılar için standart */
input:focus::placeholder {
    color: transparent !important;
}

a:visited{color:#008000;}
a:hover{color:#006000;}

/* ============================================================
   6. MOBİL ÖZEL HİZALAMA (GÜNCELLEME)
   ============================================================ */
@media (max-width: 800px) {
    /* Gece Modu Butonu (Solda) */
    #themeToggle.show {
        bottom: 15px !important; /* Mobilde biraz daha aşağı aldık */
        left: 10px !important;   /* Kenar boşluğunu daralttık */
        height: 30px !important; /* Yüksekliği mobilde biraz zarifleştirdik */
        font-size: 14px !important;
    }

    /* Geri Dön Butonu (Sağda - Kitap) */
    .floating-btn.visible {
        bottom: 25px !important; /* Gece butonuyla aynı hizaya çektik */
        right: 25px !important;  /* Kenar boşluğunu eşitledik */
        width: 40px !important;  /* Genişliği hafif küçülttük */
        height: 26px !important; /* Yüksekliği gece butonuyla dengeledik */
    }
}
