@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;600&display=swap');

body {
  margin: 0;
  font-family: 'Vazirmatn', sans-serif;
  background-color: #0e0e0e;
  color: #f2f2f2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
}

header { text-align: center; padding: 2rem 1rem 1rem; }
header h1 { color: #d4af37; font-size: 2rem; }

.content {
  max-width: 600px;
  background: #1a1a1a;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
  margin-bottom: 2rem;
  text-align: center;
}

.content p { line-height: 1.8; font-size: 1.1rem; }

.btn {
  display: inline-block;
  background-color: #d4af37;
  color: #000;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

.btn:hover { background-color: #b99329; }

.chat-box {
  width: 90%;
  max-width: 600px;
  background: #1a1a1a;
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.chat-messages {
  flex: 1;
  min-height: 200px;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.message {
  background: #2b2b2b;
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  margin: 4px 8px;
  text-align: right;
  max-width: 80%;
  word-wrap: break-word;
  position: relative;
}

.message.admin {
  align-self: flex-end;
  background: #d4af37 !important;
  color: #000;
}

.message.user {
  align-self: flex-start;
  background: #2b2b2b;
  color: #fff;
}

.message img { max-width: 150px; border-radius: 8px; display: block; margin-bottom: 0.5rem; }

.chat-input { display: flex; align-items: center; gap: 0.5rem; }
input[type="text"] {
  flex: 1;
  padding: 0.7rem;
  border-radius: 8px;
  border: none;
  outline: none;
  background-color: #2b2b2b;
  color: #fff;
}

button {
  background-color: #d4af37;
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

button:hover { background-color: #b99329; }

footer { margin-top: 2rem; padding: 1rem; font-size: 0.9rem; color: #888; }
footer a { text-decoration: none; }

.file-upload {
  display: inline-block;
  cursor: pointer;
  font-size: 1.2rem;
  color: #d4af37;
  padding: 0.5rem;
}

.file-upload input[type="file"] { display: none; }

.delete-btn {
  background: #ff4444;
  color: #fff;
  border: none;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .7rem;
  cursor: pointer;
  margin-left: 4px;
}
.delete-btn:hover { background: #cc0000; }

.user-item { position: relative; }
.delete-conversation-btn {
  display: none;
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: #ff4444;
  color: #fff;
  border: none;
  padding: 2px 8px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
}
.user-item:hover .delete-conversation-btn { display: block; }
.delete-conversation-btn:hover { background: #cc0000; }

.file-upload { display: flex; align-items: center; gap: 4px; }

/* استایل فوتر چت */
.chat-footer {
  text-align: center;
  margin-top: 1rem;
  padding: 0.8rem;
  font-size: 0.85rem;
  color: #aaa;
  line-height: 1.6;
}
.chat-footer img {
  width: 60px;
  height: auto;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 8px rgba(212,175,55,0.5));
}

@media (max-width: 480px) {
  header { padding: 1.5rem 0.5rem 0.5rem; }
  header h1 { font-size: 1.6rem; }
  .content { padding: 1.5rem; font-size: 1rem; }
  .chat-box { padding: 0.8rem; }
  .chat-messages { padding: 0.8rem; max-height: 250px; }
  input[type="text"] { padding: 0.6rem; }
  button { padding: 0.6rem 1rem; }
  .btn { padding: 0.7rem 1.2rem; }
  .message { padding: 0.5rem 0.8rem; }
  .message img { max-width: 120px; }
}

@media (max-width: 360px) {
  .chat-input { gap: 0.3rem; }
  footer { font-size: 0.8rem; }
}