:root {
  --bg: #0f172a;
  --card: #111827;
  --me: #22c55e;
  --other: #1f2933;
  --text: #e5e7eb;
  --danger: #ef4444;
}

body.light {
  --bg: #f1f5f9;
  --card: #ffffff;
  --me: #dcf8c6;
  --other: #e5e7eb;
  --text: #111827;
}

* {
  box-sizing: border-box;
  font-family: system-ui, sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
}

/* HEADER */
header {
  padding: 12px;
  background: var(--card);
  display: flex;
  justify-content: space-between;
}

.header-actions button {
  margin-left: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
}

.panic {
  background: var(--danger);
  color: white;
}

/* CHAT */
#chat {
  padding: 12px;
  padding-bottom: 90px;
  overflow-y: auto;
  height: calc(100vh - 120px);
}

.msg {
  max-width: 70%;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 14px;
  /* ===== AUDIO MESSAGE ===== */

.audio-msg {
  padding: 8px 10px;
  max-width: 240px;
}

.audio-msg audio {
  width: 200px;
  height: 32px;
}


}

.me {
  background: var(--me);
  color: black;
  margin-left: auto;
}

.other {
  background: var(--other);
}

/* IMAGE */
.chat-img {
  max-width: 200px;
  max-height: 200px;
  object-fit: cover;
  border-radius: 10px;
}

/* AUDIO */
audio {
  width: 200px;
}

/* FOOTER */
footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: var(--card);
  padding: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}

footer input {
  flex: 1;
  padding: 10px;
  border-radius: 20px;
  border: none;
}

footer button {
  padding: 10px;
  border-radius: 50%;
  border: none;
  font-size: 18px;
}

/* 🎤 RECORDING STATE */
#micBtn.recording {
  background: var(--danger);
  color: white;
  transform: scale(1.2);
}

/* ===== LOGIN PAGE ===== */

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.login-wrapper {
  width: 100%;
  max-width: 320px;
  padding: 32px 22px;
  text-align: center;
}

.login-wrapper h1 {
  margin-bottom: 6px;
  font-size: 26px;
}

.login-sub {
  margin-bottom: 26px;
  font-size: 14px;
  opacity: 0.7;
}

.login-wrapper input {
  width: 100%;
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: none;
  outline: none;
  font-size: 15px;
}

.login-wrapper button {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: #22c55e;
  color: black;
  font-size: 15px;
  font-weight: 600;
}

/* ===== MIC BUTTON MOBILE FIX ===== */
#micBtn {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}






