/* 
   BABOLI.CSS
   Bu dosya W3C standartlarına hakaret olarak yazılmıştır.
   Okurken başınız dönerse sorumluluk kabul etmiyoruz.
*/

body {
    margin: 0;
    padding: 0;
    /* 
       Daha Yumuşak Geçiş Stratejisi:
       1. background-color: Renkleri animasyonla değiştirir (bu en pürüzsüz yöntemdir).
       2. background-image: Üstüne şeffaftan beyaza giden bir katman atar.
       Böylece renk sadece üstte görünür ve aşağı doğru yumuşakça kaybolur.
    */
    background-color: #c0ffc0;
    background-image: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, #ffffff 35%, #ffffff 100%);
    
    font-family: 'Times New Roman', Times, serif;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    cursor: default;
    
    /* Linear zamanlama: Duraksamadan sürekli akış sağlar */
    animation: smoothColorCycle 20s infinite linear;
}

@keyframes smoothColorCycle {
    0% { background-color: #b0ffb0; }   /* Pastel Yeşil */
    25% { background-color: #b0e0ff; }  /* Pastel Mavi */
    50% { background-color: #ffb0e0; }  /* Pastel Pembe */
    75% { background-color: #ffffb0; }  /* Pastel Sarı */
    100% { background-color: #b0ffb0; } /* Başa dönüş */
}

/* @property fallback gerekmez çünkü background-color her yerde desteklenir */


.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 90%;
    width: 100%;
}

/* Başlık Stilleri: Okunabilir olması gerekmiyor */
.baboli-title {
    font-size: 10rem; /* Kullanıcı isteği üzerine 10rem */
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    pointer-events: none; /* Dokunma dedik */
}

/* Renk Paleti: Kusmuk yeşili ve depresyon mavisi */
.c-red { color: #FF0000; }
.c-orange { color: #FF9900; }
.c-blue { color: #0000FF; }
.c-purple { color: #9900CC; }
.c-green { color: #00CC00; }
.c-cyan { color: #00CCCC; }
.dot { color: #333; }

/* Ses Kontrol Butonu: Bas beni diyor */
.audio-control {
    margin-top: 50px;
    z-index: 100;
    pointer-events: auto; /* Buna dokunabilirsin, izin verdik */
}

#play-btn {
    background: none;
    border: 2px solid #333;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Sürekli titriyor çünkü heyecanlı */
    animation: wobble 2s infinite ease-in-out;
}

#play-btn:hover {
    transform: scale(1.2) rotate(20deg);
    background-color: #eee;
}

@keyframes wobble {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); } /* Sola yat */
}

/* --- BAĞIŞ BUTONU VE MODAL STİLLERİ --- */

/* Bağış Butonu: Sağ altta sinsi sinsi bekler */
.donate-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    font-size: 18px;
    font-weight: bold;
    color: #333; /* Arka plan gidince yazı görünsün diye koyu renk */
    background: none; /* Arka plan rengi kaldırıldı */
    border: none;
    cursor: pointer;
    /* box-shadow kaldırıldı çünkü arka plan yokken garip durabilir */
    transition: transform 0.3s ease, color 0.3s ease;
    z-index: 1000;
    font-family: Arial, sans-serif; /* Okunaklı olsun */
}

.donate-btn:hover {
    color: #000; /* Üzerine gelince tam siyah olsun */
    transform: scale(1.2); /* Biraz daha büyüsün */
}

/* Modal Arka Planı: Bulanık ve karanlık */
.modal {
    display: none; /* Başlangıçta gizli */
    position: fixed;
    z-index: 2000; /* Her şeyin üstünde */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4); /* Siyah transparan */
    backdrop-filter: blur(8px); /* Bulanıklık efekti */
    justify-content: center;
    align-items: center;
}

/* Modal İçeriği: Ekranın ortasında */
.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px; /* PC'de çok geniş olmasın */
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    position: relative;
    text-align: center;
    font-family: Arial, sans-serif;
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Kapatma Tuşu: Sağ üstte */
.close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover,
.close-btn:focus {
    color: #000;
    text-decoration: none;
}

/* IBAN Yazısı */
.iban-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-top: 10px;
    word-break: break-all; /* Mobilde taşmasın */
    background: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
    user-select: text; /* Kopyalanabilsin */
    -webkit-user-select: text;
}

/* Mobilde IBAN boyutu biraz küçülsün */
@media screen and (max-width: 600px) {
    .iban-text {
        font-size: 1.1rem;
    }
}

/* --- TESBİH STİLLERİ --- */
.rosary-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 30px auto;
    padding: 20px 0;
    /* Scroll artık yok */
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.rosary-wrapper::-webkit-scrollbar {
    display: none;
}

/* İp: Boncukların ortasından geçen çizgi */
.rosary-string {
    position: absolute;
    top: 50%;
    left: 10%; /* Biraz içeriden başlasın */
    width: 80%; /* Tam genişlik değil */
    height: 2px;
    background: rgba(255, 255, 255, 0.4);
    z-index: 0;
    transform: translateY(-50%);
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
}

.rosary-container {
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Ortala */
    gap: 2px;
    padding: 0 10px;
    white-space: nowrap;
}

.bead {
    position: relative;
    width: 24px; /* Varsayılan PC boyutu */
    height: 24px;
    border-radius: 50%;
    
    /* Standart Hali (Seçilmemiş) - Koyu Mavi */
    background: radial-gradient(circle at 30% 30%, 
        rgba(50, 80, 150, 0.9), 
        rgba(20, 30, 80, 0.9) 60%, 
        rgba(5, 10, 40, 1) 100%);
    
    box-shadow: 
        inset -2px -2px 6px rgba(0,0,0,0.5),
        inset 1px 1px 3px rgba(255,255,255,0.2),
        2px 2px 5px rgba(0,0,0,0.3);
        
    z-index: 1;
    flex-shrink: 0;
    
    /* Animasyon JS ile kontrol edilecek */
    /* animation: colorCycle 4s infinite linear; <-- SİLİNDİ */
    
    /* Seçilme animasyonu için */
    animation: none;
}

/* Aktif (Seçili) Boncuk Animasyonu */
@keyframes selectBead {
    0% { 
        filter: brightness(1) hue-rotate(0deg); 
        transform: scale(1);
    }
    10% { 
        filter: brightness(2) hue-rotate(180deg); /* Parlasın ve renk değişsin */
        transform: scale(1.3);
        box-shadow: 0 0 15px rgba(100, 200, 255, 0.8);
    }
    40% {
        filter: brightness(1) hue-rotate(0deg);
        transform: scale(1);
        box-shadow: none;
    }
    100% {
        filter: brightness(1) hue-rotate(0deg);
        transform: scale(1);
    }
}

/* Duraklar artık yok veya sadece aralık olabilir */
/* Ama 17'li de durak pek olmaz, yine de varsa */
.bead:nth-child(6), .bead:nth-child(12) {
   /* Özel durak stili gerekirse buraya */
}

/* İMAME BÖLÜMÜ */
.imam-container {
    display: flex;
    align-items: center;
    margin-left: 5px;
    position: relative;
    z-index: 2;
}

/* İmame parçası: Uzun cam tüp gibi */
.imam-piece {
    width: 60px;
    height: 18px;
    border-radius: 10px;
    background: linear-gradient(to right, 
        rgba(30, 50, 150, 1), 
        rgba(100, 150, 255, 0.9), 
        rgba(30, 50, 150, 1));
    box-shadow: 
        inset 0 2px 4px rgba(255,255,255,0.3),
        inset 0 -2px 4px rgba(0,0,0,0.5),
        2px 2px 5px rgba(0,0,0,0.3);
    position: relative;
    margin-right: -5px; /* Püsküle yapışsın */
    
    animation: colorCycleImam 4s infinite linear;
}

/* Püskül */
.tassel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 5px;
}

/* Püskül ipleri */
.tassel-string {
    width: 40px;
    height: 4px;
    background: linear-gradient(to right, #ccc, #666);
    margin-bottom: -10px; /* Coinlere bağlansın */
    transform: rotate(15deg);
}

/* Altın paralar (Sikke) */
.coin {
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 30% 30%, #ffd700, #b8860b);
    border-radius: 50%;
    border: 1px solid #b8860b;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    margin-top: -5px;
    position: relative;
    z-index: 3;
    
    /* Paralar sallansın */
    animation: swingCoin 3s infinite ease-in-out;
}

.coin:nth-child(2) { animation-delay: 0.2s; margin-left: 15px; }
.coin:nth-child(3) { animation-delay: 0.4s; margin-left: -10px; }

@keyframes swingCoin {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* Renk Değiştirme Animasyonu - Daha sofistike renkler */
@keyframes colorCycle {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

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

/* Eski animasyonları temizle */
/* .imam ve .rosary-container eski stillerini ezdik */

@media screen and (max-width: 768px) {
    .baboli-title {
        font-size: 4rem;
        margin-bottom: 12px;
    }

    .container {
        height: 95%;
        width: 95%;
    }

    .rosary-container {
        padding: 0 5px; /* Daha az padding */
        width: 92vw;
        gap: clamp(4px, 1.1vw, 6px);
        justify-content: flex-start;
    }

    /* Mobilde bazı boncukları gizle (Kısaltma işlemi) */
    .mobile-hidden {
        display: none !important;
    }

    .bead {
        /* Mobilde daha küçük boncuklar sığsın diye */
        width: 18px; 
        height: 18px;
    }

    .imam-piece {
        width: 40px;
        height: 14px;
    }

    .coin {
        width: 15px;
        height: 15px;
    }

    .imam {
        margin-left: 10px;
    }

    .audio-control {
        margin-top: 18px;
    }

    #play-btn {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }

    .donate-btn {
        bottom: 14px;
        right: 14px;
        padding: 10px 12px;
        font-size: 16px;
    }

    .modal-content {
        width: 90%;
        margin: 40% auto;
    }
}
