body {
  font-family: system-ui, sans-serif;
  background: #1b1a1a;
  margin: 0;
  padding: 20px;
}
h1 { color: #ffffff; }
#message {
  width: 100%;    /* поле сообщения остаётся широким */
  height: 40px;   /* можно задать высоту */
}
form { display: flex; gap: -1px; }
input { flex: 1; padding: -20px; }
button { padding: 8px 12px; }

.small-input {
  width: 100px;   /* фиксированная ширина */
  display: inline-block;
}

.button {
  position: relative;
  background: none;
  border: none;
  color: rgb(255, 255, 255);
  font-size: 16px;
  cursor: pointer;
  padding: 5px 10px;
}



/* линия под кнопкой */
.button::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;                  /* изначально скрыта */
  background-color: rgb(97, 97, 97);
  transition: width 0.3s ease; /* плавное увеличение ширины */
}



/* при наведении линия выдвигается */
.button:hover::after {
  width: 100%;               /* линия растягивается на всю ширину */
}
.rules {
    color: white;
}
.h2 {
    color: white;
}

form {
  background-color: #1e1e1e;
  padding: 20px;
  border-radius: 8px;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

legend {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #ffffff;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #cccccc;
}

input[type="text"],
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #444;
  border-radius: 6px;
  background-color: #2a2a2a;
  color: #e0e0e0;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
  border-color: #4a90e2;
  box-shadow: 0 0 5px rgba(74,144,226,0.4);
  outline: none;
  background-color: #333;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

button {
  background-color: #787878;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  margin-top: 10px;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #3d3d3d;
}

body {
  background-color: #121212;
  color: #e0e0e0;
  font-family: sans-serif;
}

.post {
  background-color: #1e1e1e;
  border-left: 4px solid #4caf50;
  padding: 8px 12px;
  margin: 10px 0;
  border-radius: 6px;
  box-shadow: 0 0 4px rgba(0,0,0,0.5);
}

.post b {
  color: #81c784; /* имя пользователя */
}

.post small {
  color: #999;
  font-size: 0.8em;
  display: block;
  margin-top: 4px;
}

.my-message {
  background-color: #263238;
  border-left-color: #03a9f4;
}

.avatar {
  width: 16px;   /* ширина */
  height: 16px;  /* высота */
  border-radius: 50%; /* круглые аватары */
  object-fit: cover;  /* чтобы картинка не растягивалась */
  margin-right: 8px;  /* отступ справа от имени */
}
