  .login-card {
 width: 450px;
  padding: 10px;
  margin: 20px auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(250, 248, 248, 0.1);
  background: white;
  font-family: sans-serif;
}

 .login-card h2 { text-align: center; color: #333; }

.input-group { margin-bottom: 20px; }

.login-card input {
  width: 300px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-sizing: border-box; /* Чтобы padding не раздувал ширину */
}

.login-btn {
  width: 100%;
  padding: 12px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}
.login-btn:hover { background-color: #0056b3; }
.options { text-align: center; margin-top: 15px; }
.options a { color: #007bff; text-decoration: none; font-size: 14px; }

/*.container {
  display: grid;*/
  /* Колонки будут минимум 300px, а если места много — займут 1 часть (fr) */
 /* grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));*/
  /*gap: 20px;*/
/*}*/

/* На больших экранах возвращаем точную пропорцию 40/60 */
/*@media (min-width: 640px) {
 /* .container {
   /* grid-template-columns: 4fr 6fr;*/
 /* }*/
/*}*/
 
/* Стили для наглядности */
.item {
  padding: 20px;
  background: #f0f0f0;
  border: 1px solid #aaaaaa;
}
.account-container {
  display: grid;
  /* На мобильных — 1 колонка. На десктопе (от 768px) — 4fr и 6fr */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

/* Медиа-запрос для пропорции 40/60 на больших экранах */
@media (min-width: 768px) {
  .account-container {
    grid-template-columns: 4fr 6fr;
  }
}

/* Стили блоков */
.user-list {
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 8px;
}

.user-item {
  padding: 10px;
  margin-bottom: 5px;
  background: #fff;
  cursor: pointer;
  border-radius: 4px;
  transition: 0.3s;
}

.user-item:hover, .user-item.active {
  background: #007bff;
  color: white;
}

.message-area {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  height: 400px; /* Фиксированная высота для чата */
}

.chat-history {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
}

.message-form {
  display: grid;
  grid-template-columns: 1fr auto; /* Инпут на всю ширину, кнопка по размеру контента */
  gap: 10px;
  padding: 15px;
  border-top: 1px solid #eee;
}

input[type="text"] {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

button {
  padding: 10px 20px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.chat-history {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end; /* Ваши сообщения будут прижаты вправо */
}

.message-bubble {
    background: #007bff;
    color: white;
    padding: 8px 15px;
    border-radius: 15px 15px 0 15px; /* Скругление «облачком» */
    max-width: 80%;
    word-wrap: break-word; /* Чтобы длинные слова не вылезали за края */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.message-bubble {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Время будет справа под текстом */
    gap: 4px;
    background: #007bff;
    color: white;
    padding: 10px 15px;
    border-radius: 15px 15px 0 15px;
    max-width: 80%;
}

.message-bubble .time {
    font-size: 0.75rem;
    opacity: 0.7; /* Делаем время чуть бледнее текста */
    user-select: none; /* Чтобы время не выделялось при копировании текста */
}

.message-bubble .text {
    font-size: 1rem;
    line-height: 1.4;
}
.user-item {
  display: flex;
  align-items: center; /* Центрируем точку по вертикали относительно текста */
  gap: 10px;
  padding: 10px;
  cursor: pointer;
  border-radius: 4px;
}

/* Общий стиль точки */
.status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0; /* Чтобы точка не сжималась */
}

/* Цвет для "в сети" */
.status.online {
  background-color: #28a745;
  box-shadow: 0 0 5px #28a745; /* Легкое свечение */
}

/* Цвет для "не в сети" */
.status.offline {
  background-color: #ccc;
}
.chat-header {
    display: flex;
    justify-content: space-between; /* Имя слева, кнопка справа */
    align-items: center;
    padding: 10px 15px;
}

#clear-chat {
    background: #dc3545; /* Красный цвет */
    color: white;
    border: none;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
}

#clear-chat:hover {
    background: #c82333;
}
.user-link {
    text-decoration: none;
    color: inherit; /* Цвет текста будет как у родителя */
}
.user-link:hover .user-name {
    text-decoration: underline; /* Подчеркивание только при наведении */
}
/* Контейнер всей карточки */
.profile-card {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    transition: transform 0.3s ease;
}

.profile-card:hover {
    transform: translateY(-5px);
}

/* Блок с аватаром */
.avatar-block img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f0f2f5;
    margin-bottom: 15px;
}

/* Заголовок (Имя пользователя) */
.profile-card h1 {
    font-size: 24px;
    color: #333;
    margin: 10px 0;
}

/* Статус онлайн/оффлайн */
.status-info {
    font-size: 14px;
    margin-bottom: 20px;
}

.status-info span {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background: #f0f2f5;
}

/* Информация о пользователе */
.profile-info {
    text-align: left;
    margin: 20px 0;
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
}

.profile-info p {
    margin: 8px 0;
    color: #666;
    font-size: 15px;
}

/* Кнопка сообщения */
.actions .btn-message {
    display: inline-block;
    background: #007bff;
    color: #fff;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s;
}

.actions .btn-message:hover {
    background: #0056b3;
}

/* Кнопка назад */
.btn-back {
    display: inline-block;
    margin-top: 20px;
    color: #888;
    text-decoration: none;
    font-size: 14px;
}

.btn-back:hover {
    color: #333;
    text-decoration: underline;
}
/* Базовый стиль точки */
.status {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

/* Онлайн — зеленый с пульсацией */
.status.online {
    background-color: #2ecc71;
    box-shadow: 0 0 0 rgba(46, 204, 113, 0.4);
    animation: pulse-green 2s infinite;
}

/* Оффлайн — серый */
.status.offline {
    background-color: #95a5a6;
}

/* Анимация пульсации */
@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}
.main-badge {
    background-color: #ff4757; /* Яркий красный */
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    position: relative;
    top: -10px; /* Немного приподнимаем над текстом */
    left: -5px;
    box-shadow: 0 2px 5px rgba(255, 71, 87, 0.4);
}
