/* 🌙 Genel Ayarlar */
body {
    background: #1e1e2f;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
}

/* 🎴 Kartlar */
.card {
    background: #2b2b3c;
    border: none;
    border-radius: 10px;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    padding: 15px;
}

.card-body { color: #ddd; }

.btn { border-radius: 20px; }

/* 💬 Mesaj Kutusu ve Mesajlar */
#chat-box {
    background: #1a1a26;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 10px;
    height: 400px;
    overflow-y: auto;
}

.message-box {
    background: #2b2b3c;
    border-radius: 10px;
    padding: 10px;
}

.message {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 15px;
    margin-bottom: 5px;
    color: #fff;
    word-wrap: break-word;
}

.message.me {
    background: #275a28;
    margin-left: auto;
}

.message.friend {
    background: #3a3a4f;
    margin-right: auto;
}

.message-time {
    font-size: 0.75rem;
    color: #bbb;
    float: right;
    margin-left: 10px;
}

.date-separator {
    text-align: center;
    color: #999;
    margin: 10px 0;
    font-weight: 600;
}

/* 🌓 Tema Değiştirici */
.switch {
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 12000;
    display: inline-block;
}

.theme-switch { top: 20px; right: 20px; }

/* 🌞 Light Mode */
.light-mode {
    background: #f5f5f5 !important;
    color: #000 !important;
}
.light-mode .card { background: #fff !important; color: #000; }
.light-mode #chat-box { background: #e9e9e9 !important; color: #000; }
.light-mode .message.friend { background: #a09e9e !important; color: #000; }
.light-mode .message.me { background: #275a28 !important; color: #fff; }

/* 📌 Sidebar */
.sidebar {
    width: 250px;
    background: #2b2b3c;
    height: 100%;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    padding: 10px;
    transition: transform 0.3s ease-in-out;
    z-index: 1100;
    box-shadow: 2px 0 5px rgba(0,0,0,0.4);
}

.sidebar h4 { color: #fff; margin-bottom: 15px; }

.sidebar a {
    display: block;
    padding: 10px;
    color: #ddd;
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 5px;
    position: relative;
    transition: background 0.3s;
}

.sidebar a:hover {
    background: #3a3a4f;
    color: #fff;
}

.sidebar a .badge {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 0.75rem;
}

/* 👤 Kullanıcı Listesi */
.user-item {
    background: #1f1f2e;
    color: #ddd;
    border: 1px solid #2b2b3c;
    margin-bottom: 5px;
    border-radius: 5px;
    transition: background 0.2s;
}
.user-item:hover { background: #29293f; }

.light-mode .user-item { background: #f8f9fa; color: #474646; border: 1px solid #ccc; }
.light-mode .user-item:hover { background: #e9ecef; }

/* 🖥️ Chat Container */
.chat-container {
    margin-left: 270px;
    display: flex;
    justify-content: center;   /* Yatay ortalama */
    align-items: center;       /* Dikey ortalama (istenirse) */
    min-height: 100vh;         /* Ortalamak için gerekli */
    padding: 20px;
}
.card.chat-card {
    width: 100%;
    max-width: 600px;
    margin: auto;
}

/* 📱 Mobil Görünüm */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
    .chat-container { margin-left: 0; padding: 10px; }
    .card { border-radius: 0; }
}

/* 🌑 Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}
.overlay.active { display: block; }

/* 🌞 Light Mode Sidebar */
.light-mode .sidebar { background: #fff; }
.light-mode .sidebar a { color: #000; }
.light-mode .sidebar a:hover { background: #ddd; }
.light-mode .sidebar h4 { color: #000; }


/* Light Mode'da home.php container ve listeler */
.light-mode .card {
    background: #fff !important;
    color: #000 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.light-mode .list-group-item {
    background: #f8f9fa !important;
    color: #000 !important;
    border: 1px solid #ddd !important;
}

.light-mode .btn {
    color: #000;
}
.light-mode .card-body {
    color: #000;
}

/* Light Mode'da container alanı */
.light-mode .chat-container {
    background: #f1f1f1 !important;
}
