* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
}
body { 
    background-color: #f4f4f5; 
    height: 100vh;
    width: 100vw; /* Tam genişlik */
    overflow: hidden; /* Dışarı taşan gereksiz kaydırma çubuklarını engeller */
    display: flex; 
    justify-content: center; 
    align-items: center; 
}
.box-screen { 
    background-color: white; 
    padding: 40px; 
    border-radius: 12px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.1); 
    text-align: center; 
    width: 100%; 
    max-width: 400px; 
}
.box-screen h2 { 
    margin-bottom: 20px; 
    color: #27272a; 
    font-weight: 700; 
    letter-spacing: -0.5px; 
}
.box-screen input { 
    width: 100%; 
    padding: 12px; 
    margin-bottom: 15px; 
    border: 1px solid #d4d4d8; 
    border-radius: 8px; 
    font-size: 14px; 
    outline: none; 
}
.box-screen button { 
    width: 100%; 
    padding: 12px; 
    border: none; 
    border-radius: 8px; 
    font-size: 14px; 
    font-weight: bold; 
    cursor: pointer; 
    transition: background 0.2s; 
}
.btn-primary { 
    background-color: #3b82f6; 
    color: white; 
    margin-bottom: 10px;
}
.btn-primary:hover { 
    background-color: #2563eb; 
}
.btn-secondary { 
    background-color: #e4e4e7; 
    color: #27272a; 
}
.btn-secondary:hover { 
    background-color: #d4d4d8; 
}
.msg-text { 
    font-size: 13px; 
    color: #ef4444; 
    min-height: 20px; 
    margin-top: 5px; 
}
.divider { 
    border: 0; 
    border-top: 1px solid #e4e4e7; 
    margin: 20px 0; 
}
.or-divider { 
    margin: 15px 0; 
    color: #a1a1aa; 
    font-size: 14px; 
    position: relative; 
}
.or-divider::before, .or-divider::after { 
    content: ""; 
    position: absolute; 
    top: 50%; 
    width: 40%; 
    height: 1px; 
    background-color: #e4e4e7; 
}
.or-divider::before { left: 0; }
.or-divider::after { right: 0; }

.tab-container { 
    display: flex; 
    margin-bottom: 20px; 
    border-bottom: 2px solid #e4e4e7; 
}
.tab-btn { 
    flex: 1; 
    padding: 10px; 
    background: none; 
    border: none; 
    font-weight: bold; 
    color: #a1a1aa; 
    cursor: pointer; 
    font-size: 16px; 
    border-bottom: 2px solid transparent; 
    margin-bottom: -2px; 
}
.tab-btn.active { 
    color: #3b82f6; 
    border-bottom: 2px solid #3b82f6; 
}
.form-section { display: none; }
.form-section.active { display: block; }

.logo-container { 
    display: flex; 
    justify-content: center; 
    margin-bottom: 10px; 
}
.spinner { 
    margin: 20px auto; 
    width: 40px; 
    height: 40px; 
    border: 4px solid #f3f3f3; 
    border-top: 4px solid #3b82f6; 
    border-radius: 50%; 
    animation: spin 1s linear infinite; 
}
@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}

#app-screen { 
    display: none; 
    width: 100vw;   /* Ekranın tüm genişliğini kapla */
    max-width: 100%; /* Sınırlandırmayı kaldır */
    height: 100vh;  /* Ekranın tüm yüksekliğini kapla */
    background-color: #ffffff; 
    border-radius: 0; /* Köşe yuvarlamalarını iptal et (Tam ekran için) */
    box-shadow: none; /* Kenar gölgelerine tam ekranda gerek yok */
    overflow: hidden; 
}
.sidebar { 
    width: 300px; 
    border-right: 1px solid #e4e4e7; 
    display: flex; 
    flex-direction: column; 
    background-color: #fafafa; 
}
.user-profile { 
    padding: 25px 20px; 
    border-bottom: 1px solid #e4e4e7; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 12px; 
}
.user-profile h3 { 
    font-size: 17px; 
    color: #27272a; 
    font-weight: 600; 
}
.profile-photo { 
    width: 80px; 
    height: 80px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 3px solid #ffffff; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); 
    background-color: #e4e4e7; 
}
.profile-menu { 
    display: flex; 
    gap: 15px; 
    margin-top: 5px; 
}
.profile-menu a { 
    text-decoration: none; 
    font-size: 13px; 
    color: #52525b; 
    font-weight: 500; 
    transition: color 0.2s; 
}
.profile-menu a:hover { color: #3b82f6; }
.profile-menu a.logout { color: #ef4444; }
.add-friend { 
    padding: 15px; 
    border-bottom: 1px solid #e4e4e7; 
}
.add-friend input { 
    width: 100%; 
    padding: 8px 12px; 
    border: 1px solid #d4d4d8; 
    border-radius: 6px; 
    outline: none; 
}
.add-friend-msg { 
    font-size: 12px; 
    margin-top: 8px; 
    text-align: center; 
    color: #ef4444; 
}
.friend-list { 
    list-style: none; 
    overflow-y: auto; 
    flex: 1; 
}
.friend-item { 
    padding: 15px 20px; 
    border-bottom: 1px solid #f4f4f5; 
    display: flex; 
    align-items: center; 
    cursor: pointer; 
    transition: background 0.2s; 
}
.friend-item:hover { background-color: #f0f0f5; }
.friend-item.active { background-color: #e4e4e7; }
.status-dot { 
    width: 10px; 
    height: 10px; 
    border-radius: 50%; 
    margin-right: 12px; 
    transition: background-color 0.3s;
}
.online { background-color: #22c55e; }
.offline { background-color: #d4d4d8; }
.chat-area { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    background-color: #ffffff; 
}
.chat-header { 
    padding: 20px; 
    border-bottom: 1px solid #e4e4e7; 
    display: flex; 
    align-items: center;
}
.chat-header h2 { 
    font-size: 18px; 
    color: #27272a; 
}

.message-history { 
    flex: 1; 
    padding: 20px; 
    overflow-y: auto; 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    scroll-behavior: smooth; 
}
.message { 
    max-width: 70%; 
    padding: 10px 15px; 
    border-radius: 18px; 
    font-size: 14px; 
    line-height: 1.4; 
    word-wrap: break-word; 
}
.message.received { 
    background-color: #f4f4f5; 
    color: #27272a; 
    align-self: flex-start; 
    border-bottom-left-radius: 4px; 
}
.message.sent { 
    background-color: #3b82f6; 
    color: #ffffff; 
    align-self: flex-end; 
    border-bottom-right-radius: 4px; 
}

.message img { 
    max-width: 100%; 
    max-height: 250px; 
    border-radius: 8px; 
    display: block; 
    margin-bottom: 5px; 
    cursor: pointer; 
}
.message .anonymity-caption { 
    margin-top: 5px; 
    display: block; 
    font-size: 14px; 
}
.message a.file-link { 
    color: inherit; 
    text-decoration: underline; 
    font-weight: 500; 
    display: inline-flex; 
    align-items: center; 
    gap: 5px; 
    margin-bottom: 5px; 
}

.chat-input { 
    padding: 15px 20px; 
    border-top: 1px solid #e4e4e7; 
    display: flex; 
    gap: 10px; 
    align-items: center; 
}
.chat-input input[type="text"] { 
    flex: 1; 
    padding: 10px 15px; 
    border: 1px solid #d4d4d8; 
    border-radius: 20px; 
    outline: none; 
}
.chat-input button { 
    background-color: #3b82f6; 
    color: white; 
    border: none; 
    padding: 0 20px; 
    border-radius: 20px; 
    cursor: pointer; 
    font-weight: bold; 
    transition: background 0.2s; 
    height: 38px; 
}
.chat-input button:hover { background-color: #2563eb; }

#attach-btn { 
    background-color: #e4e4e7; 
    color: #27272a; 
    padding: 0 15px; 
    font-size: 18px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
#attach-btn:hover { background-color: #d4d4d8; }

#settings-screen { display: none; }
input[type="file"] { 
    padding: 8px; 
    background-color: #fafafa; 
    border: 1px dashed #d4d4d8; 
    cursor: pointer; 
}
#login-screen { display: none; }

.preview-modal { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.65); 
    justify-content: center; 
    align-items: center; 
    z-index: 10000; 
}
.preview-content { 
    background: white; 
    padding: 30px; 
    border-radius: 12px; 
    width: 100%; 
    max-width: 450px; 
    text-align: center; 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); 
}
.preview-content h3 { 
    font-size: 18px; 
    color: #27272a; 
}
.preview-media-slot { 
    max-width: 100%; 
    max-height: 220px; 
    min-height: 100px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden; 
    border-radius: 8px; 
    background-color: #f4f4f5; 
}
.preview-media-slot img { 
    max-width: 100%; 
    max-height: 220px; 
    object-fit: contain; 
}
.preview-media-slot .file-dummy { 
    font-weight: bold; 
    font-size: 15px; 
    color: #52525b; 
    padding: 20px; 
    word-break: break-all; 
}
.preview-caption-box { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid #d4d4d8; 
    border-radius: 8px; 
    font-size: 14px; 
    outline: none; 
}
.preview-btn-group { display: flex; gap: 10px; }
.preview-btn-group button { 
    flex: 1; 
    padding: 12px; 
    border-radius: 8px; 
    font-weight: bold; 
    border: none; 
    cursor: pointer; 
    font-size: 14px; 
}
/* ==========================================
   YENİ TAM EKRAN AYARLAR SAYFASI STİLLERİ
========================================== */
#settings-screen { 
    display: none; 
    width: 100vw; 
    height: 100vh; 
    background-color: #f4f4f5; 
}

.settings-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}

.settings-sidebar {
    width: 300px; /* Ayarlar menüsünün genişliği */
    background-color: #fafafa;
    border-right: 1px solid #e4e4e7;
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
}

.settings-header h2 {
    color: #27272a;
    margin-bottom: 30px;
    font-weight: 700;
    font-size: 24px;
}
.settings-tab-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1; /* Butonları yukarıda, Geri butonunu aşağıda tutmak için alanı doldurur */
}

.settings-tab-btn {
    padding: 15px 20px;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: #71717a;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.settings-tab-btn:hover {
    background-color: #e4e4e7;
    color: #27272a;
}

/* Aktif olan sekmenin tasarımı */
.settings-tab-btn.active {
    background-color: #3b82f6;
    color: white;
}

.settings-content {
    flex: 1; /* Sağ tarafın tamamını kaplar */
    background-color: #ffffff;
    padding: 60px;
    overflow-y: auto;
}

.settings-content h3 {
    font-size: 24px;
    color: #27272a;
    margin-bottom: 5px;
}
.message-time {
    display: block;
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 4px;
    text-align: right;
}
.message.sent .message-time { color: #dbeafe; } /* Kendi mesajlarımızda daha okunaklı renk */
/* Tarih Ayracı Tasarımı */
.date-divider {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin: 15px 0;
    padding: 5px;
    background-color: #f4f4f5;
    border-radius: 10px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
/* Mesaj Saati Tasarımı */
.message-time {
    display: inline-block; /* Yan yana olması için */
    font-size: 0.7rem;
    margin-left: 8px; /* Metinle arasına mesafe */
    opacity: 0.7;
    vertical-align: bottom; /* Alt kısma hizalı */
}
.date-divider {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    padding: 5px 12px;
    background-color: #f4f4f5;
    border-radius: 10px;
    width: fit-content;
    margin: 15px auto;

    /* Yapışkan davranış */
    position: sticky;
    top: 8px;
    z-index: 10;
    
    /* Scroll ederken arka planı belli olsun */
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.requests-section {
    border-bottom: 1px solid #e4e4e7;
    background-color: #fefce8;
}
.requests-header {
    padding: 10px 15px;
    font-size: 13px;
    font-weight: 600;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 6px;
}
.requests-badge {
    background-color: #ef4444;
    color: white;
    border-radius: 999px;
    font-size: 11px;
    padding: 1px 7px;
    font-weight: bold;
}
.request-item {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #fef08a;
    font-size: 13px;
    color: #27272a;
}
.request-item .req-btns {
    display: flex;
    gap: 6px;
}
.req-btn-accept {
    background-color: #22c55e;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
}
.req-btn-reject {
    background-color: #e4e4e7;
    color: #52525b;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
}
/* Sesli Arama Modal ve Buton Tasarımları */
#start-call-btn {
    background-color: #22c55e;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    margin-left: auto; /* Sağa yaslamak için */
    transition: background 0.2s;
}
#start-call-btn:hover { background-color: #16a34a; }

.call-btn-group { display: flex; gap: 10px; margin-top: 20px; justify-content: center; }
.call-btn-group button {
    padding: 12px 25px;
    border-radius: 50px; /* Yuvarlak butonlar */
    font-weight: bold;
    border: none;
    cursor: pointer;
    font-size: 15px;
}
#accept-call-btn { background-color: #22c55e; color: white; }
#reject-call-btn, #end-call-btn { background-color: #ef4444; color: white; }