/* Bilgeağaç Özel Stil ve Mikro-Animasyonlar */

@layer utilities {
    /* Özel Okuma İlerleme Çubuğu */
    #readingProgress {
        transition: width 0.1s ease-out;
    }

    /* Yaprak Süzülme Animasyonu (Floating Leaf) */
    @keyframes leafFloat {
        0%, 100% {
            transform: translateY(0) rotate(0deg);
        }
        50% {
            transform: translateY(-8px) rotate(4deg);
        }
    }

    .animate-leaf-float {
        animation: leafFloat 5s ease-in-out infinite;
    }

    /* D3.js Ağaç Bağlantıları */
    .link-branch {
        fill: none;
        stroke: #74C69D;
        stroke-opacity: 0.6;
        stroke-width: 2.5px;
        transition: all 0.3s ease;
    }

    .dark .link-branch {
        stroke: #2D6A4F;
        stroke-opacity: 0.8;
    }

    /* D3.js Düğümler */
    .node-root circle {
        fill: #1B4332;
        stroke: #74C69D;
        stroke-width: 4px;
        filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
    }

    .node-branch circle {
        fill: #2D6A4F;
        stroke: #52B788;
        stroke-width: 2.5px;
        cursor: pointer;
        transition: transform 0.2s ease, fill 0.2s ease;
    }

    .node-branch:hover circle {
        fill: #74C69D;
        transform: scale(1.25);
    }

    .node-leaf circle {
        fill: #74C69D;
        stroke: #1B4332;
        stroke-width: 2px;
        cursor: pointer;
        transition: transform 0.2s ease, fill 0.2s ease;
    }

    .node-leaf:hover circle {
        fill: #D8F3DC;
        transform: scale(1.4);
    }

    .node text {
        font-family: 'Inter', sans-serif;
        font-size: 12px;
        font-weight: 500;
        fill: #1B4332;
        pointer-events: none;
        transition: fill 0.3s ease;
    }

    .dark .node text {
        fill: #E1F3E8;
    }

    /* Gece Ormanı Teması Sınıfları */
    .dark .prose pre {
        background-color: #081C15 !important;
        border: 1px solid #143427;
    }

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

    ::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
    }

    .dark ::-webkit-scrollbar-track {
        background: #081c15;
    }

    ::-webkit-scrollbar-thumb {
        background: #74c69d;
        border-radius: 4px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #52b788;
    }

    /* Input Yazı Görünürlüğü ve Otomatik Doldurma (Autofill) Stili */
    input, textarea, select {
        color: inherit;
    }

    input:-webkit-autofill,
    input:-webkit-autofill:hover, 
    input:-webkit-autofill:focus, 
    input:-webkit-autofill:active,
    textarea:-webkit-autofill,
    select:-webkit-autofill {
        -webkit-text-fill-color: #111827 !important;
        -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
        transition: background-color 5000s ease-in-out 0s;
    }

    .bg-forest-900 input:-webkit-autofill,
    .bg-forest-800 input:-webkit-autofill,
    .dark input:-webkit-autofill,
    .dark input:-webkit-autofill:hover, 
    .dark input:-webkit-autofill:focus, 
    .dark input:-webkit-autofill:active {
        -webkit-text-fill-color: #ffffff !important;
        -webkit-box-shadow: 0 0 0px 1000px #081c15 inset !important;
    }
}
