/* Sars Yazılım - Şarkışla Projesi 
   Premium Stil Dosyası - v2.0 (Hata Düzeltmeleri Dahil)
*/

:root {
    --ana-renk: #e94560; /* Canlı bir kırmızı/pembe tonu - Enerji verir */
    --ikincil-renk: #0f3460; /* Derin modern lacivert */
    --koyu-arkaplan: #1a1a2e; /* Göz yormayan premium koyu zemin */
    --kart-arkaplan: #16213e; /* Kartlar için biraz daha açık ton */
    --yazi-rengi: #ffffff;
    --silik-yazi: #a2a8d3;
    --golge: 0 10px 20px rgba(0,0,0,0.3);
    --glass: rgba(22, 33, 62, 0.95); /* Buzlu cam efekti (Okunabilirlik için koyulaştırıldı) */
    --radius: 15px; /* Modern yuvarlak köşeler */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent; /* Mobilde tıklama izini kaldırır */
}

/* Scrollbar Düzenlemesi (Kayıt çubuğu güzelleştirme) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px; /* Yatay scroll için */
}
::-webkit-scrollbar-track {
    background: var(--koyu-arkaplan); 
}
::-webkit-scrollbar-thumb {
    background: var(--ikincil-renk); 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--ana-renk); 
}

body {
    background-color: var(--koyu-arkaplan);
    color: var(--yazi-rengi);
    padding-bottom: 90px; /* Mobil alt menü için boşluk */
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- PREMIUM HEADER --- */
header {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.logo-alan {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, var(--ana-renk));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.header-icons {
    display: flex;
    gap: 15px;
}

.icon-btn {
    font-size: 1.2rem;
    color: var(--yazi-rengi);
    position: relative;
    cursor: pointer;
}

.bildirim-nokta {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background-color: var(--ana-renk);
    border-radius: 50%;
    border: 1px solid var(--koyu-arkaplan);
}

/* --- MOBİL ALT MENÜ --- */
.mobil-alt-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--glass);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 65px;
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.3);
}

.menu-item {
    font-size: 1.4rem;
    color: var(--silik-yazi);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.menu-item.active {
    color: var(--ana-renk);
    transform: translateY(-5px);
}

.menu-item.active i {
    filter: drop-shadow(0 0 5px var(--ana-renk));
}

.orta-ekle-btn {
    background: linear-gradient(135deg, var(--ana-renk), #ff2e63);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transform: translateY(-20px);
    box-shadow: 0 0 15px rgba(233, 69, 96, 0.6);
    border: 4px solid var(--koyu-arkaplan);
    cursor: pointer;
}

/* --- SOL VE SAĞ MENÜ GÖRÜNÜRLÜK AYARLARI --- */
/* Mobilde Sol Menü ve Sağ Menü GİZLİ olacak */
.sol-sidebar, .right-sidebar {
    display: none; 
}

/* Masaüstünde (992px ve üzeri) */
@media (min-width: 992px) {
    /* Sol Menü Açılır */
    .sol-sidebar { 
        display: block; 
    }
    
    /* Sağ Menü Açılır */
    .right-sidebar { 
        display: block; 
        position: sticky; 
        top: 90px; 
    }
    
    /* Mobil Alt Menü GİZLENİR */
    .mobil-alt-menu { 
        display: none !important; 
    }
    
    /* Masaüstünde içerik soldan başlamamalı, grid halletmeli */
    body { 
        padding-bottom: 0; 
    }
}

/* --- SOL MENÜ DETAYLARI --- */
.sidebar-card {
    background: var(--kart-arkaplan);
    border-radius: var(--radius);
    padding: 20px;
    position: sticky;
    top: 90px; /* Header'ın altında kalsın diye artırıldı */
    height: fit-content;
}

.sidebar-menu li { margin-bottom: 15px; }
.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--silik-yazi);
    font-size: 1.1rem;
    padding: 10px;
    border-radius: 10px;
    transition: 0.3s;
}
.sidebar-menu a:hover, .sidebar-menu a.active {
    background: rgba(233, 69, 96, 0.1);
    color: var(--ana-renk);
}

/* --- ORTAK COMPONENTLER --- */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 15px;
    padding-top: 90px; /* Header payı */
}

.btn-premium {
    background: linear-gradient(90deg, var(--ana-renk), #ff2e63);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius);
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
    cursor: pointer;
}

/* --- FORM VE GİRİŞ SAYFASI STİLLERİ --- */
.auth-container {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.auth-container::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: var(--ana-renk);
    filter: blur(150px);
    opacity: 0.4;
    z-index: -1;
    border-radius: 50%;
}

.auth-box {
    background: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px 30px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    animation: fadeIn 0.8s ease;
}

.auth-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: #fff;
    font-weight: 700;
}

.auth-title span { color: var(--ana-renk); }

.form-group { margin-bottom: 20px; position: relative; }

.form-input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: 0.3s;
    outline: none;
}

.form-input:focus {
    border-color: var(--ana-renk);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 15px rgba(233, 69, 96, 0.2);
}

.form-label {
    position: absolute;
    left: 20px;
    top: 15px;
    color: #aaa;
    pointer-events: none;
    transition: 0.3s;
    font-size: 1rem;
}

.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
    top: -10px;
    left: 15px;
    font-size: 0.8rem;
    color: var(--ana-renk);
    background: var(--koyu-arkaplan);
    padding: 0 5px;
}

.btn-full {
    width: 100%;
    padding: 15px;
    margin-top: 10px;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.auth-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #aaa;
    font-size: 0.9rem;
}

.auth-link a { color: var(--ana-renk); font-weight: 600; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- PROFİL SAYFASI STİLLERİ --- */
.profil-header-wrapper {
    position: relative;
    margin-bottom: 60px;
}

.profil-cover {
    height: 200px;
    width: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 0 0 20px 20px;
    position: relative;
    background-image: linear-gradient(45deg, var(--ikincil-renk), var(--ana-renk));
}

.profil-cover::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent 60%, var(--koyu-arkaplan));
    border-radius: 0 0 20px 20px;
}

.profil-avatar-container {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 110px;
    padding: 4px;
    background: var(--koyu-arkaplan);
    border-radius: 50%;
    z-index: 2;
}

.profil-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--ana-renk);
}

.profil-info {
    text-align: center;
    padding: 0 15px;
}

.profil-ad {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.verified-badge {
    color: #3498db;
    font-size: 1rem;
}

.profil-kadi {
    color: var(--silik-yazi);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.profil-bio {
    color: #ddd;
    font-size: 0.95rem;
    max-width: 500px;
    margin: 10px auto;
    line-height: 1.5;
}

.profil-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255,255,255,0.03);
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.stat-item {
    text-align: center;
}

.stat-sayi {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ana-renk);
}

.stat-yazi {
    font-size: 0.8rem;
    color: var(--silik-yazi);
}

.profil-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-action {
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-action.primary {
    background: var(--ana-renk);
    border-color: var(--ana-renk);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.btn-action:hover {
    transform: translateY(-2px);
}

/* Tab Menü */
.profil-tabs {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.tab-link {
    padding: 15px 25px;
    color: var(--silik-yazi);
    cursor: pointer;
    position: relative;
    font-weight: 500;
}

.tab-link.active {
    color: var(--ana-renk);
}

.tab-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--ana-renk);
    border-radius: 3px 3px 0 0;
}

/* --- ANA SAYFA GRID YAPISI --- */
.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    /* Header yüksekliği (60px) + Boşluk (30px) = 90px */
    padding-top: 90px;
    padding-left: 15px;
    padding-right: 15px;
}

@media (min-width: 992px) {
    .main-layout {
        grid-template-columns: 250px 1fr 300px; /* Sol - Orta - Sağ */
    }
}

/* --- GÖNDERİ PAYLAŞMA KUTUSU --- */
.share-box {
    background: var(--kart-arkaplan);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--golge);
}

.share-top { display: flex; gap: 15px; margin-bottom: 15px; }
.share-avatar { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; }
.share-input {
    flex: 1;
    background: rgba(0,0,0,0.2);
    border: none;
    border-radius: 20px;
    padding: 12px 20px;
    color: #fff;
    resize: none;
    font-size: 1rem;
    cursor: text;
}
.share-input:focus { outline: none; background: rgba(0,0,0,0.4); }

.share-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 15px;
}

.share-icons { display: flex; gap: 15px; }
.share-icon-btn {
    color: var(--silik-yazi);
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.3s;
}
.share-icon-btn:hover { color: var(--ana-renk); transform: scale(1.1); }

/* --- GÖNDERİ KARTLARI (POST) --- */
.post-card {
    background: var(--kart-arkaplan);
    border-radius: var(--radius);
    margin-bottom: 20px;
    padding: 20px;
    box-shadow: var(--golge);
    position: relative;
    overflow: hidden;
    border-left: 4px solid transparent;
}

/* Gönderi Türüne Göre Renkli Çizgiler */
.post-type-haber { border-left-color: #f1c40f; } /* Sarı/Haber */
.post-type-pazar { border-left-color: #2ecc71; } /* Yeşil/Pazar */
.post-type-cenaze { border-left-color: #95a5a6; background: #2c3e50; } /* Gri/Cenaze */

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.post-user { display: flex; gap: 10px; align-items: center; }
.post-user-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.post-user-info h4 { font-size: 1rem; color: #fff; font-weight: 600; margin-bottom: 2px; }
.post-user-info span { font-size: 0.8rem; color: var(--silik-yazi); }

/* Özel Taglar */
.post-tag {
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 10px;
}
.tag-haber { background: rgba(241, 196, 15, 0.2); color: #f1c40f; }
.tag-pazar { background: rgba(46, 204, 113, 0.2); color: #2ecc71; }
.tag-cenaze { background: rgba(149, 165, 166, 0.2); color: #bdc3c7; }

.post-content { color: #eee; font-size: 0.95rem; line-height: 1.5; margin-bottom: 15px; }
.post-image {
    width: 100%;
    border-radius: 10px;
    margin-top: 10px;
    max-height: 400px;
    object-fit: cover;
}

/* Etkileşim Butonları */
.post-actions {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 15px;
    margin-top: 10px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--silik-yazi);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.action-btn:hover { color: var(--ana-renk); }

/* --- SAĞ KART STİLLERİ --- */
.suggestion-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}
.suggestion-user { display: flex; align-items: center; gap: 10px; }
.add-friend-btn-mini {
    background: rgba(233, 69, 96, 0.1);
    color: var(--ana-renk);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}
.add-friend-btn-mini:hover { background: var(--ana-renk); color: #fff; }

/* --- MODAL (POPUP) STİLLERİ --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none; /* Varsayılan gizli */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-box {
    background: var(--kart-arkaplan);
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255,255,255,0.1);
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.modal-title { font-size: 1.2rem; font-weight: bold; color: #fff; }
.modal-close { cursor: pointer; color: var(--silik-yazi); font-size: 1.5rem; }

/* --- MODAL KATEGORİ SEÇİMİ (2x2 Grid Yapısı) --- */
.post-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr; /* İki sütun: Yan yana iki tane */
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 0;
    overflow: hidden; /* Kaydırmayı kapat */
}

.type-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 12px; /* Daha modern karemsi */
    background: rgba(255,255,255,0.05);
    color: var(--silik-yazi);
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.1);
    transition: 0.3s;
    text-align: center;
}

/* Seçili Olduğunda */
.type-input:checked + .type-option {
    background: var(--ana-renk);
    color: white;
    border-color: var(--ana-renk);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.3);
    transform: translateY(-2px);
}

.type-option:hover { background: rgba(255,255,255,0.1); }

/* Radyo butonu gizleme hilesi */
.type-input { display: none; }
.type-input:checked + .type-option {
    background: var(--ana-renk);
    color: white;
    box-shadow: 0 4px 10px rgba(233, 69, 96, 0.4);
}

.modal-textarea {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: none;
    color: white;
    font-size: 1.1rem;
    resize: none;
    min-height: 120px;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 15px;
}
.modal-textarea:focus { outline: none; background: rgba(0,0,0,0.3); }

.extra-fields { display: none; margin-bottom: 15px; } /* Pazar/Haber için */

.image-preview {
    max-height: 200px;
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
    display: none;
}

/* --- ETKİLEŞİM STİLLERİ --- */

/* Beğenilmiş Kalp */
.btn-begen.liked {
    color: #e94560 !important;
    animation: kalpAtis 0.3s ease;
}

.btn-begen.liked i {
    color: #e94560;
}

@keyframes kalpAtis {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Yorum Alanı */
.yorum-container {
    display: none; /* Başlangıçta gizli */
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 15px;
    margin-top: 10px;
    animation: fadeIn 0.3s ease;
}

.yorum-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.yorum-input {
    flex: 1;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 8px 15px;
    color: #fff;
    font-size: 0.9rem;
}
.yorum-input:focus { outline: none; border-color: var(--ana-renk); }

.yorum-btn {
    background: transparent;
    color: var(--ana-renk);
    border: none;
    cursor: pointer;
    font-weight: 600;
}

/* Yorum Listesi */
.comment-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    background: rgba(255,255,255,0.05);
    padding: 8px 12px;
    border-radius: 12px;
    border-top-left-radius: 2px;
    font-size: 0.9rem;
}

.comment-user {
    font-weight: bold;
    font-size: 0.8rem;
    color: var(--ana-renk);
    margin-bottom: 2px;
}

.comment-text {
    color: #ddd;
    line-height: 1.3;
}
/* --- 3 NOKTA MENÜ (DROPDOWN) --- */
.post-dropdown {
    position: absolute;
    top: 30px;
    right: 0;
    background: var(--kart-arkaplan);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    width: 150px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    display: none; /* Varsayılan gizli */
    z-index: 10;
    overflow: hidden;
}

.post-dropdown.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

.post-dropdown div {
    padding: 10px 15px;
    color: var(--silik-yazi);
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-dropdown div:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}
/* --- MOBİL TAŞMA DÜZELTMESİ (Kesin Çözüm) --- */
html, body {
    max-width: 100%;
    overflow-x: hidden !important; /* Sağa sola kaymayı engeller */
}

/* Mobilde main-layout padding ayarı */
@media (max-width: 991px) {
    .main-layout {
        padding-left: 10px !important;
        padding-right: 10px !important;
        display: block; /* Grid yerine Block yaparak sıkışmayı önler */
    }
    
    .feed-area {
        width: 100%;
        max-width: 100%;
    }

    /* Giriş yapınca sol menünün mobilde yer kaplamasını engelle */
    .sol-sidebar {
        display: none !important;
    }
}
/* --- HATA DÜZELTMELERİ (v4.0) --- */

/* 1. Paylaş Kutusu Mobilde Taşma Sorunu */
.share-top {
    display: flex;
    gap: 10px; /* Boşluğu azalttık */
    align-items: center;
    width: 100%;
}

.share-input {
    flex: 1; /* Kalan boşluğu doldur */
    min-width: 0; /* Flex yapısında taşmayı engelleyen sihirli kod */
    width: 100%; 
}

/* 2. 3 Nokta Menü Görünürlük Sorunu */
.post-dropdown {
    z-index: 9999 !important; /* En üstte görünsün */
    box-shadow: 0 5px 20px rgba(0,0,0,0.8); /* Gölgeyi belirginleştir */
    background: #1a1a2e; /* Menü arka planını garantiye al */
}

/* Mobilde kartların sağa sola oynamasını engelle */
.feed-area {
    width: 100%;
    overflow: hidden; /* Taşanı gizle */
}

/* --- BİLDİRİM DROPDOWN --- */
.notification-dropdown {
    position: absolute;
    top: 50px;
    right: -10px;
    width: 300px;
    background: var(--kart-arkaplan);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: none;
    z-index: 2000;
    overflow: hidden;
}

.notification-dropdown.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.notif-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-weight: bold;
    color: #fff;
    background: rgba(0,0,0,0.2);
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: 0.2s;
    color: #ddd;
}

.notification-item:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.notification-item.unread {
    background: rgba(233, 69, 96, 0.1); /* Okunmamışlar hafif kırmızı */
}

.notif-icon {
    width: 40px;
    height: 40px;
    background: var(--koyu-arkaplan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ana-renk);
}

.notif-content p { font-size: 0.9rem; margin-bottom: 3px; }
.notif-content span { font-size: 0.75rem; color: var(--silik-yazi); }
.no-notif { padding: 20px; text-align: center; color: var(--silik-yazi); }

/* SweetAlert2 Özelleştirme (Sitenin temasına uydurma) */
div:where(.swal2-container) div:where(.swal2-popup) {
    background: var(--kart-arkaplan) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.1);
}
div:where(.swal2-icon).swal2-success { border-color: #2ecc71 !important; color: #2ecc71 !important; }
div:where(.swal2-icon).swal2-error { border-color: #e74c3c !important; color: #e74c3c !important; }

/* --- HEADER İKON DÜZENLEMESİ --- */
.mobile-only-icon {
    display: none; /* Masaüstünde gizli */
}

.desktop-only {
    display: block;
}

/* Mobilde (992px altı) */
@media (max-width: 991px) {
    .mobile-only-icon {
        display: block; /* Mobilde aç */
        margin-right: 5px;
    }
    
    .desktop-only {
        display: none; /* Yer kazanmak için mesaj ikonunu mobilde headerdan gizleyebiliriz */
    }
    
    /* Mobil Sağ Menü (Keşfet Alanı) Tasarımı */
    .right-sidebar.mobile-active {
        display: block !important;
        position: fixed;
        top: 60px;
        right: 0;
        width: 85%; /* Ekranın %85'ini kaplasın */
        height: calc(100vh - 60px - 65px); /* Header ve Footer hariç */
        background: var(--koyu-arkaplan);
        z-index: 999;
        overflow-y: auto;
        padding: 20px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
        border-left: 1px solid rgba(255,255,255,0.1);
        animation: slideInRight 0.3s ease;
    }
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* --- BİLDİRİM DETAY TASARIMI --- */
.notification-dropdown {
    width: 320px; /* Genişletildi */
    max-height: 450px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start; /* Yukarı hizala */
    gap: 12px;
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    text-decoration: none !important;
    color: #eee;
}

.notification-item.unread {
    background: rgba(233, 69, 96, 0.08);
    border-left: 3px solid var(--ana-renk);
}

.notif-avatar-area {
    position: relative;
    flex-shrink: 0;
}

.notif-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.mini-icon {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: var(--kart-arkaplan);
    border-radius: 50%;
    padding: 2px;
    font-size: 0.8rem;
}

.notif-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.notif-text {
    font-size: 0.9rem;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 4px;
    text-decoration: none;
}

.notif-text strong { font-weight: 600; color: #fff; }

.notif-time {
    font-size: 0.75rem;
    color: var(--silik-yazi);
}

/* Kabul Et / Reddet Butonları */
.notif-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.btn-kabul, .btn-red {
    padding: 5px 12px;
    border-radius: 6px;
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn-kabul {
    background: var(--ana-renk);
    color: white;
}

.btn-kabul:hover { background: #d6304a; }

.btn-red {
    background: rgba(255,255,255,0.1);
    color: #ccc;
}

.btn-red:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* --- MOBİL HEADER İKONLARI (4 İkon Yan Yana) --- */
@media (max-width: 991px) {
    .header-icons {
        gap: 10px; /* Aralığı sıkılaştır */
    }
    
    .icon-btn {
        font-size: 1.1rem; /* Mobilde ikonları biraz küçült */
        padding: 5px;
    }
    
    /* Masaüstünde gizli olanlar */
    .mobile-only-icon { display: block; }
    .desktop-only { display: block !important; } /* Mesaj ikonunu geri getir */
    
    /* Logoyu biraz küçült mobilde */
    .logo-alan { font-size: 1.2rem; }
}

/* --- GÜNCEL BİLDİRİM ROZETİ (Sayı Gösteren) --- */
.bildirim-nokta {
    position: absolute;
    top: -5px; /* İkonun biraz daha üstüne */
    right: -5px;
    min-width: 18px; /* Sayı büyüdükçe genişlesin */
    height: 18px;
    background-color: #e94560; /* Ana Renk */
    color: #fff;
    border-radius: 9px; /* Tam yuvarlak kenarlar */
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--koyu-arkaplan); /* İkonla karışmasın diye çerçeve */
    z-index: 5;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* --- MOBİL SAĞ MENÜ DÜZENLEMESİ (Üst Üste Binmeyi Önler) --- */
@media (max-width: 991px) {
    .right-sidebar.mobile-active {
        /* Block yerine Flex kullanıyoruz */
        display: flex !important; 
        flex-direction: column; /* Alt alta sırala */
        gap: 20px; /* Kartlar arası boşluk */
        
        position: fixed;
        top: 60px;
        right: 0;
        width: 85%;
        height: calc(100vh - 60px);
        background: var(--koyu-arkaplan);
        z-index: 1002;
        padding: 20px;
        padding-bottom: 100px; /* En alttaki içerik footer altında kalmasın */
        overflow-y: auto; /* Dikey kaydırma */
        box-shadow: -5px 0 20px rgba(0,0,0,0.5);
        border-left: 1px solid rgba(255,255,255,0.1);
    }

    /* Kartların mobildeki görünümü */
    .right-sidebar.mobile-active .sidebar-card {
        background: var(--kart-arkaplan);
        border-radius: 15px;
        padding: 15px;
        flex-shrink: 0; /* Sıkışmayı önle */
        width: 100%;
    }
}

/* --- HATA GİDERMELERİ (v8.0 - Mobil Düzenlemeleri) --- */

/* 1. MOBİL SAĞ MENÜ (Kartların Üst Üste Binmesini Engelleme) */
@media (max-width: 991px) {
    .right-sidebar.mobile-active {
        display: flex !important; /* Flexbox aç */
        flex-direction: column; /* Alt alta sırala */
        justify-content: flex-start; /* En üstten başla */
        gap: 20px; /* Kartlar arası net boşluk */
        
        position: fixed;
        top: 60px; /* Header altı */
        right: 0;
        width: 85%; /* Ekranın %85'i */
        height: calc(100vh - 60px); /* Tam boy */
        
        background: var(--koyu-arkaplan);
        z-index: 2000;
        padding: 20px;
        padding-bottom: 100px; /* Alt kısımdaki içeriğin kesilmemesi için */
        overflow-y: auto; /* Dikey kaydırma */
        box-shadow: -5px 0 50px rgba(0,0,0,0.8);
        border-left: 1px solid rgba(255,255,255,0.1);
    }

    /* Kartların mobildeki davranışı */
    .right-sidebar.mobile-active .sidebar-card {
        width: 100%;
        flex-shrink: 0; /* Asla büzüşmesin */
        margin-bottom: 0; /* Gap ile hallettik */
        background: #1e1e36; /* Kart rengini biraz ayrıştır */
        border: 1px solid rgba(255,255,255,0.05);
    }
}

/* 2. MOBİL BİLDİRİM KUTUSU (Sayfa Dışına Taşmayı Engelleme) */
@media (max-width: 768px) {
    .notification-dropdown {
        /* İkon bağımlılığını kaldır, ekrana sabitle */
        position: fixed !important;
        top: 70px !important; /* Headerın hemen altı */
        left: 50% !important; /* Ortala */
        transform: translateX(-50%) !important; /* Tam merkeze çek */
        right: auto !important;
        
        width: 90% !important; /* Ekranın %90'ını kapla */
        max-width: 350px; /* Tablette çok büyümesin */
        max-height: 60vh; /* Çok uzarsa kaydır */
        
        border-radius: 15px;
        box-shadow: 0 10px 50px rgba(0,0,0,0.9);
        border: 1px solid rgba(255,255,255,0.2);
        background: #1a1a2e;
    }
    
    /* Bildirim oku (üçgen) mobilde gizlensin çünkü ortaladık */
    .notification-dropdown::before {
        display: none;
    }
}
/* --- MOBİL ARKADAŞ/KEŞFET MODALI (KESİN ÇÖZÜM v9.0) --- */

@media (max-width: 991px) {
    /* Menü Kapalıyken */
    .right-sidebar {
        display: none !important; /* Varsayılan olarak gizle */
    }

    /* Menü Açıldığında (Mobile Active Class) */
    .right-sidebar.mobile-active {
        display: block !important; /* Flex değil Block kullanıyoruz (Üst üste binmeyi önler) */
        position: fixed !important;
        top: 60px !important; /* Header altı */
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: calc(100vh - 60px) !important; /* Header ve Footer payı */
        
        background-color: var(--koyu-arkaplan) !important;
        z-index: 9999 !important;
        overflow-y: auto !important; /* İçerik uzunsa kaydır */
        padding: 20px !important;
        padding-bottom: 100px !important; /* En alttaki içerik görünmesi için */
        
        /* Animasyon */
        animation: slideInUp 0.3s ease-out;
    }

    /* İçindeki Kartların Düzeni */
    .right-sidebar.mobile-active .sidebar-card {
        display: block !important;
        width: 100% !important;
        height: auto !important; /* Yükseklik içeriğe göre uzasın */
        margin-bottom: 25px !important; /* Kartlar arası net boşluk */
        background: #1e1e36 !important; /* Arka plandan ayırt edilsin */
        border: 1px solid rgba(255,255,255,0.1) !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
        position: relative !important; /* Sticky özelliğini iptal et */
        top: 0 !important;
    }

    /* Kart Başlıkları */
    .right-sidebar.mobile-active h4 {
        font-size: 1.2rem !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 10px;
        margin-bottom: 15px;
    }
}

/* Aşağıdan yukarı kayma efekti */
@keyframes slideInUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
/* --- v9.1 MOBİL MENÜ DÜZELTMESİ --- */

/* 1. Alt Menüyü En Üste Çıkar */
.mobil-alt-menu {
    z-index: 10000 !important; /* Her şeyin (sağ menünün bile) üstünde olsun */
}

/* 2. Sağ Menü Boyutunu Ayarla */
@media (max-width: 991px) {
    .right-sidebar.mobile-active {
        /* Yükseklik: Ekran - Header(60px) - AltMenü(65px) */
        /* Böylece tam araya oturur, alt menünün arkasına gitmez */
        height: calc(100vh - 125px) !important; 
        
        /* Alt menünün üzerine binmemesi için bottom değerini sıfırlama */
        bottom: 65px !important;
        top: 60px !important;
    }
}

/* --- ARKADAŞ TAGI VE MOBİL SIĞDIRMA DÜZELTMESİ --- */

/* Arkadaş Tagı Renklendirmesi */
.tag-friend {
    background: rgba(108, 92, 231, 0.15);
    color: #6c5ce7;
    border: 1px solid rgba(108, 92, 231, 0.2);
    white-space: nowrap; /* Yazının aşağı kaymasını engellemeye çalışır */
}

/* Mobil İçin Özel Sıkıştırma Ayarları */
@media (max-width: 576px) {
    
    /* Başlık Alanını Esnek Yap */
    .post-user-info h4 {
        font-size: 0.9rem !important; /* İsmi biraz küçült */
        display: flex;
        align-items: center;
        flex-wrap: wrap; /* Mecbur kalırsa kaydır ama düzgün kaydır */
        gap: 4px; /* Öğeler arası boşluk */
        line-height: 1.4;
    }

    /* Tüm Tagleri Küçült */
    .post-tag {
        font-size: 0.65rem !important; /* Fontu küçült */
        padding: 2px 6px !important; /* Kutuyu daralt */
        margin-left: 2px !important;
        height: 20px;
        display: inline-flex;
        align-items: center;
    }

    /* Sadece Arkadaş Tagındaki İkonu Gizle (Yer kazanmak için) */
    .tag-friend i {
        display: none; 
    }
    
    /* Arkadaş Ekle/Mesaj Butonunu da biraz küçült */
    .add-friend-btn-mini {
        width: 22px !important;
        height: 22px !important;
        font-size: 0.75rem !important;
    }
}

/* --- YORUM ALANI GÜNCELLEMESİ (Mobil Uyumlu) --- */

.yorum-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.2); /* Input arka planı forma taşındı */
    border-radius: 25px;
    padding: 5px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.yorum-input {
    flex: 1;
    background: transparent !important; /* Inputun kendi rengini sildik */
    border: none !important;
    padding: 10px 0 !important;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
}

.yorum-input:focus {
    box-shadow: none !important;
}

.yorum-btn {
    background: transparent;
    border: none;
    color: var(--ana-renk); /* İkon rengi */
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.yorum-btn:active {
    transform: scale(0.9); /* Basınca küçülme efekti */
}

.yorum-btn:hover {
    color: #ff2e63; /* Hover rengi */
}
/* --- YORUM FORMU MOBİL FIX (v10.0) --- */

.yorum-form {
    display: flex !important; /* Flex yapısını zorla */
    align-items: center !important;
    justify-content: space-between !important;
    gap: 5px; /* Öğeler arası boşluk */
    
    background: rgba(0, 0, 0, 0.25); /* Biraz daha belirgin arka plan */
    border-radius: 25px;
    padding: 5px 10px 5px 15px; /* Sağdan biraz daha az boşluk */
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
}

.yorum-input {
    flex-grow: 1; /* Kalan tüm boşluğu doldur */
    width: 100%; /* Genişliği zorla */
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    font-size: 0.95rem;
    padding: 8px 0 !important;
    outline: none !important;
}

.yorum-btn {
    flex-shrink: 0; /* ASLA SIKIŞMA! (En kritik kod bu) */
    width: 40px;    /* Sabit genişlik */
    height: 40px;   /* Sabit yükseklik */
    
    background: transparent;
    border: none;
    color: var(--ana-renk) !important; /* Rengi garantiye al */
    font-size: 1.3rem; /* İkonu biraz büyüt */
    
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.yorum-btn:active {
    transform: scale(0.8); /* Tıklama efekti */
}

/* Eğer inputa odaklanılırsa çerçeve rengi */
.yorum-form:focus-within {
    border-color: var(--ana-renk);
    background: rgba(0, 0, 0, 0.4);
}
/* --- YORUM SAYISI ROZETİ (BADGE) --- */
.comment-badge {
    background-color: #e94560; /* Ana Kırmızı Renk */
    color: #fff;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px; /* Oval/Yuvarlak yapı */
    min-width: 20px;
    text-align: center;
    margin-left: 5px; /* Yazıdan uzaklaştır */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(233, 69, 96, 0.4);
}
/* --- PROFİL RESMİ DEĞİŞTİRME BUTONU --- */
.avatar-edit-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
    background: var(--ana-renk);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid var(--koyu-arkaplan);
    transition: 0.3s;
    z-index: 10;
}

.avatar-edit-btn:hover {
    transform: scale(1.1);
    background: #ff2e63;
}

/* --- MOBİL PROFİL DÜZENLEMELERİ (Kompakt Görünüm) --- */
@media (max-width: 768px) {
    /* Ana konteyner boşluğunu al */
    .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 60px !important; /* Sadece header payı kalsın */
    }

    /* Kapak Fotoğrafı: Tam Genişlik */
    .profil-header-wrapper {
        margin-bottom: 50px; /* Avatar payı */
    }
    .profil-cover {
        border-radius: 0 !important; /* Köşeleri düzelt */
        height: 160px; /* Biraz kısalt */
    }

    /* Profil Bilgileri: Daha Sıkı */
    .profil-info {
        padding: 0 15px;
        margin-top: -10px;
    }
    
    .profil-ad { font-size: 1.3rem; margin-bottom: 2px; }
    .profil-kadi { font-size: 0.85rem; margin-bottom: 8px; }
    .profil-bio { font-size: 0.9rem; margin: 5px auto; }

    /* İstatistikler: Daha Kompakt */
    .profil-stats {
        gap: 15px;
        padding: 10px;
        margin: 15px 0;
        background: rgba(255,255,255,0.02); /* Daha hafif arka plan */
    }
    .stat-sayi { font-size: 1.1rem; }
    .stat-yazi { font-size: 0.75rem; }

    /* Tab Menü: Yapışkan ve Tam Genişlik */
    .profil-tabs {
        background: var(--koyu-arkaplan);
        position: sticky;
        top: 60px; /* Header'ın altına yapışsın */
        z-index: 90;
        padding-top: 5px;
        margin-bottom: 10px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }
    
    /* Gönderi Kartları: Kenar Boşlukları */
    .post-card {
        border-radius: 0 !important; /* Kartları tam ekran yap */
        border-left: none !important; /* Renkli şeritleri kaldır veya incelt */
        border-bottom: 1px solid rgba(255,255,255,0.05);
        margin-bottom: 10px;
    }
}
/* --- v11.0 ULTRA KOMPAKT MOBİL PROFİL TASARIMI --- */

@media (max-width: 768px) {
    /* 1. Ana Konteyner: Kenar boşluklarını sıfırla */
    .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 60px !important; /* Header'a tam yapışsın */
        max-width: 100% !important;
    }

    /* 2. Kapak Fotoğrafı: Modern Kavis */
    .profil-header-wrapper {
        margin-bottom: 45px !important; /* Avatarın taşma payını azalttık */
        position: relative;
    }
    
    .profil-cover {
        border-radius: 0 0 25px 25px !important; /* Alt köşeleri hafif yuvarla */
        height: 140px !important; /* Yüksekliği ideal seviyeye çek */
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    }

    /* 3. Avatar: Daha Kompakt ve Yukarıda */
    .profil-avatar-container {
        width: 90px !important;  /* Biraz küçült */
        height: 90px !important;
        bottom: -40px !important; /* Kapağa daha çok girsin */
        padding: 3px !important; /* Çerçeve incelsin */
        background: var(--koyu-arkaplan) !important;
    }
    
    .avatar-edit-btn {
        width: 28px; height: 28px; font-size: 0.8rem; /* Kamera ikonunu oranla */
    }

    /* 4. Profil Bilgileri: Boşlukları Yok Et */
    .profil-info {
        padding: 0 15px;
        margin-top: 0 !important;
        text-align: center;
    }
    
    .profil-ad {
        font-size: 1.2rem !important;
        margin-bottom: 0 !important;
        font-weight: 700;
        margin-top: 5px;
    }
    
    .profil-kadi {
        font-size: 0.8rem !important;
        color: var(--silik-yazi);
        margin-bottom: 8px !important;
        opacity: 0.8;
    }
    
    .profil-bio {
        font-size: 0.85rem !important;
        margin: 5px auto 15px auto !important;
        line-height: 1.4;
        max-width: 90%;
    }

    /* 5. İstatistikler: Modern Kutucuklar */
    .profil-stats {
        display: flex;
        justify-content: space-around; /* Eşit dağıt */
        background: rgba(255,255,255,0.03);
        margin: 0 15px 15px 15px !important;
        padding: 10px 0 !important;
        border-radius: 15px;
        border: 1px solid rgba(255,255,255,0.05);
    }
    
    .stat-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        line-height: 1.2;
    }
    
    .stat-sayi { font-size: 1.1rem !important; color: #fff; }
    .stat-yazi { font-size: 0.7rem !important; text-transform: uppercase; letter-spacing: 1px; }

    /* 6. Aksiyon Butonları */
    .profil-actions {
        gap: 10px !important;
        margin-bottom: 15px !important;
    }
    
    .btn-action {
        padding: 8px 25px !important; /* Daha geniş basma alanı */
        font-size: 0.85rem !important;
        height: 36px;
    }

    /* 7. Tab Menü: Sticky Header */
    .profil-tabs {
        background: var(--koyu-arkaplan);
        position: sticky;
        top: 60px; /* Header'ın hemen altına yapış */
        z-index: 900; /* İçeriğin üstünde kalsın */
        margin-bottom: 5px !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.2);
        border-bottom: none !important;
        padding-bottom: 0 !important;
    }
    
    .tab-link {
        flex: 1; /* Tüm genişliği kaplasınlar */
        text-align: center;
        padding: 12px 0 !important;
        font-size: 0.9rem !important;
    }

    /* 8. İçerik Kartları */
    .post-card {
        border-radius: 0 !important; /* Tam genişlikte kartlar */
        margin-bottom: 8px !important; /* Araları biraz aç */
        box-shadow: none !important; /* Mobilde gölge yerine düz renk daha temiz */
        border-top: 1px solid rgba(255,255,255,0.05);
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
}

/* --- v13.0 MENÜ VE BUTON DÜZELTMELERİ --- */

/* 1. Sağ Menü (Drawer) Her Yerde Çalışsın */
.right-sidebar.mobile-active {
    display: flex !important;
    flex-direction: column;
    gap: 20px;
    
    position: fixed;
    top: 60px;
    right: 0;
    height: calc(100vh - 60px);
    
    background: var(--koyu-arkaplan);
    z-index: 2000;
    padding: 20px;
    padding-bottom: 100px;
    overflow-y: auto;
    
    /* Masaüstünde genişlik */
    width: 320px; 
    box-shadow: -5px 0 50px rgba(0,0,0,0.5);
    border-left: 1px solid rgba(255,255,255,0.1);
    animation: slideInRight 0.3s ease-out;
}

/* Mobilde tam ekran olsun */
@media (max-width: 991px) {
    .right-sidebar.mobile-active {
        width: 100%;
    }
}

/* 2. Headerdaki İkonun Görünürlüğü */
/* Varsayılan: Göster */
.header-users-icon {
    display: block;
}

/* Masaüstünde ve Ana Sayfadaysak: Gizle (Çünkü zaten sağda açık) */
/* NOT: Bu özelliğin çalışması için index.php body'sine class ekleyeceğiz */
@media (min-width: 992px) {
    body.is-homepage .header-users-icon {
        display: none;
    }
    
    /* Masaüstünde varsayılan right-sidebar'ı gizle (Ana sayfa hariç) */
    body:not(.is-homepage) .right-sidebar {
        display: none;
    }
    
    /* Ama active ise göster */
    body:not(.is-homepage) .right-sidebar.mobile-active {
        display: flex;
    }
}

/* --- v14.0 MENÜ VE HEADER DÜZELTMESİ (KESİN ÇÖZÜM) --- */

/* 1. İkon Tıklama Alanını Garantiye Al */
.icon-btn {
    position: relative;
    z-index: 1002; /* Diğer öğelerin üstünde */
    cursor: pointer;
}

/* 2. Sağ Menü (Drawer) - Hem Mobil Hem Masaüstü İçin */
/* Varsayılan: Sadece 'main-layout' içindeyse (Ana Sayfa) göster, yoksa gizle */
.right-sidebar {
    /* Ana sayfa haricinde varsayılan olarak gizli olsun */
    display: none; 
}

/* Ama Ana Sayfa grid yapısı içindeyse göster (Masaüstü için) */
.main-layout .right-sidebar {
    display: block;
}

/* --- AKTİF OLUNCA (BUTONA BASINCA) --- */
/* .mobile-active sınıfı eklendiğinde her şeyi ez ve aç */
.right-sidebar.mobile-active {
    display: flex !important;
    flex-direction: column;
    gap: 20px;
    
    position: fixed;
    top: 60px;
    right: 0;
    height: calc(100vh - 60px);
    
    background: var(--koyu-arkaplan);
    z-index: 9999 !important; /* En üstte */
    padding: 20px;
    padding-bottom: 100px;
    overflow-y: auto;
    
    width: 320px; 
    box-shadow: -5px 0 100px rgba(0,0,0,0.9); /* Gölgeyi artırdık */
    border-left: 1px solid rgba(255,255,255,0.1);
    animation: slideInRight 0.3s ease-out;
}

/* Mobilde Tam Ekran */
@media (max-width: 991px) {
    .right-sidebar.mobile-active {
        width: 100%;
    }
    
    /* Ana sayfada grid içindeki sağ menüyü mobilde gizle */
    .main-layout .right-sidebar {
        display: none;
    }
    
    /* Ama active olunca göster */
    .main-layout .right-sidebar.mobile-active {
        display: flex !important;
    }
}

/* 3. Header İkonu Görünürlük Ayarı */
.header-users-icon {
    display: block; /* Varsayılan: Göster */
}

/* Masaüstünde ve Ana Sayfadaysak İkonu Gizle */
/* Çünkü ana sayfada sağ menü zaten açık */
@media (min-width: 992px) {
    body.is-homepage .header-users-icon {
        display: none !important;
    }
}

/* --- v19.0 PROFESYONEL CHAT TASARIMI --- */

/* 1. INBOX (Gelen Kutusu) */
.inbox-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--kart-arkaplan);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    min-height: 60vh;
}

.inbox-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.2);
}

.inbox-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: 0.2s;
    cursor: pointer;
}

.inbox-item:hover, .inbox-item.unread {
    background: rgba(255,255,255,0.03);
}

.inbox-item.unread .inbox-bottom p {
    color: #fff;
    font-weight: 600;
}

.inbox-avatar img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.1);
}

.inbox-info {
    flex: 1;
    margin-left: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.inbox-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.inbox-top h4 { font-size: 1rem; color: #fff; margin: 0; }
.inbox-top span { font-size: 0.75rem; color: var(--silik-yazi); }

.inbox-bottom { display: flex; justify-content: space-between; align-items: center; }
.inbox-bottom p { font-size: 0.9rem; color: var(--silik-yazi); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }

.unread-badge {
    width: 10px; height: 10px; background: #e94560; border-radius: 50%;
}

/* 2. CHAT ROOM (Sohbet Ekranı - Tam Ekran) */
body.chat-mode {
    overflow: hidden; /* Sayfa kaydırmayı kapat */
    padding: 0 !important;
    margin: 0 !important;
}

.chat-app {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #0f0f10;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

/* Header */
.chat-topbar {
    height: 65px;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}

.chat-back { color: #fff; font-size: 1.2rem; margin-right: 15px; cursor: pointer; }
.chat-user-pic { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; margin-right: 10px; }
.chat-user-details h3 { font-size: 1rem; color: #fff; margin: 0; }
.chat-user-details span { font-size: 0.75rem; color: #2ecc71; }

/* Mesaj Alanı */
.chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-image: url('https://www.transparenttextures.com/patterns/dark-matter.png'); /* Hafif doku */
    scroll-behavior: smooth;
}

.message-row {
    display: flex;
    width: 100%;
}

.message-row.me { justify-content: flex-end; }
.message-row.you { justify-content: flex-start; }

.message-bubble {
    max-width: 75%;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Renkler */
.message-row.me .message-bubble {
    background: #e94560;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.message-row.you .message-bubble {
    background: #252530;
    color: #eee;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 0.65rem;
    text-align: right;
    margin-top: 4px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

/* Yazma Alanı */
.chat-input-bar {
    height: 70px;
    background: #1a1a2e;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 10px;
    flex-shrink: 0;
}

.chat-input-field {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    color: #fff;
    font-size: 1rem;
    outline: none;
}

.chat-send-button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #e94560;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.chat-send-button:active { transform: scale(0.9); }

/* Mobilde input yukarı kaymasın diye */
@media (max-width: 768px) {
    .chat-input-bar {
        position: sticky;
        bottom: 0;
    }
}

/* --- v20.0 MASAÜSTÜ CHAT VE SAĞ MENÜ DÜZELTMESİ --- */

/* 1. Sağ Menü Görünürlük Fixi (Masaüstü) */
@media (min-width: 992px) {
    /* Main layout içindeki right-sidebar her zaman görünsün (Mesaj listesi için) */
    .main-layout .right-sidebar {
        display: block !important;
    }
}

/* 2. Masaüstü Chat İyileştirmesi (Derli Toplu Görünüm) */
@media (min-width: 992px) {
    
    /* Chat Arka Planı */
    body.chat-mode {
        background-color: #0f0f10; /* Koyu zemin */
        background-image: 
            radial-gradient(circle at 10% 20%, rgba(233, 69, 96, 0.1) 0%, transparent 20%),
            radial-gradient(circle at 90% 80%, rgba(15, 52, 96, 0.1) 0%, transparent 20%);
    }

    /* Chat Kapsayıcıyı Ortala ve Sınırla */
    .chat-wrapper {
        max-width: 900px; /* İdeal okuma genişliği */
        margin: 20px auto; /* Ortala */
        height: calc(100vh - 40px); /* Üstten alttan boşluk */
        border-radius: 20px; /* Köşeleri yuvarla */
        overflow: hidden; /* Taşanları gizle */
        box-shadow: 0 20px 50px rgba(0,0,0,0.5); /* Derinlik ver */
        border: 1px solid rgba(255,255,255,0.1); /* İnce çerçeve */
        background: #1a1a2e; /* Kutu rengi */
    }

    /* Header ve Footer'ı Kutu İçine Hapset */
    .chat-header-bar {
        position: absolute; /* Fixed yerine Absolute */
        top: 0;
        left: 0;
        width: 100%;
        border-radius: 20px 20px 0 0; /* Üst köşeler */
    }

    .chat-footer-bar {
        position: absolute; /* Fixed yerine Absolute */
        bottom: 0;
        left: 0;
        width: 100%;
        border-radius: 0 0 20px 20px; /* Alt köşeler */
    }

    /* İçerik Alanı */
    .chat-content {
        padding-top: 80px; /* Header payı */
        padding-bottom: 80px; /* Footer payı */
    }

    /* Sol Menüyü Chat Ekranında Gizle (Odaklanma Modu) */
    body.chat-mode .sol-sidebar {
        display: none;
    }
}

/* --- PROFESYONEL SOHBET ARAYÜZÜ (vFinal) --- */

/* 1. Genel Sayfa Yapısı */
body.chat-mode {
    background-color: #0f0f12; /* Çok koyu zemin */
    overflow: hidden; /* Sayfa kaydırmayı kapat, sadece chat kaysın */
    margin: 0; padding: 0;
}

.chat-app {
    display: flex;
    flex-direction: column;
    height: 100vh; /* Ekranın tamamı */
    max-width: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/stardust.png'); /* Hafif doku */
    position: relative;
}

/* 2. Üst Bar (Header) */
.chat-topbar {
    height: 65px;
    background: rgba(30, 30, 50, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    flex-shrink: 0; /* Asla büzüşmesin */
    z-index: 10;
}

.chat-back {
    color: #fff;
    font-size: 1.2rem;
    padding: 10px;
    margin-right: 5px;
    cursor: pointer;
    transition: 0.2s;
}
.chat-back:hover { color: var(--ana-renk); }

.chat-user-pic {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    border: 2px solid rgba(255,255,255,0.1);
}

.chat-user-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chat-user-details h3 {
    font-size: 1rem;
    color: #fff;
    margin: 0;
    font-weight: 600;
}

.chat-user-details span {
    font-size: 0.75rem;
    color: #2ecc71; /* Online yeşili */
    font-weight: 500;
}

/* 3. Mesaj Alanı (Scrollable) */
.chat-area {
    flex: 1; /* Kalan tüm alanı kapla */
    overflow-y: auto; /* Sadece burası kaysın */
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scroll-behavior: smooth;
}

/* Mesaj Satırları */
.message-row {
    display: flex;
    width: 100%;
    margin-bottom: 5px;
}

.message-row.me { justify-content: flex-end; } /* Ben sağa */
.message-row.you { justify-content: flex-start; } /* O sola */

/* Baloncuklar */
.message-bubble {
    max-width: 75%; /* Ekranın %75'ini geçmesin */
    padding: 10px 14px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    word-wrap: break-word;
}

/* Benim Mesajım */
.message-row.me .message-bubble {
    background: linear-gradient(135deg, #e94560, #c0394d); /* Ana renk gradyanı */
    color: #fff;
    border-radius: 15px 15px 2px 15px; /* Sağ alt köşe sivri */
}

/* Karşı Mesaj */
.message-row.you .message-bubble {
    background: #252535; /* Koyu gri */
    color: #e0e0e0;
    border-radius: 15px 15px 15px 2px; /* Sol alt köşe sivri */
    border: 1px solid rgba(255,255,255,0.05);
}

.message-time {
    font-size: 0.65rem;
    text-align: right;
    margin-top: 4px;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

/* 4. Alt Bar (Input) */
.chat-input-bar {
    background: #1e1e2e;
    padding: 10px 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    z-index: 10;
    /* iPhone güvenli alan */
    padding-bottom: env(safe-area-inset-bottom, 10px); 
}

.chat-input-field {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 12px 20px;
    border-radius: 25px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

.chat-input-field:focus {
    border-color: var(--ana-renk);
    background: rgba(0,0,0,0.5);
}

.chat-send-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ana-renk);
    border: none;
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
    transition: 0.2s;
    flex-shrink: 0; /* Sıkışmasın */
}

.chat-send-button:active { transform: scale(0.9); }

/* Masaüstünde ortala */
@media (min-width: 992px) {
    .chat-app {
        max-width: 900px;
        margin: 0 auto;
        border-left: 1px solid rgba(255,255,255,0.1);
        border-right: 1px solid rgba(255,255,255,0.1);
        height: 100vh;
    }
}

/* --- v25.0 KESİN MOBİL ÇÖZÜMLER (CHAT & MODAL) --- */

/* === 1. SOHBET SİSTEMİ (FLEXBOX MİMARİSİ) === */

/* Sayfa kaydırmayı kapat, sadece iç kısım kayacak */
body.chat-mode {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #0f0f12;
    /* Mobil tarayıcı yüksekliği hesaplaması */
    height: 100vh; /* Fallback */
    height: 100dvh; /* Dynamic Viewport Height (Adres çubuğunu hesaba katar) */
}

/* Ana Taşıyıcı: Dikey Flex */
.chat-app {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
    background-image: url('https://www.transparenttextures.com/patterns/stardust.png');
}

/* Üst Bar: Sabit Yükseklik */
.chat-topbar {
    flex: 0 0 60px; /* Büyüme, Küçülme, Sabit 60px */
    background: rgba(30, 30, 50, 0.98);
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    z-index: 10;
}

/* Mesaj Alanı: Kalan Boşluğu Doldurur */
.chat-area {
    flex: 1; /* Kalan tüm alanı kapla */
    overflow-y: auto; /* Sadece burası scroll olsun */
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    -webkit-overflow-scrolling: touch; /* iOS akıcı kaydırma */
}

/* Alt Bar (Input): Sabit Yükseklik */
.chat-input-bar {
    flex: 0 0 auto; /* İçeriği kadar yer kapla */
    min-height: 70px;
    background: #1e1e2e;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    
    /* iPhone güvenli alan (Çentik) */
    padding-bottom: calc(10px + env(safe-area-inset-bottom)); 
    z-index: 20;
}

/* Input ve Buton Düzeni */
.chat-input-field {
    flex: 1; /* Kalan alanı doldur */
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 12px 20px;
    border-radius: 25px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    width: 100%; /* Genişlik garantisi */
}

.chat-send-button {
    flex: 0 0 45px; /* Asla sıkışma, sabit 45px */
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--ana-renk);
    border: none;
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* === 2. MODAL SİSTEMİ (FLEX ORTALAMA) === */

/* Modal Overlay: Flex Container */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
    z-index: 20000; /* En üstte */
    
    /* Kritik: Flex ile ortalama */
    display: none; /* Varsayılan gizli */
    align-items: center; /* Dikey orta */
    justify-content: center; /* Yatay orta */
    padding: 20px; /* Kenar boşluğu */
}

.modal-overlay.active {
    display: flex; /* Açılınca Flex olsun */
}

/* Modal Kutusu */
.modal-box {
    background: var(--kart-arkaplan);
    width: 100%;
    max-width: 500px;
    border-radius: 20px;
    padding: 20px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.9);
    border: 1px solid rgba(255,255,255,0.1);
    
    /* İçerik taşarsa kutu içinde scroll olsun, ekran dışına kaçmasın */
    max-height: 80vh; /* Ekranın %80'ini geçemesin */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Resim Önizleme */
.image-preview {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 10px;
    display: none;
    flex-shrink: 0;
}

/* Mobilde chat input yukarı kaymasın diye */
@media (max-width: 768px) {
    .chat-input-bar {
        position: sticky; 
        bottom: 0;
    }
}
/* --- vFinal: MOBİL MODAL & CHAT OPTİMİZASYONU --- */

/* 1. MOBİLDE MODAL: BOTTOM SHEET TARZI */
@media (max-width: 768px) {
    .modal-box {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        top: auto !important; /* Üst sabitlemeyi iptal et */
        transform: none !important; /* Ortalamayı iptal et */
        
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 25px 25px 0 0 !important; /* Sadece üst köşeler yuvarlak */
        padding: 20px !important;
        padding-bottom: 30px !important; /* Alt menü payı */
        
        /* Esnek İçerik Yapısı */
        display: flex !important;
        flex-direction: column !important;
        max-height: 85vh !important; /* Ekranın %85'ini geçmesin */
    }

    /* Formu Flex yap, böylece içerik sığar */
    #postForm {
        display: flex;
        flex-direction: column;
        flex: 1;
        overflow: hidden; /* Form taşmasın */
    }

    /* Yazı Alanı: Esnek olsun, yer kalmazsa küçülsün */
    .modal-textarea {
        flex: 1 1 auto !important; /* Büyü ve Küçül */
        min-height: 60px !important; /* En az bu kadar olsun */
        overflow-y: auto;
    }

    /* Resim Önizleme: Sabit boyutlu olsun ama esnekliği bozmasın */
    .image-preview {
        flex: 0 0 auto; /* Boyutunu koru */
        max-height: 150px !important;
        width: 100%;
        object-fit: contain;
        margin: 10px 0;
        background: #000;
        border-radius: 10px;
    }
    
    /* Alt Bar (Butonlar): Sabit kalsın */
    .share-bottom {
        flex: 0 0 auto; /* Asla küçülmesin */
        margin-top: 10px;
    }
}

/* --- v23.0 FINAL MOBİL GÖRÜNÜM VE MODAL --- */

/* 1. MOBİLDE ORTALI VE ESTETİK MODAL */
@media (max-width: 768px) {
    .modal-box {
        /* Konumlandırma: Tam Orta */
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        bottom: auto !important; /* Alttan yapışmayı iptal et */
        
        /* Boyutlar ve Görünüm */
        width: 90% !important; /* Ekranın %90'ı */
        max-width: 400px !important;
        max-height: 80vh !important; /* Ekranın %80'inden büyük olmasın */
        border-radius: 20px !important; /* Her köşesi yuvarlak */
        
        background: rgba(22, 33, 62, 0.98) !important; /* Hafif transparan */
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255,255,255,0.15) !important;
        box-shadow: 0 15px 50px rgba(0,0,0,0.8) !important;
        
        display: flex !important;
        flex-direction: column !important;
        padding: 20px !important;
        z-index: 10005 !important;
    }

    /* İçerik kaydırması */
    #postForm {
        overflow: hidden;
        display: flex;
        flex-direction: column;
        max-height: 100%;
    }

    .modal-textarea {
        flex-shrink: 1; /* Gerektiğinde küçül */
        min-height: 80px !important;
        overflow-y: auto;
    }

    /* Klavye açılınca modalın çok yukarı kaçmasını engellemek için */
    /* CSS safe-area kullanımı */
    .modal-overlay {
        align-items: center; /* Flex ortalama */
        padding-bottom: env(safe-area-inset-bottom);
    }
}



/* --- v24.0 Z-INDEX VE CHAT FIX --- */

/* 1. KONUM MODALI FIX (SweetAlert'i En Üste Al) */
div.swal2-container {
    z-index: 200000 !important; /* Gönderi modalının (10005) çok üstünde */
}



/* --- v25.0 FİNAL MOBİL DÜZELTMELERİ --- */

/* 1. KONUM MODALI (SweetAlert) MOBİL TAŞMA ÇÖZÜMÜ */
div.swal2-popup {
    font-size: 0.9rem !important; /* Yazıları biraz küçült */
    width: 90% !important; /* Ekrana sığdır */
    max-width: 400px !important;
    padding: 1.5em !important;
    overflow-x: hidden !important; /* Yan taşmayı engelle */
}

div.swal2-html-container {
    margin: 1em 0 0.5em 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Inputları ekrana sığdır */
.swal2-input {
    width: 95% !important; /* %100 yaparsan border yüzünden taşabilir */
    margin: 10px auto !important;
    font-size: 1rem !important;
    height: 2.5em !important;
}



/* --- v30.0 KESİN ÇÖZÜM PAKETİ --- */

/* === 1. ÖZEL KONUM MODALI (SweetAlert Yerine) === */
.custom-location-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 30000; /* En tepede */
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.custom-location-box {
    background: #1a1a2e;
    width: 90%;
    max-width: 350px;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.9);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.custom-location-box h3 {
    color: #fff; margin: 0; text-align: center; font-size: 1.2rem;
}

.loc-input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 12px;
    border-radius: 10px;
    color: #fff;
    width: 100%;
    outline: none;
}

.loc-actions {
    display: flex; gap: 10px; margin-top: 10px;
}

.btn-loc-save { flex: 1; background: #2ecc71; border: none; padding: 12px; border-radius: 10px; color: #fff; font-weight: bold; cursor: pointer; }
.btn-loc-cancel { flex: 1; background: #e74c3c; border: none; padding: 12px; border-radius: 10px; color: #fff; font-weight: bold; cursor: pointer; }


/* --- vFinal - GARANTİLİ SOHBET DÜZENİ --- */

body.chat-mode {
    margin: 0;
    padding: 0;
    height: 100dvh; /* Mobil tarayıcılar için dinamik yükseklik */
    width: 100vw;
    overflow: hidden; /* Sayfa kaymasın */
    background-color: #0f0f12;
}

.chat-app {
    display: flex;
    flex-direction: column; /* Standart Alt Alta */
    height: 100%;
    width: 100%;
    max-width: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/stardust.png');
}

/* 1. Header */
.chat-topbar {
    flex: 0 0 60px; /* Sabit yükseklik */
    background: rgba(30, 30, 50, 0.98);
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    z-index: 10;
}

/* 2. Mesaj Alanı */
.chat-area {
    flex: 1; /* Kalan alanı kapla */
    display: flex;
    flex-direction: column; /* Yukarıdan Aşağıya */
    justify-content: flex-start;
    overflow-y: auto; /* Kaydırma */
    padding: 15px;
    gap: 10px;
    scroll-behavior: auto; /* JS ile yöneteceğiz */
}

/* 3. Input Alanı */
.chat-input-bar {
    flex: 0 0 auto; /* İçeriği kadar yer kapla */
    background: #1e1e2e;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 20;
    padding-bottom: calc(10px + env(safe-area-inset-bottom)); /* iPhone Çentik */
}

/* Mesaj Baloncukları (Tasarım Aynı) */
.message-row { display: flex; width: 100%; margin-bottom: 5px; }
.message-row.me { justify-content: flex-end; }
.message-row.you { justify-content: flex-start; }

.message-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.message-row.me .message-bubble { background: #e94560; color: #fff; border-bottom-right-radius: 2px; }
.message-row.you .message-bubble { background: #252530; color: #eee; border-bottom-left-radius: 2px; }
.message-time { font-size: 0.65rem; text-align: right; margin-top: 3px; opacity: 0.7; }

.chat-input-field {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 12px 20px;
    border-radius: 25px;
    color: #fff;
    font-size: 1rem;
    outline: none;
}

.chat-send-button {
    width: 45px; height: 45px; border-radius: 50%; background: var(--ana-renk); border: none; color: #fff; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}

/* --- v26.0 GÖRSEL VE MEDYA İYİLEŞTİRMESİ --- */

.post-image {
    width: 100%;
    height: auto !important; /* Sabit yüksekliği iptal et */
    max-height: 600px; /* Çok uzun resimler ekranı kaplamasın */
    object-fit: contain; /* Resmi asla kesme, tamamını göster */
    background-color: rgba(0,0,0,0.3); /* Resim kenarlarında boşluk kalırsa şık dursun */
    border-radius: 10px;
    margin-top: 10px;
    display: block;
}
/* --- v31.0 PROFİL SAYFASI MASAÜSTÜ DÜZENİ --- */

/* Profil sayfasında da Sağ Menüyü (Masaüstünde) Göster */
body.is-profile .right-sidebar {
    display: block !important;
}

/* Profil içeriğini orta alana sığdır */
body.is-profile .feed-area {
    max-width: 100%; /* Genişliği grid hücresine göre ayarla */
    overflow: hidden; /* Taşmaları engelle */
}

/* --- vFinal: KESİN ÇÖZÜM SOHBET TASARIMI --- */

body.chat-mode {
    margin: 0;
    padding: 0;
    /* Mobil tarayıcıların gerçek görünür alanını kullan */
    height: 100dvh; 
    width: 100vw;
    overflow: hidden; /* Sayfa asla kaymasın */
    background-color: #0f0f12;
    position: fixed; /* Sayfayı ekrana kilitle */
    top: 0; left: 0;
}

.chat-app {
    display: flex;
    flex-direction: column; /* Standart dizilim */
    height: 100%;
    width: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/stardust.png');
}

/* 1. HEADER (Sabit) */
.chat-topbar {
    flex: 0 0 60px;
    background: rgba(30, 30, 50, 0.98);
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    z-index: 10;
}

/* 2. MESAJ ALANI (Esnek) */
.chat-area {
    flex: 1; /* Kalan tüm alanı doldur */
    display: flex;
    flex-direction: column;
    
    overflow-y: auto; /* Sadece burası kaysın */
    padding: 15px;
    gap: 10px;
    
    /* iOS'ta akıcı kaydırma */
    -webkit-overflow-scrolling: touch;
}

/* SİHİRLİ DOKUNUŞ: Mesajlar azsa en alta it */
/* İlk mesaj elemanına margin-top: auto vererek hepsini aşağı iteriz */
.chat-area > :first-child {
    margin-top: auto; 
}

/* Mesaj Satırları */
.message-row {
    display: flex;
    width: 100%;
    flex-shrink: 0; /* Büzüşme */
}

.message-row.me { justify-content: flex-end; }
.message-row.you { justify-content: flex-start; }

.message-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.message-row.me .message-bubble {
    background: #e94560; color: #fff; border-bottom-right-radius: 2px;
}
.message-row.you .message-bubble {
    background: #252530; color: #eee; border-bottom-left-radius: 2px;
}

.message-time {
    font-size: 0.65rem; text-align: right; margin-top: 3px; opacity: 0.7;
}

/* 3. INPUT ALANI (Sabit Alt) */
.chat-input-bar {
    flex: 0 0 auto; /* İçeriği kadar yer kapla */
    background: #1e1e2e;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 20;
    
    /* Klavye açılınca inputun yukarı itilmesi için gerekli güvenli alan */
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
}

.chat-input-field {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 12px 20px;
    border-radius: 25px;
    color: #fff;
    font-size: 1rem;
    outline: none;
}

.chat-send-button {
    width: 45px; height: 45px; border-radius: 50%;
    background: var(--ana-renk); border: none; color: #fff; font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    flex-shrink: 0;
}

/* --- v28.0 PREMIUM COMPACT AUTH TASARIMI --- */

.auth-wrapper {
    height: 100dvh; /* Mobilin gerçek %100 yüksekliği */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f0f12;
    /* Hafif modern bir arka plan deseni */
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(233, 69, 96, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(15, 52, 96, 0.15) 0%, transparent 20%);
    position: relative;
    z-index: 1;
}

.modern-auth-box {
    width: 90%;
    max-width: 400px;
    background: rgba(26, 26, 46, 0.85); /* Koyu ve şeffaf */
    backdrop-filter: blur(20px); /* Güçlü buzlanma */
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 25px;
    padding: 25px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

/* Üstteki renkli çizgi efekti */
.modern-auth-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--ana-renk), #3498db);
}

.auth-header-logo {
    text-align: center;
    margin-bottom: 20px;
}

.auth-header-logo i {
    font-size: 2.5rem;
    background: -webkit-linear-gradient(45deg, #fff, var(--ana-renk));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header-logo h2 {
    font-size: 1.2rem;
    color: #fff;
    margin-top: 5px;
    letter-spacing: 1px;
}

/* Modern Input Grubu */
.input-group-modern {
    position: relative;
    margin-bottom: 15px;
}

.input-modern {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 12px 15px 12px 45px; /* İkon payı */
    color: #fff;
    font-size: 0.95rem;
    transition: 0.3s;
    outline: none;
    height: 45px; /* Sabit yükseklik */
}

.input-modern:focus {
    border-color: var(--ana-renk);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 15px rgba(233, 69, 96, 0.2);
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--silik-yazi);
    font-size: 1rem;
    transition: 0.3s;
}

.input-modern:focus + .input-icon {
    color: var(--ana-renk);
}

/* Yan Yana Grid (Kayıt Sayfası İçin) */
.auth-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-auth-pro {
    width: 100%;
    background: linear-gradient(135deg, var(--ana-renk), #c0394d);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.3);
    transition: 0.3s;
    margin-top: 5px;
}

.btn-auth-pro:active { transform: scale(0.98); }

.auth-footer-link {
    text-align: center;
    margin-top: 15px;
    font-size: 0.85rem;
    color: #aaa;
}

.auth-footer-link a {
    color: var(--ana-renk);
    font-weight: bold;
    text-decoration: none;
}
/* --- v29.0 KAYIT SAYFASI OPTİMİZASYONU --- */

/* Kayıt kutusu içeriği çok olduğu için boyu uzayabilir. 
   Ekrana sığması için maksimum yükseklik verip içten kaydırıyoruz. */
.register-box {
    max-height: 90vh; /* Ekranın %90'ını geçmesin */
    overflow-y: auto; /* Sığmazsa kutu içinde aşağı kaydır */
    
    /* Scroll çubuğunu şıklaştır */
    scrollbar-width: thin;
    scrollbar-color: var(--ana-renk) transparent;
}

/* Webkit (Chrome/Safari) Scrollbar */
.register-box::-webkit-scrollbar {
    width: 5px;
}
.register-box::-webkit-scrollbar-track {
    background: transparent;
}
.register-box::-webkit-scrollbar-thumb {
    background-color: var(--ana-renk);
    border-radius: 10px;
}

/* Inputların arasını biraz açalım ama çok değil */
.input-group-register {
    margin-bottom: 12px; /* İdeal boşluk */
    position: relative;
}

/* --- v40.0 PROFESYONEL HABER PORTALI (MAGAZINE LAYOUT) --- */

/* Genel Düzen */
.news-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 1. MANŞET (HERO) KARTI */
.news-hero-card {
    position: relative;
    width: 100%;
    height: 400px; /* Sinematik yükseklik */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.1);
    display: block;
    text-decoration: none;
}

.news-hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-hero-card:hover .news-hero-bg {
    transform: scale(1.05); /* Hafif Zoom Efekti */
}

.news-hero-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    padding: 40px 30px;
    background: linear-gradient(to top, #0f0f12 10%, rgba(15, 15, 18, 0.8) 40%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.news-tag-hero {
    background: var(--ana-renk);
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    width: fit-content;
    box-shadow: 0 4px 10px rgba(233, 69, 96, 0.4);
}

.news-hero-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    margin: 0;
}

.news-hero-meta {
    color: #ccc;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 2. ALT MANŞETLER (GRID) */
.news-sub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* İkili yapı */
    gap: 20px;
}

.news-sub-card {
    position: relative;
    height: 250px;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    display: block;
    text-decoration: none;
}

.news-sub-bg {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s;
}
.news-sub-card:hover .news-sub-bg { transform: scale(1.05); }

.news-sub-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%;
    padding: 20px;
    background: linear-gradient(to top, #0f0f12, transparent);
}

.news-sub-title {
    font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 5px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 3. YATAY LİSTE (SON EKLENENLER) */
.news-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-list-card {
    display: flex;
    background: #1e1e36;
    border-radius: 15px;
    overflow: hidden;
    height: 120px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: 0.3s;
    text-decoration: none;
}

.news-list-card:hover {
    transform: translateX(5px);
    border-color: rgba(255,255,255,0.1);
    background: #252540;
}

.news-list-img {
    width: 140px;
    height: 100%;
    object-fit: cover;
}

.news-list-body {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-list-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.news-list-meta {
    font-size: 0.8rem;
    color: var(--silik-yazi);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* MOBİL UYUM */
@media (max-width: 768px) {
    .news-hero-card { height: 300px; }
    .news-hero-title { font-size: 1.4rem; }
    .news-sub-grid { grid-template-columns: 1fr; } /* Tek sütuna düş */
    .news-list-card { height: auto; } /* Esnek yükseklik */
    .news-list-img { width: 100px; height: 100px; border-radius: 10px; margin: 10px; }
}

/* --- v41.0 HABER EKLEME VE DETAY TASARIMI --- */

/* Haber Ekleme Formu */
.news-editor-wrapper {
    background: #1e1e36;
    padding: 25px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.editor-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}
.editor-header h3 { color: #fff; margin: 0; font-size: 1.3rem; }
.btn-back { color: #aaa; text-decoration: none; font-size: 0.9rem; }

.news-upload-area {
    width: 100%; height: 200px;
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: 15px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; margin-bottom: 20px;
    background: rgba(0,0,0,0.2);
    overflow: hidden; position: relative;
    transition: 0.3s;
}
.news-upload-area:hover { border-color: var(--ana-renk); background: rgba(233, 69, 96, 0.05); }

#uploadPlaceholder { text-align: center; color: #aaa; }
#uploadPlaceholder i { font-size: 2.5rem; margin-bottom: 10px; color: var(--ana-renk); }
#newsPreview { width: 100%; height: 100%; object-fit: cover; }

.news-input {
    width: 100%; background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1);
    color: #fff; padding: 15px; border-radius: 10px; outline: none; margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
}
.news-input:focus { border-color: var(--ana-renk); }

.title-input { font-size: 1.2rem; font-weight: bold; }
.content-input { min-height: 300px; line-height: 1.6; resize: vertical; }

.btn-publish {
    width: 100%; padding: 15px; background: var(--ana-renk); color: #fff;
    border: none; border-radius: 10px; font-size: 1.1rem; font-weight: bold; cursor: pointer;
}

/* Haber Detay Sayfası */
.news-article {
    background: #1e1e36; padding: 30px; border-radius: 20px; margin-bottom: 20px;
}
.article-title {
    font-size: 2.2rem; color: #fff; line-height: 1.2; margin-bottom: 20px;
}
.article-meta {
    display: flex; align-items: center; gap: 20px; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.meta-author { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; }
.meta-author img { width: 40px; height: 40px; border-radius: 50%; }
.meta-date { color: var(--silik-yazi); font-size: 0.9rem; }

.article-image {
    width: 100%; max-height: 500px; object-fit: cover; border-radius: 15px; margin-bottom: 30px;
}
.article-body {
    font-size: 1.1rem; line-height: 1.8; color: #ddd;
}

/* Mobilde Font Ayarı */
@media (max-width: 768px) {
    .article-title { font-size: 1.6rem; }
    .news-editor-wrapper { padding: 15px; }
    .article-body { font-size: 1rem; }
}

/* --- v42.0 HABER DETAY GÖRSEL FIX --- */

.news-detail-img {
    width: 100%;            /* Genişlik kabı doldursun */
    height: auto;           /* Yükseklik orantılı olsun */
    max-height: 500px;      /* AMA 500px'i asla geçmesin */
    
    object-fit: contain;    /* Resmi kesmeden kutuya sığdır */
    /* Alternatif: object-fit: cover; (Resmi keserek kutuyu doldurur - tercihine göre değişebilir) */
    
    background-color: #0f0f12; /* Boşluk kalırsa koyu zemin görünsün (Letterbox) */
    border-radius: 15px;
    margin-bottom: 25px;
    display: block;         /* Alt boşluk sorunlarını önler */
    margin-left: auto;      /* Ortala */
    margin-right: auto;     /* Ortala */
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); /* Hafif gölge */
}

/* Mobilde yükseklik sınırını biraz daha düşürelim */
@media (max-width: 768px) {
    .news-detail-img {
        max-height: 350px; /* Mobilde çok yer kaplamasın */
    }
}

/* --- v45.0 HABER TEASER VE MODAL GELİŞTİRMESİ --- */

/* 1. Ana Sayfa Haber Teaser (Blurlu Kart) */
.news-teaser-wrapper {
    position: relative;
    width: 100%;
    height: 250px; /* Sabit yükseklik, çok yer kaplamasın */
    border-radius: 15px;
    overflow: hidden;
    margin-top: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}

.news-teaser-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(5px) brightness(0.6); /* Bulanıklaştır ve karart */
    transition: filter 0.3s;
}

.news-teaser-wrapper:hover .news-teaser-bg {
    filter: blur(3px) brightness(0.7); /* Hoverda biraz netleşsin */
}

.news-teaser-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding: 20px;
    text-align: center;
}

.btn-read-news {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-read-news:hover {
    background: var(--ana-renk);
    border-color: var(--ana-renk);
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(233, 69, 96, 0.4);
}

.news-teaser-title {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 2. Modal Haber Başlık Alanı */
#haberBaslikAlani {
    display: none; /* Varsayılan gizli */
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease;
}

.modal-title-input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 12px 15px;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
    outline: none;
}

.modal-title-input:focus {
    border-color: var(--ana-renk);
    background: rgba(0,0,0,0.2);
}

/* --- v46.0 MODAL HABER RESİM ALANI --- */
.news-upload-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px;
    border: 2px dashed rgba(255,255,255,0.2);
    border-radius: 10px;
    background: rgba(0,0,0,0.2);
    color: #aaa;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    margin-bottom: 15px;
}

.news-upload-box:hover {
    border-color: var(--ana-renk);
    color: #fff;
    background: rgba(233, 69, 96, 0.1);
}

.news-upload-box i {
    font-size: 1.2rem;
    color: var(--ana-renk);
}

/* --- v50.0 PAZAR YERİ (MARKETPLACE) TASARIMI --- */

/* 1. Filtre Alanı (Yatay Kaydırma) */
.market-filters {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 15px;
    margin-bottom: 20px;
    scrollbar-width: none; /* Firefox gizle */
}
.market-filters::-webkit-scrollbar { display: none; } /* Chrome gizle */

.filter-chip {
    background: rgba(255,255,255,0.05);
    color: var(--silik-yazi);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: 0.3s;
}

.filter-chip.active, .filter-chip:hover {
    background: var(--ana-renk);
    color: #fff;
    border-color: var(--ana-renk);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.4);
}

/* 2. Ürün Izgarası (Grid) */
.market-grid {
    display: grid;
    /* Mobilde 2'li, Masaüstünde otomatik sığdır (min 160px) */
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.market-card {
    background: #1e1e36;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.market-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.2);
}

/* Resim Alanı */
.market-img-wrapper {
    width: 100%;
    padding-top: 100%; /* 1:1 Kare Oran (Instagram Style) */
    position: relative;
    background: #000;
}

.market-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
}

/* Fiyat Etiketi (Resmin Üzerinde) */
.market-price-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    color: #fff;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.2);
}

/* İçerik */
.market-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.market-title {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.market-meta {
    font-size: 0.75rem;
    color: var(--silik-yazi);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 3. Detay Sayfası Tasarımı */
.product-detail-container {
    background: #1e1e36;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.product-hero-img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    background: #0f0f12;
}

.product-info-box {
    padding: 25px;
}

.product-price-lg {
    font-size: 2rem;
    color: var(--ana-renk);
    font-weight: 800;
    margin-bottom: 10px;
}

.product-title-lg {
    font-size: 1.5rem;
    color: #fff;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.seller-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 15px;
    margin-top: 20px;
}

.seller-info { display: flex; align-items: center; gap: 15px; }
.seller-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }

/* Mobilde ızgara ayarı */
@media (max-width: 400px) {
    .market-grid {
        grid-template-columns: 1fr 1fr; /* Çok küçük ekranlarda bile yan yana */
    }
    .market-price-badge { font-size: 0.8rem; padding: 2px 8px; }
}

/* --- v51.0 PAZAR İLAN SAYFASI STİLİ --- */

/* Resim Yükleme Alanı */
.market-upload-area {
    width: 100%;
    height: 250px;
    background: rgba(0,0,0,0.3);
    border: 2px dashed rgba(255,255,255,0.2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
    transition: 0.3s;
}

.market-upload-area:hover { border-color: var(--ana-renk); background: rgba(233, 69, 96, 0.05); }
.market-upload-area i { font-size: 3rem; color: #555; margin-bottom: 10px; }
.market-upload-area p { color: #888; font-weight: 600; }
#productPreview { width: 100%; height: 100%; object-fit: contain; background: #000; }

/* Form Satırı (Yan Yana Inputlar) */
.form-row-split {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Ad geniş, Fiyat dar */
    gap: 15px;
}

/* Kategori Seçici (Chips) */
.category-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.cat-chip { position: relative; cursor: pointer; }
.cat-chip input { display: none; } /* Radyoyu gizle */
.cat-chip span {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px 20px;
    border-radius: 25px;
    color: #aaa;
    font-size: 0.9rem;
    transition: 0.3s;
}
.cat-chip input:checked + span {
    background: var(--ana-renk);
    color: #fff;
    border-color: var(--ana-renk);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.3);
}

/* Durum Seçici (Segmented Control) */
.condition-selector {
    display: flex;
    background: rgba(0,0,0,0.3);
    padding: 5px;
    border-radius: 10px;
    margin-bottom: 20px;
}
.cond-btn { flex: 1; text-align: center; cursor: pointer; position: relative; }
.cond-btn input { display: none; }
.cond-btn span {
    display: block; padding: 10px; border-radius: 8px; color: #aaa; font-size: 0.9rem; transition: 0.3s;
}
.cond-btn input:checked + span {
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-weight: bold;
}

/* İkonlu Input Düzeltmesi */
.input-with-icon { position: relative; }
.input-icon-right { 
    position: absolute; 
    right: 15px; 
    top: 50%; 
    transform: translateY(-50%); 
    color: var(--ana-renk); 
}

/* Mobil Uyum */
@media (max-width: 768px) {
    .form-row-split { grid-template-columns: 1fr; gap: 0; } /* Mobilde alt alta */
}

/* --- v55.0 ANA SAYFA PAZAR KARTI TASARIMI --- */

.market-feed-wrapper {
    background: #1a1a2e;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.market-feed-image-area {
    position: relative;
    width: 100%;
    height: 300px; /* Sabit, etkileyici yükseklik */
    background: #000;
}

.market-feed-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Resmi kesme, sığdır */
    backdrop-filter: blur(10px); /* Arka plan efekti */
}

/* Fiyat Etiketi (Sağ Üst) */
.market-feed-price {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #2ecc71; /* Satış Yeşili */
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 8px 15px;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
    z-index: 2;
}

/* Durum Etiketi (Sol Üst) */
.market-feed-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    color: #fff;
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 8px;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.2);
    z-index: 2;
}

/* Alt Bilgi Alanı */
.market-feed-info {
    padding: 15px;
    background: linear-gradient(to bottom, #1e1e36, #161625);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.market-feed-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.market-feed-meta {
    font-size: 0.85rem;
    color: var(--silik-yazi);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-go-product {
    background: transparent;
    border: 1px solid var(--ana-renk);
    color: var(--ana-renk);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-go-product:hover {
    background: var(--ana-renk);
    color: #fff;
}

@media (max-width: 768px) {
    .market-feed-image-area { height: 250px; }
}

/* --- v50.0 CENAZE İLANLARI TASARIMI --- */

/* 1. Hero Alanı (Üst Kısım) */
.funeral-hero {
    background: linear-gradient(to right, #2c3e50, #000000);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.funeral-hero::before {
    content: 'df62'; /* FontAwesome Kabe/Cami ikonu unicode */
    font-family: "Font Awesome 6 Free"; 
    font-weight: 900;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10rem;
    color: rgba(255,255,255,0.03);
    pointer-events: none;
}

.funeral-verse {
    font-family: 'Georgia', serif;
    font-style: italic;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 10px;
}

.funeral-sub-text {
    color: #aaa;
    font-size: 0.9rem;
}

/* 2. İlan Kartı */
.funeral-card {
    background: #1e1e24;
    border-radius: 15px;
    overflow: hidden;
    border-left: 4px solid #95a5a6; /* Gri Matem Çizgisi */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    margin-bottom: 20px;
}

.funeral-card:hover {
    transform: translateY(-5px);
    border-left-color: #fff;
}

.funeral-img-area {
    width: 100%;
    height: 200px;
    position: relative;
}

.funeral-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(80%); /* Siyah beyaza yakın */
}

.funeral-badge {
    position: absolute;
    top: 10px; right: 10px;
    background: #000;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
}

.funeral-body {
    padding: 20px;
}

.deceased-name {
    font-size: 1.3rem;
    color: #fff;
    font-weight: 700;
    margin-bottom: 10px;
}

.funeral-details {
    color: #bbb;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.funeral-meta {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 15px;
    color: #777;
    font-size: 0.8rem;
}

/* 3. Detay Sayfası */
.funeral-detail-wrapper {
    background: #1e1e24;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255,255,255,0.05);
}

.funeral-frame {
    border: 2px solid #333;
    padding: 5px;
    border-radius: 15px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow: hidden;
}

.funeral-action-btn {
    background: #34495e;
    color: #fff;
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.funeral-action-btn:hover { background: #2c3e50; }

/* --- v55.0 CENAZE İLAN FORMU STİLİ --- */

.funeral-editor-wrapper {
    background: #1e1e24; /* Daha koyu gri */
    padding: 25px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    border-top: 4px solid #95a5a6; /* Üstte gri çizgi */
}

.funeral-notice-box {
    background: rgba(149, 165, 166, 0.1);
    border-left: 3px solid #95a5a6;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: flex;
    align-items: start;
    gap: 10px;
    color: #ccc;
    font-size: 0.9rem;
}

.funeral-upload-area {
    width: 150px; /* Daha küçük, vesikalık formunda */
    height: 180px;
    background: rgba(0,0,0,0.3);
    border: 2px dashed rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    margin: 0 auto 20px auto; /* Ortala */
    text-align: center;
}

.funeral-upload-area i { font-size: 2rem; color: #777; margin-bottom: 10px; }
.funeral-upload-area p { font-size: 0.8rem; color: #777; }
#funeralPreview { width: 100%; height: 100%; object-fit: cover; }

.btn-publish-funeral {
    width: 100%; padding: 15px; 
    background: #34495e; /* Ağırbaşlı bir renk */
    color: #fff;
    border: none; border-radius: 10px; font-size: 1.1rem; font-weight: bold; cursor: pointer;
    transition: 0.3s;
}

.btn-publish-funeral:hover { background: #2c3e50; }



/* --- v65.0 FİNAL MODAL DÜZENİ (MOBİL FIX) --- */

.modal-box {
    /* Masaüstü ve Mobil Ortak */
    background: var(--kart-arkaplan);
    width: 95%;
    max-width: 500px;
    border-radius: 15px;
    display: flex;
    flex-direction: column; /* Alt alta dizilim */
    max-height: 90dvh; /* Ekranın %90'ını geçmesin */
    position: relative;
    overflow: hidden; /* Dışa taşmayı engelle */
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

/* Modal Başlık (Sabit) */
.modal-header {
    flex: 0 0 auto; /* Büzüşmesin */
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(30,30,40,0.95);
    z-index: 10;
}

/* Form Yapısı */
#postForm {
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Form taşmasın */
    height: 100%;
}

/* Kaydırılabilir Orta Alan (Kritik Kısım) */
.modal-scroll-area {
    flex: 1; /* Kalan tüm boşluğu kapla */
    overflow-y: auto; /* Sadece burası kaysın */
    padding: 20px;
    
    /* Kaydırma çubuğu ayarları */
    scrollbar-width: thin;
    scrollbar-color: var(--ana-renk) transparent;
}

/* Gizli Alanların Görünümü */
#haberBaslikAlani, #pazarAlanlari, #cenazeAlanlari {
    background: rgba(255,255,255,0.03);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px dashed rgba(255,255,255,0.1);
    flex-shrink: 0; /* İçerik sıkışmasın */
}

/* Resim Önizleme */
.image-preview {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    background: #000;
    border-radius: 10px;
    margin-top: 10px;
    display: none; /* JS ile açılır */
    flex-shrink: 0;
}

/* Alt Butonlar (Sabit) */
.share-bottom {
    flex: 0 0 auto; /* Büzüşmesin */
    padding: 15px 20px;
    background: rgba(30,30,40,0.95);
    border-top: 1px solid rgba(255,255,255,0.05);
    z-index: 10;
    margin-top: 0 !important; /* Margin çakışmasını önle */
}

/* Mobil Özel Ayar */
@media (max-width: 768px) {
    .modal-box {
        width: 100%;
        height: 100dvh; /* Tam ekran */
        max-height: 100dvh;
        max-width: 100%;
        border-radius: 0; /* Köşeleri düzle */
    }
    
    .modal-header {
        padding-top: calc(15px + env(safe-area-inset-top)); /* Çentik payı */
    }
    
    .share-bottom {
        padding-bottom: calc(15px + env(safe-area-inset-bottom)); /* Alt çizgi payı */
    }
}
/* --- v70.0 MODERN MOBİL MENÜ (SUPER APP) --- */

/* 1. Alt Menü Sabit Bar */
.mobil-alt-menu {
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    height: 65px;
    background: rgba(26, 26, 46, 0.95); /* Koyu */
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    z-index: 10000;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}

.menu-item {
    color: #888;
    font-size: 1.4rem;
    text-decoration: none;
    position: relative;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 20%; /* 5 öğe için eşit dağılım */
}

.menu-item.active { color: var(--ana-renk); }

/* Ortadaki Özel Buton (Menü Açıcı) */
.center-menu-btn {
    width: 50px; height: 50px;
    background: linear-gradient(135deg, var(--ana-renk), #c0394d);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.5rem;
    box-shadow: 0 0 15px rgba(233, 69, 96, 0.5);
    transform: translateY(-20px); /* Yukarı taşır */
    border: 4px solid #1a1a2e; /* Arka planla kaynaşması için kenarlık */
    transition: 0.3s;
    cursor: pointer;
}

.center-menu-btn.open { transform: translateY(-20px) rotate(45deg); background: #333; }

/* 2. Alttan Açılan Panel (Overlay Menu) */
.mobile-menu-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    opacity: 0; visibility: hidden;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* İçeriği alta it */
}

.mobile-menu-overlay.active { opacity: 1; visibility: visible; }

/* Panel İçeriği */
.mobile-menu-content {
    background: #1e1e36;
    border-radius: 25px 25px 0 0;
    padding: 30px 20px 80px 20px; /* Alt menü payı */
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.mobile-menu-overlay.active .mobile-menu-content { transform: translateY(0); }

/* Grid Yapısı */
.mobile-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 Sütun */
    gap: 15px;
    margin-bottom: 20px;
}

.mm-item {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-decoration: none; color: #fff;
    gap: 8px;
}

.mm-icon-box {
    width: 55px; height: 55px;
    background: rgba(255,255,255,0.05);
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    transition: 0.2s;
    border: 1px solid rgba(255,255,255,0.05);
}

.mm-item:active .mm-icon-box { transform: scale(0.95); background: rgba(255,255,255,0.1); }
.mm-text { font-size: 0.75rem; color: #aaa; text-align: center; }

/* Büyük Ekle Butonu (Panel İçinde) */
.mm-add-btn {
    width: 100%;
    background: var(--ana-renk);
    color: #fff;
    padding: 15px;
    border-radius: 15px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.3);
    cursor: pointer;
}

/* Çıkış Yap Butonu */
.mm-logout-btn {
    width: 100%;
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    padding: 12px;
    border-radius: 12px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    display: block;
    border: 1px solid rgba(231, 76, 60, 0.3);
}
/* --- v71.0 MOBİL ALT MENÜ YAZILI TASARIM --- */

.menu-item {
    gap: 3px; /* İkon ve yazı arası boşluk */
    padding-top: 5px;
}

.menu-item i {
    font-size: 1.3rem; /* İkonu bir tık küçültelim ki yazıya yer kalsın */
    margin-bottom: 0;
}

.menu-item span {
    font-size: 0.65rem; /* Çok küçük ve kibar font */
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: capitalize; /* Baş harfi büyük */
}

/* Aktif olduğunda hem ikon hem yazı renk değiştirsin */
.menu-item.active i,
.menu-item.active span {
    color: var(--ana-renk);
    text-shadow: 0 0 10px rgba(233, 69, 96, 0.4);
}

/* Orta butonun altındaki boşluğu dengelemek için */
.mobil-alt-menu {
    align-items: flex-end; /* İçeriği alta hizala */
    padding-bottom: calc(5px + env(safe-area-inset-bottom)); /* Alt boşluk */
}

.center-menu-btn {
    margin-bottom: 10px; /* Butonu biraz yukarı it */
}