body {
  margin: 0;
  height: 100vh;
  display: flex;
  background: #e5ddd5;
  font-family: "Segoe UI", Arial, sans-serif;
}

.app-container {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 150px; /* Lebar Sidebar Stream */
  min-width: 150px; 
  background: #111b21;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 15px;
  box-sizing: border-box;
}

.sidebar h2 {
  margin: 0 0 10px;
  color: #25d366;
}

.username {
  font-weight: bold;
  margin-bottom: 15px;
}

/* SEMBUNYIKAN ELEMEN KONTAK */
.add-contact, #contacts {
  display: none; 
}

/* Tombol logout */
#logout {
    margin-top: auto; 
    padding: 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}


/* Main Chat Section */
.chat-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #efeae2;
}

.chat-header {
  background: #075e54;
  color: white;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.delete-all {
  background: transparent;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 18px;
}

.chat-box {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background: #e5ddd5;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
}

.chat-input {
  display: flex;
  align-items: center;
  background: #f0f2f5;
  padding: 10px;
  border-top: 1px solid #ccc;
}

.chat-input input[type="text"] {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 20px;
  outline: none;
}

.chat-input button {
  margin-left: 8px;
  background: #25d366;
  border: none;
  color: white;
  padding: 10px 16px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
}

/* Message bubbles */
.message {
  max-width: 60%;
  padding: 8px 12px;
  border-radius: 8px;
  margin: 5px 0;
  position: relative;
  word-wrap: break-word;
}

.sent {
  align-self: flex-end;
  background-color: #dcf8c6;
  margin-right: 0;
}

.received {
  align-self: flex-start;
  background-color: #fff;
  margin-left: 0;
}

/* KELAS PENTING UNTUK MENAMPILKAN NAMA PENGGUNA */
.message-user {
  font-weight: bold;
  font-size: 12px;
  color: #888;
  display: block;
  margin-bottom: 2px;
}

.message-time {
  font-size: 10px;
  color: #777;
  display: block;
  text-align: right;
  margin-top: 5px;
}

.deleteMsg {
    position: absolute;
    top: 0;
    right: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.5;
}

.sent .deleteMsg {
    right: -20px;
}

.file-link {
  color: #007bff;
  text-decoration: none;
  font-weight: bold;
}