/* иконки справа */
.icons-right { display:flex; gap:8px; align-items:center; }
.icon-btn {
  width:36px;height:36px;border-radius:10px;border:none;background:rgba(255,255,255,0.02);
  display:flex;align-items:center;justify-content:center;color:#e8e8ff;cursor:pointer;
  box-shadow: 0 6px 14px rgba(2,6,23,0.35);
}

/* список чатов */
.chat-list {
  overflow:auto;
  padding-bottom:8px;
}
.chat-item {
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px;
  border-radius:12px;
  margin-bottom:8px;
  cursor:pointer;
  transition: background .12s ease, transform .08s ease;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
}
.chat-item:hover { background: rgba(124,58,237,0.06); transform: translateY(-2px); }
.chat-item .info { display:flex;flex-direction:column; }
.chat-item .name { font-weight:700; color: #f6f3ff; }
.chat-item .sub { font-size:13px; color: var(--muted); }

/* правая колонка (чат) */
.chat-main {
  flex:1;
  display:flex;
  flex-direction:column;
  gap:12px;
  min-width:300px;
}
.chat-header {
  display:flex; align-items:center; justify-content:center;
  padding:12px; border-radius:12px;
  background: linear-gradient(90deg, rgba(124,58,237,0.18), rgba(30,136,255,0.08));
  color: #f8f6ff; font-weight:700;
}

/* область сообщений */
.messages {
  flex:1;
  overflow:auto;
  padding:18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.00));
  border-radius:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

/* пузырьки сообщений */
.msg {
  max-width:72%;
  padding:10px 14px;
  border-radius:16px;
  color:white;
  font-size:15px;
  box-shadow: 0 8px 22px rgba(2,6,23,0.45);
  cursor:pointer;
  transition: transform .08s ease;
}

/* свои сообщения — фиолет */
.msg.me {
  align-self:flex-end;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-purple-2));
  box-shadow: 0 10px 30px rgba(124,58,237,0.28);
  border-bottom-right-radius:6px;
}

/* чужие — синий/стальная карточка */
.msg.peer {
  align-self:flex-start;
  background: linear-gradient(90deg, rgba(18,24,40,0.9), rgba(25,28,46,0.9));
  color: #e8eefc;
  border-bottom-left-radius:6px;
  border: 1px solid rgba(255,255,255,0.02);
}

/* при клике — лёгкий эффект */
.msg:active { transform: translateY(1px); }

/* меню действий у сообщения (плавающее) */
.msg-menu {
  position:fixed;
  display:flex;
  flex-direction:column;
  gap:6px;
  background: linear-gradient(180deg, rgba(20,16,26,0.95), rgba(24,20,30,0.95));
  padding:8px;
  border-radius:12px;
  box-shadow: 0 12px 40px rgba(12,8,20,0.6);
  z-index:1200;
  min-width:140px;
}
.msg-menu button {
  background:transparent;
  border:none;
  color:#e9e6ff;
  padding:8px 10px;
  text-align:left;
  cursor:pointer;
  border-radius:8px;
}
.msg-menu button:hover { background: rgba(124,58,237,0.14); }

/* поле ввода внизу (фиксированное в рамках карточки) */
.input-row {
  display:flex;
  gap:10px;
  align-items:center;
  background: linear-gradient(180deg, rgba(18,16,22,0.65), rgba(22,18,28,0.6));
  padding:12px;
  border-radius:12px;
}
.input-row input {
  flex:1;
  border-radius:999px;
  padding:12px 16px;
  background: rgba(255,255,255,0.02);
  border:1px solid rgba(255,255,255,0.03);
  color:#eef0ff;
}
.input-row button.send {
  background: linear-gradient(90deg, var(--accent-purple-2), var(--accent-blue));
  border:none;
  color:white;
  padding:10px 14px;
  border-radius:12px;
  cursor:pointer;
  box-shadow: 0 10px 30px rgba(124,58,237,0.2);
}

/* настройки / формы — ровно в столбик, красивые */
.settings-card {
  max-width:720px;
  margin: 18px auto;
  background: linear-gradient(180deg, rgba(20,16,26,0.65), rgba(24,20,30,0.6));
  padding:20px; border-radius:14px; box-shadow: var(--shadow);
}
.settings-card .row { margin-top:12px; }
.settings-card input { width:100%; }

/* адаптив */
@media (max-width:900px){
  .chat-container { flex-direction:column; padding:10px; }
  .sidebar { width:100%; max-width:none; min-width:0; order:2; }
  .chat-main { order:1; }
}
/* === GLOBAL === */
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: #0d0b14; /* глубокий тёмный */
    color: #ffffff;
}

h1, h2, h3 {
    color: #d8c8ff;
    text-align: center;
}

a {
    color: #9d4dfa;
    text-decoration: none;
}

.container-center {
    width: 100%;
    max-width: 360px;
    margin: 60px auto;
    padding: 20px;
    background: rgba(22, 19, 30, 0.7);
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
}

/* === INPUTS === */
input {
    width: 100%;
    padding: 14px;
    margin: 12px 0;
    border-radius: 12px;
    border: 2px solid #7c3aed;
    background: #16131e;
    color: white;
}

input:focus {
    outline: none;
    border-color: #9d4dfa;
    box-shadow: 0 0 8px #7c3aed;
}

/* === BUTTONS === */
.btn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: none;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.25s;
}

/* фиолетовая кнопка */
.btn-purple {
    background: #7c3aed;
    color: white;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.3);
}
.btn-purple:hover {
    background: #9d4dfa;
    box-shadow: 0 0 25px rgba(157, 77, 250, 0.45);
}

/* зелёная кнопка */
.btn-green {
    background: #22c55e;
    color: white;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
}
.btn-green:hover {
    background: #16a34a;
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.45);
}

/* === CHAT LAYOUT === */
.chat-container {
    display: flex;
    height: 100vh;
}

/* левая колонка чатов */
.chat-list {
    width: 35%;
    background: #16131e;
    border-right: 2px solid #7c3aed;
    padding: 10px;
    overflow-y: auto;
}

.chat-item {
    padding: 14px;
    margin: 8px 0;
    background: #1c1825;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.25s;
}
.chat-item:hover {
    background: #262033;
}

/* правая часть — чат */
.chat-window {
    width: 65%;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

/* === MESSAGES === */
.messages {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 15px;
}

.message {
    max-width: 75%;
    padding: 12px 16px;
    margin: 8px 0;
    background: #7c3aed;
    color: white;
    border-radius: 18px;
    align-self: flex-end;
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.4);
}

/* всплывающее меню над сообщением */
.message-menu {
    position: absolute;
    background: #1c1825;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.3);
    display: none;
}

.message-menu button {
    display: block;
    margin: 6px 0;
    width: 100%;
    padding: 8px;
    border-radius: 10px;
    background: #262033;
    border: none;
    color: #fff;
    cursor: pointer;
}
.message-menu button:hover {
    background: #7c3aed;
}

/* === MESSAGE INPUT === */
.input-box {
    display: flex;
    gap: 10px;
}

.input-box input {
    flex: 1;
    border-radius: 14px;
    border: 2px solid #7c3aed;
    padding: 14px;
}

.input-box button {
    padding: 12px 18px;
    border-radius: 14px;
    border: none;
    background: #9d4dfa;
    color: white;
    cursor: pointer;
    transition: .2s;
}
.input-box button:hover {
    background: #7c3aed;
}
