/* --------------------------------------------------------------------------------------
 * Fotoloji Glossary Frontend CSS
 * SÜRÜM: 2.7.5 (GRID REVİZYONU - Tam Genişlik Alfabe)
 * NOT: Alfabe barı artık 'Visual Clutter' yaratmaz, alana tam yayılır.
 * -------------------------------------------------------------------------------------- */

/* KAPSAM: #fg-app-root */
#fg-app-root {
    /* --- RENK STRATEJİSİ: MIRAS AL (INHERIT) --- */
    --fg-bg: transparent; 
    --fg-text: inherit; 
    --fg-text-sec: inherit; 
    --fg-border: #29292a; /* Tema ile uyumlu koyu border */
    --fg-accent: var(--primary-color); /* Tema ana rengi */
    --fg-item-bg: transparent;
    
    font-family: inherit;
    max-width: 100%;
    margin: 30px auto;
    color: inherit;
    background: transparent;
}

#fg-app-root * { box-sizing: border-box; }

/* --- ARAMA KUTUSU --- */
#fg-app-root .fg-search-wrapper {
    margin-bottom: 25px;
    width: 100%;
    position: relative;
}

#fg-app-root .fg-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: inherit; 
    opacity: 0.6;
    pointer-events: none;
}

#fg-app-root .fg-search-box {
    width: 100%;
    padding: 12px 40px 12px 45px;
    font-size: 16px;
    border: 1px solid var(--fg-border);
    border-radius: 10px; /* Tema standardi */
    background: inherit; 
    color: inherit;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s;
    -webkit-appearance: none;
}
#fg-app-root .fg-search-box:focus {
    outline: none;
    border-color: var(--fg-accent); 
     box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg-accent) 25%, transparent);
}

#fg-app-root .fg-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    font-size: 24px;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
}
#fg-app-root .fg-search-clear:hover {
    opacity: 1;
    color: var(--fg-accent);
}

/* --- ALFABE BAR (GRID REVİZYONU) --- */
#fg-app-root .fg-alpha-nav {
    /* Flex yerine Grid kullanıyoruz. Bu, öğelerin boşluk bırakmadan yayılmasını sağlar. */
    display: grid;
    
    /* MANTIK: Her kutu en az 45px olsun ama yer varsa genişlesin (1fr). 
       Böylece satır sonlarında boşluk kalmaz, hepsi eşit dağılır. */
    grid-template-columns: repeat(auto-fit, minmax(45px, 1fr));
    
    gap: 8px; /* Kutular arası boşluk */
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--fg-border);
    padding-top: 10px;
}

#fg-app-root .fg-alpha-link {
    text-decoration: none;
    display: flex; /* İçeriği (harfi) tam ortalamak için */
    align-items: center;
    justify-content: center;
    
    /* Sabit genişlik İPTAL. Grid hücresine tam oturacak. */
    width: auto; 
    height: 50px; /* Tıklama alanı için ideal yükseklik */
    
    border-radius: 10px; /* Tema standardi */
    border: 1px solid var(--fg-border);
    
    background: inherit;
    color: inherit;
    
    font-size: 18px; /* Mobilde 25px çok büyük kaçabilir, 18-20px idealdir */
    font-weight: 600;
    transition: all 0.2s;
}

#fg-app-root .fg-alpha-link:hover {
    border-color: var(--fg-accent);
    color: var(--fg-accent);
    /* HOVER EFEKTİ İYİLEŞTİRMESİ: Koyu temada daha belirgin olması için ana rengin şeffaf bir tonu kullanıldı. */
    background: color-mix(in srgb, var(--fg-accent) 15%, transparent);
}
#fg-app-root .fg-alpha-link.active {
    background: var(--fg-accent);
    border-color: var(--fg-accent);
    color: #fff;
}

/* --- LİSTE & KARTLAR --- */
#fg-app-root .fg-section {
    margin-bottom: 40px;
    scroll-margin-top: 150px; 
}
#fg-app-root .fg-letter-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: inherit;
    border-bottom: 2px solid var(--fg-accent);
    display: inline-block;
    padding-bottom: 5px;
}
#fg-app-root .fg-items-grid {
    display: grid;
    gap: 15px;
}

/* TERİM KARTI */
#fg-app-root .fg-item {
    padding: 15px;
    border: 1px solid var(--fg-border);
    border-radius: 10px; /* Tema standardi */
    background: transparent; 
    transition: background 0.2s;
}

#fg-app-root .fg-item.highlight {
    border-color: var(--fg-accent); 
    /* MAVİ GÖLGE DÜZELTMESİ: Vurgu rengi olarak temanın ana rengi kullanıldı. */
    box-shadow: 0 0 12px color-mix(in srgb, var(--fg-accent) 30%, transparent);
}

#fg-app-root .fg-term-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--fg-accent);
    margin-bottom: 5px;
    display: block;
    text-decoration: none;
}
#fg-app-root a.fg-term-title:hover { text-decoration: underline; }

#fg-app-root .fg-term-def {
    margin: 0; 
    line-height: 1.6; 
    font-size: 15px; 
    color: inherit; 
}

#fg-app-root .fg-bkz-link {
    color: var(--fg-accent);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dotted var(--fg-accent);
}

#fg-app-root .fg-back-top {
    float: right; 
    margin-top: 10px; 
    font-size: 13px; 
    color: inherit; 
    opacity: 0.7;
    text-decoration: none;
    border: 1px solid var(--fg-border);
    padding: 4px 10px; 
    border-radius: 10px; /* Tema standardi */
}
#fg-app-root .fg-back-top:hover { 
    background: var(--fg-accent); 
    color: #fff; 
    opacity: 1;
    border-color: var(--fg-accent);
}

/* MOBİL İÇİN ÖZEL AYARLAR */
@media (max-width: 600px) {
    /* Mobilde grid hücrelerini biraz daha küçültebiliriz ki daha fazla sığsın */
    #fg-app-root .fg-alpha-nav {
        grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
        gap: 5px;
    }
    #fg-app-root .fg-alpha-link {
        height: 44px; /* Mobilde min. dokunma hedefi */
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    #fg-app-root .fg-results-container.waiting-search .fg-section { display: none; }
    #fg-app-root .fg-results-container.waiting-search:after { 
        content: "Aradığınız terimi yazın veya yukarıdan harf seçin."; 
        display: block; 
        text-align: center; 
        color: inherit; 
        opacity: 0.7;
        margin-top: 30px; 
    }
}