/* ======================
   BASE
   ====================== */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0f172a;
  color: #e5e7eb;
}

.hidden {
  display: none;
}

/* ======================
   LOGIN
   ====================== */
.login-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #1e293b, #020617);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: 92%;
  max-width: 360px;
  background: rgba(2, 6, 23, 0.9);
  border-radius: 20px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

.login-title {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
}

.login-card input {
  padding: 14px 16px;
  border-radius: 14px;
  border: none;
  background: #020617;
  color: #e5e7eb;
  font-size: 14px;
}

.login-card input::placeholder {
  color: #64748b;
}

.login-card button {
  margin-top: 6px;
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* LOGIN LOGO */
.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.login-logo img {
  width: 180px;
  max-width: 60%;
  height: auto;
  border-radius: 18px;
  box-shadow:
    0 10px 30px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.08);
}


/* ======================
   APP
   ====================== */
.app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* HEADER */
.header {
  height: 50px;
  background: #020617;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 10px;
}

.title {
  flex: 1;
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-btn,
.back-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #e5e7eb;
  cursor: pointer;
}

/* MAIN */
.main {
  flex: 1;
  display: flex;
  min-width: 0;
  overflow: hidden;
}

/* USERS */
.users {
  width: fit-content;
  min-width: 140px;
  max-width: 260px;
  background: #020617;
  overflow-y: auto;
  flex-shrink: 0;
  transition: width 0.25s ease;
}

.users.hidden {
  width: 0;
  min-width: 0;
  overflow: hidden;
}

.user {
  padding: 10px 12px;
  border-bottom: 1px solid #1e293b;
  cursor: pointer;
  white-space: nowrap;
}

/* CHAT */
.chat-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.msg {
  max-width: 75%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
}

.msg-in {
  background: #1e293b;
  align-self: flex-start;
}

.msg-out {
  background: #2563eb;
  align-self: flex-end;
}

.msg-time {
  font-size: 11px;
  opacity: 0.6;
  margin-top: 4px;
  text-align: right;
}

/* INPUT */
.input-bar {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: #020617;
}

.input-bar input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 999px;
  border: none;
  background: #020617;
  color: #e5e7eb;
}

.send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #2563eb;
  font-size: 20px;
  color: white;
}

/* FOOTER */
.footer {
  text-align: center;
  padding: 8px;
  background: #020617;
}

.footer-title {
  font-weight: 600;
}

.footer-quote {
  font-size: 11px;
  opacity: 0.6;
}

/* ======================
   MODAL (СТАТУС)
   ====================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.status-screen {
  width: 92%;
  max-width: 420px;
  background: rgba(2, 6, 23, 0.95);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

.status-screen h3 {
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
}

/* чекбокс */
.status-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

/* textarea */
.status-screen textarea {
  padding: 14px 16px;
  border-radius: 14px;
  border: none;
  background: #0f172a;
  color: #e5e7eb;
  font-size: 14px;
  resize: none;
}

.status-screen textarea::placeholder {
  color: #64748b;
}

/* КНОПКИ */
.status-screen button {
  padding: 14px;
  border-radius: 14px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* основная кнопка */
.status-screen button:first-of-type {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
}

/* вторичная кнопка */
.status-screen button:last-of-type {
  background: #020617;
  color: #cbd5f5;
}


/* LOGIN AUTHOR */
.login-author {
  text-align: center;
  font-size: 12px;
  margin-bottom: 14px;
  color: #94a3b8;
}

.login-author a {
  color: #64748b;          /* спокойный серо-тёмный */
  text-decoration: none;
  font-weight: 500;
}

.login-author a:hover {
  color: #94a3b8;          /* чуть светлее при наведении */
  text-decoration: underline;
}
