/* Ana Renkler ve Gövde */
body { 
    background: #0d1117; 
    color: white; 
    font-family: sans-serif; 
    margin: 0; 
    height: 100vh; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    -webkit-user-select: none; 
    user-select: none; 
}

/* Login Ekranı */
#login { 
    position: fixed; 
    inset: 0; 
    background: #0d1117; 
    z-index: 1000; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
.login-card { 
    background: #161b22; 
    padding: 40px; 
    border-radius: 16px; 
    border: 1px solid #30363d; 
    width: 85%; 
    max-width: 350px; 
    text-align: center; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.7); 
}
#login h2 { color: #58a6ff; margin-bottom: 20px; letter-spacing: 2px; }
#login input { 
    width: 100%; 
    padding: 12px; 
    margin-bottom: 15px; 
    border-radius: 8px; 
    border: 1px solid #30363d; 
    background: #0d1117; 
    color: white; 
    box-sizing: border-box; 
    outline: none; 
}
#login button { 
    width: 100%; 
    padding: 12px; 
    border-radius: 8px; 
    border: none; 
    background: #238636; 
    color: white; 
    font-weight: bold; 
    cursor: pointer; 
    transition: 0.3s; 
}
#login button:hover { background: #2ea043; }

/* Uygulama Arayüzü */
#app { flex-direction: column; height: 100vh; width: 100%; }
header { 
    background: #161b22; 
    padding: 15px; 
    border-bottom: 1px solid #30363d; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

/* Chat Alanı ve Kaydırma Ayarı */
#chat { 
    flex: 1; 
    overflow-y: auto; 
    padding: 20px; 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    padding-bottom: 350px !important; /* Klavye ve input alanı için pay */
}

/* Mesaj Balonları */
.m { 
    padding: 12px; 
    border-radius: 15px; 
    max-width: 80%; 
    border: 1px solid #30363d; 
    background: #161b22; 
    position: relative; 
    word-wrap: break-word; 
}
.own { align-self: flex-end; border-color: #58a6ff; background: #21262d; }
.other { align-self: flex-start; border-color: #f8bbd0; }
.sender { font-size: 0.7em; color: #8b949e; margin-bottom: 4px; display: block; font-weight: bold; }
.tr-text { 
    display: block; 
    font-size: 0.85em; 
    color: #8b949e; 
    font-style: italic; 
    margin-top: 6px; 
    border-top: 1px solid #30363d; 
    padding-top: 6px; 
}

/* 🚀 Yeni: Medya Hayalet Kutusu (Download Placeholder) */
.media-placeholder {
    width: 200px;
    height: 120px;
    background: rgba(88, 166, 255, 0.05); /* Şeffaf mavi ton */
    border: 2px dashed #30363d;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-top: 8px;
    transition: 0.3s;
}
.media-placeholder:hover {
    background: rgba(88, 166, 255, 0.1);
    border-color: #58a6ff;
}
.download-arrow { font-size: 28px; }
.loading-spinner { 
    font-size: 20px; 
    animation: spin 1s linear infinite; 
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Gerçek Medya Yüklendiğinde */
.chat-media.loaded { 
    max-width: 100%; 
    max-height: 300px;
    border-radius: 10px; 
    margin-top: 8px; 
    display: block;
    cursor: pointer;
}

/* Silme Butonu */
.del-btn { 
    position: absolute; 
    top: -8px; 
    right: -8px; 
    background: #0d1117; 
    border: 1px solid #f85149; 
    border-radius: 50%; 
    color: #f85149; 
    cursor: pointer; 
    width: 22px; 
    height: 22px; 
    display: none; 
    align-items: center; 
    justify-content: center; 
    font-size: 10px; 
}
.own:hover .del-btn { display: flex; }

/* Alt Bar (Mesaj Gönderme Alanı) */
footer { 
    padding: 15px; 
    background: #161b22; 
    border-top: 1px solid #30363d; 
    display: flex; 
    gap: 10px; 
    position: fixed; 
    bottom: 0; 
    width: 100%; 
    box-sizing: border-box; 
}
#msg { 
    flex: 1; 
    padding: 12px; 
    border-radius: 8px; 
    border: 1px solid #30363d; 
    background: #0d1117; 
    color: white; 
    outline: none; 
}
#send { 
    background: #238636; 
    color: white; 
    border: none; 
    padding: 10px 20px; 
    border-radius: 8px; 
    font-weight: bold; 
    cursor: pointer; 
}
.attach-btn { 
    background: #30363d; 
    color: #8b949e; 
    border: none; 
    padding: 10px 15px; 
    border-radius: 8px; 
    cursor: pointer; 
}

/* Durum Noktaları */
.status { font-size: 0.8em; display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #444; }
.online { background: #238636; box-shadow: 0 0 8px #238636; }
