/* ====================================================== */
/* --- YENİ & PROFESYONEL MOBİL UYUMLU YERLEŞİM --- */
/* ====================================================== */

/* --- 1. ANA YERLEŞİM (MOBİL ÖNCELİKLİ) --- */
/* Varsayılan olarak (mobil) tüm sütunlar alt alta ve tam genişlikte olacak. */
.forum-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Mobil'de boşluk azaltıldı */
    padding: 1rem; /* Mobil için yan boşluklar */
}

.forum-main-content {
    width: 100%;
}

/* Kenar çubukları mobil'de varsayılan olarak GİZLİ olacak. */
.forum-sidebar-left,
.forum-sidebar-right {
    display: none;
}

/* Akordiyon menüler mobil'de varsayılan olarak GÖRÜNÜR olacak. */
.accordion-widgets-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* --- 2. MASAÜSTÜ GÖRÜNÜMÜ (1024px+) --- */
@media (min-width: 1024px) {
    .forum-container {
        flex-direction: row;
        align-items: flex-start;
        gap: 2rem;
        padding: 2.5rem 1rem;
    }

    /* Akordiyon menüleri masaüstünde GİZLE. */
    .accordion-widgets-container {
        display: none;
    }

    /* Kenar çubuklarını masaüstünde GÖRÜNÜR yap. */
    .forum-sidebar-left,
    .forum-sidebar-right {
        display: block;
        position: sticky;
        top: 6rem;
    }
    
    .forum-main-content { order: 2; flex-grow: 1; min-width: 0; }
    .forum-sidebar-left { order: 1; width: 280px; flex-shrink: 0; }
    .forum-sidebar-right { order: 3; width: 300px; flex-shrink: 0; }
}

/* ============================================= */
/* --- YENİ: AKORDİYON WIDGET STİLLERİ --- */
/* ============================================= */
.accordion-widget {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.accordion-widget.open {
    border-color: rgba(var(--primary-rgb), 0.5);
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.1);
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-light);
    text-align: left;
}
.accordion-header:hover {
    color: var(--primary);
}

.accordion-icon {
    transition: transform 0.3s ease;
    color: var(--text-dark);
}

.accordion-widget.open .accordion-icon {
    transform: rotate(180deg);
    color: var(--primary);
}

.accordion-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out; /* Animasyon yumuşatıldı */
    background-color: var(--bg-dark);
}


/* ============================================= */
/* --- WIDGET & KONU KARTI STİLLERİ (MEVCUT) --- */
/* ============================================= */
.sidebar-widget { background-color: var(--bg-light); border: 1px solid var(--border-color); border-radius: 0.75rem; padding: 1.5rem; box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.widget-title { font-size: 1.25rem; font-weight: 700; color: var(--text-light); margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border-color); }
.widget-content { display: flex; flex-direction: column; gap: 0.25rem; }
.widget-list-item { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 0.75rem; border-radius: 0.375rem; transition: all 0.2s ease-in-out; text-decoration: none; color: var(--text-dark); }
.widget-list-item:hover { background-color: rgba(var(--primary-rgb), 0.1); color: var(--primary); transform: translateX(4px); }
.widget-list-item .item-icon { margin-right: 0.75rem; color: var(--text-dark); }
.widget-list-item:hover .item-icon { color: var(--primary); }
.widget-list-item .item-text { font-weight: 500; flex-grow: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget-list-item .item-badge { background-color: var(--bg-dark); color: var(--text-dark); font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; margin-right: 0.75rem; border: 2px solid var(--border-color); }
.user-info { display: flex; flex-direction: column; }
.user-name { font-weight: 600; color: var(--text-light); }
.user-rank { font-size: 0.75rem; color: var(--primary); }

.thread-card { background: var(--bg-light); border-radius: 0.75rem; padding: 1.25rem; border: 1px solid var(--border-color); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); transition: all 0.3s ease; cursor: pointer; position: relative; overflow: hidden; }
.thread-card:hover { transform: translateY(-5px); border-color: rgba(var(--primary-rgb), 0.5); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3); }
.thread-action-btn { display: flex; align-items: center; gap: 0.35rem; cursor: pointer; transition: color 0.2s ease; }
.thread-action-btn:hover { color: var(--primary); }
.thread-action-btn.liked { color: #ef4444; font-weight: bold; }
.thread-action-btn.liked i { fill: #ef4444; }

/* ============================================= */
/* --- KONTROL & DİĞER BİLEŞENLER --- */
/* ============================================= */
.controls-bar { flex-direction: column; align-items: stretch; gap: 1rem; }
@media (min-width: 640px) { .controls-bar { flex-direction: row; align-items: center; } }
.admin-tabs { border-bottom: 1px solid var(--border-color); overflow-x: auto; white-space: nowrap; -ms-overflow-style: none; scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.tab-btn { background: transparent; border: none; border-bottom: 3px solid transparent; color: var(--text-dark); padding: 0.75rem 0.5rem; margin-right: 1.5rem; font-size: 1rem; font-weight: 700; cursor: pointer; transition: all 0.2s ease-in-out; transform: translateY(1px); }
.tab-btn:hover { color: var(--text-light); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; animation: fadeIn 0.5s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.new-thread-prompt-btn { width: 100%; background-color: var(--bg-light); border: 2px dashed var(--border-color); border-radius: 0.75rem; padding: 1rem; display: flex; align-items: center; justify-content: center; color: var(--text-dark); transition: all 0.3s ease; }
.new-thread-prompt-btn:hover { border-color: var(--primary); background-color: rgba(var(--primary-rgb), 0.05); color: var(--text-light); }

.pagination-btn { background-color: var(--bg-light); border: 1px solid var(--border-color); color: var(--text-dark); font-weight: bold; width: 36px; height: 36px; border-radius: 0.375rem; transition: all 0.2s ease; cursor: pointer; }
.pagination-btn:hover:not(:disabled) { background-color: var(--primary); color: white; border-color: var(--primary); }
.pagination-btn.active { background-color: var(--primary); color: white; border-color: var(--primary); cursor: default; }
.pagination-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.thread-card:hover {
    transform: translateY(-5px) scale(1.01); /* Hafif büyüme ekleyebiliriz */
    border-color: rgba(var(--primary-rgb), 0.6);
    /* Daha belirgin bir "glow" efekti */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(var(--primary-rgb), 0.2); 
    background-color: rgba(var(--primary-rgb), 0.03); /* Çok hafif renk değişimi */
}

/* Başlığın renginin daha yumuşak geçiş yapması */
.thread-card .text-xl { 
    transition: color 0.3s ease-out; /* Mevcut transition'ı güncelleyebilir veya ekleyebiliriz */
}
/* forum.css içine eklenebilir */
.thread-tags {
    margin-top: 0.75rem; /* 12px */
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem; /* 8px */
}

.tag {
    display: inline-block;
    background-color: var(--bg-dark); /* Veya --bg-light */
    color: var(--text-dark);
    font-size: 0.75rem; /* 12px */
    font-weight: 600;
    padding: 0.25rem 0.75rem; /* 4px 12px */
    border-radius: 9999px; /* rounded-full */
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    text-decoration: none; /* Alt çizgiyi kaldır */
}

.tag:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.05);
}

/* forum.css */
@keyframes pulseLike { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }
.thread-action-btn.liked-animation i { animation: pulseLike 0.4s ease-out; }

/* forum.css */
@keyframes fadeInEntry {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.thread-card {
    /* ... mevcut stiller ... */
    /* Her kartın animasyonunu biraz geciktirelim */
    animation: fadeInEntry 0.5s ease-out forwards;
    opacity: 0; /* Başlangıçta gizli */
}

/* Kartların sırayla gelmesi için (isteğe bağlı, JS ile eklenebilir) */
/* .thread-card:nth-child(1) { animation-delay: 0.1s; } */
/* .thread-card:nth-child(2) { animation-delay: 0.2s; } ... */

.widget-list-item:hover {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    transform: translateX(4px); /* Bu zaten vardı */
    /* Belki kenarlık ekleyebiliriz */
    /* border-left: 3px solid var(--primary); */
    /* padding-left: calc(0.75rem - 3px); */
}

/* forum.css dosyasının sonuna ekleyin */

/* ============================================= */
/* --- Mobil Header İkon Görünürlük Düzeltmesi --- */
/* ============================================= */

/* lg (1024px) altındaki ekranlar için */
@media (max-width: 1023px) {

    /* Masaüstü Karşılaştırma İkonu Konteyneri */
    #main-header #header-compare-container {
        display: none !important; 
    }

    /* Masaüstü Sepet İkonu Konteyneri */
    #main-header #header-cart-container {
        display: none !important;
    }

    /* Masaüstü Tema Değiştirici ve Profil Alanını içeren DIV */
    /* Bu div'in yapısı header.html'deki gibiyse: */
    #main-header .hidden.lg\\:flex.items-center.gap-2 {
        display: none !important;
    } 
    /* VEYA daha basitçe ID ile hedefleme (eğer ID varsa): */
    /* #main-header #desktop-user-actions { */
    /* display: none !important; */
    /* } */

    /* Mobil Profil Butonunun GÖRÜNÜR olduğundan emin olalım (lg:hidden'ı ezer) */
    #main-header #mobile-profile-btn-right {
         display: inline-flex !important; /* Veya block, flex durumuna göre */
    }
}

/* forum.css dosyasının sonuna ekleyin */

/* ============================================= */
/* --- Mobil Alt Nav Bar Görünürlük Düzeltmesi --- */
/* ============================================= */

/* lg (1024px) ve ÜZERİ ekranlar için */
@media (min-width: 1024px) {
    /* .bottom-nav elementini zorla gizle */
    .bottom-nav {
        display: none !important;
    }
}