body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  background: #eef1f5;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

header {
  background: linear-gradient(135deg, #0077b6, #00b4d8);
  color: white;
  padding: 15px 20px;
  font-size: 1.6em;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

header i.fas {
  margin-right: 10px;
}

#edit-name-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  font-size: 1em;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: background 0.3s;
}

#edit-name-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

#loading-old {
  display: none;
  text-align: center;
  margin: 10px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 4px solid #ccc;
  border-top: 4px solid #0077b6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#chat-box {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: white;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
}

.message {
  margin-bottom: 15px;
  padding: 12px 18px;
  background: #f0faff;
  border-radius: 12px;
  max-width: 70%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.message strong {
  color: #0077b6;
  font-weight: 600;
}

.timestamp {
  font-size: 0.75em;
  color: #888;
  text-align: right;
  margin-top: 5px;
}

#input-area {
  display: flex;
  padding: 15px;
  background: #f8f9fa;
  border-top: 1px solid #ccc;
  gap: 10px;
}

#message {
  flex: 1;
  padding: 12px 16px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 25px;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
  height: 40px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

#message::placeholder {
  color: #888;
  text-align: left;
  line-height: 1.5;
  flex: 1;
}

#message:focus {
  border-color: #0077b6;
}

button {
  padding: 10px 20px;
  background: #0077b6;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

button:hover {
  background: #005f8e;
}

#name-container {
  padding: 15px;
  text-align: center;
  background: #fffce0;
  display: none;
}

#name-input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 20px;
  width: 200px;
}

.verified-check {
  display: inline-block;
  margin-left: 1px;
  color: #0077b6;
  font-size: 13px;
  vertical-align: middle;
}

.verified-check i {
  color: #0077b6;
  font-size: 13px;
}

#name-container {
  display: none;
  background: white;
  padding: 30px;
  margin: 20px auto;
  max-width: 400px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
}

#name-container h2 {
  font-size: 1.2em;
  margin-bottom: 15px;
  color: #0077b6;
}

#name-input {
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 25px;
  width: 80%;
  max-width: 300px;
  outline: none;
  font-size: 1em;
  margin-bottom: 15px;
  transition: border 0.3s;
}

#name-input:focus {
  border-color: #0077b6;
}

#name-container button {
  padding: 10px 20px;
  background: #0077b6;
  color: white;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

#name-container button:hover {
  background: #005f8e;
}

#input-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

#input-area input[type="text"] {
  flex: 1;
}

#uploadBtn {
  background: #0077b6;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
}

#uploadBtn i.fas {
  font-size: 18px;
}

#uploadBtn:hover {
  background: #005f8e;
}

#uploadBtn i.fas.fa-check {
  color: green;
}

#uploadBtn i.fas.fa-image {
  font-size: 18px;
}
