/* =========================
   🧱 BASE RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  background: #ffffff;
  color: #000;
}

/* =========================
   🧱 LAYOUT
========================= */
.container {
  display: flex;
  height: 100vh;
}

/* =========================
   🟢 SIDEBAR
========================= */
.sidebar {
  width: 220px;
  border-right: 1px solid black;
  padding: 15px;
  background: white;
}

.sidebar h3 {
  margin-bottom: 10px;
  border-bottom: 1px solid black;
  padding-bottom: 5px;
}

#onlineUsers div {
  padding: 5px 0;
  font-size: 14px;
}

/* =========================
   💬 CHAT AREA
========================= */
.chat {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* =========================
   🔝 TOPBAR
========================= */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid black;
  background: white;
}

.topbar h2 {
  font-size: 20px;
}

/* =========================
   🔘 BUTTONS (GLOBAL)
========================= */
button {
  background: white;
  border: 1px solid black;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: bold;
  margin-left: 5px;
  transition: all 0.1s ease;
}

button:hover {
  background: black;
  color: white;
}

button:active {
  transform: translate(2px, 2px);
}

/* =========================
   💬 MESSAGES
========================= */
#messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

/* MESSAGE ROW */
.msg {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  align-items: flex-start;
}

/* =========================
   🖼 AVATAR
========================= */
/* PROFILE AVATAR FIX */
.profile-avatar-large {
  width: 120px;
  height: 120px;
  border: 3px solid black;
  border-radius: 50%;
  overflow: hidden; /* 🔥 THIS IS THE KEY */
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
}
.avatar {
  width: 50px;
  height: 50px;
  border: 3px solid black;
  overflow: hidden; /* 🔥 THIS IS THE KEY */
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 🔥 makes it fill nicely */
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 🔥 makes it fill nicely */
}
/* =========================
   💬 MESSAGE CONTENT
========================= */
.msgContent {
  max-width: 70%;
}

.msgContent b {
  display: block;
  margin-bottom: 1px;
}

.msgContent div {
  word-wrap: break-word;
}

/* =========================
   😊 REACTIONS (HOVER FIX)
========================= */

/* container */
.msgContent {
  position: relative;
}

/* hidden by default */
.react-buttons {
  position: absolute;
  bottom: -30px;
  left: 0;

  display: flex;
  gap: 5px;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  justify-self:flex-end;
}

/* SHOW on hover */
.msg:hover .react-buttons {
  opacity: 1;
  pointer-events: auto;
}

/* buttons style */
.react-buttons button {
  border: 2px solid black;
  background: white;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 14px;
}

.react-buttons button:hover {
  background: black;
  color: white;/*a;ldfhkaljg*/
}
/* =========================
   ⌨ INPUT AREA
========================= */
.inputRow {
  display: flex;
  border-top: 0px solid black;
}

.inputRow input {
  flex: 1;
  padding: 10px;
  border: none;
  border-right: 1px solid black;
  outline: none;
  font-size: 14px;
}

.inputRow button {
  border: none;
  border-left: 1px solid black;
}

/* =========================
   ✍️ TYPING INDICATOR
========================= */
#typing {
  padding: 5px 15px;
  font-size: 13px;
  border-top: 1px solid black;
}

/* =========================
   📂 FILE UPLOAD
========================= */
#avatarUpload {
  margin: 10px;
  border: 1px solid black;
  padding: 5px;
  background: white;
}

/* =========================
   🧱 SCROLLBAR (OPTIONAL)
========================= */
#messages::-webkit-scrollbar {
  width: 8px;
}

#messages::-webkit-scrollbar-thumb {
  background: black;
}

/* =========================
   ⚡ SMALL DETAILS
========================= */
.msg:hover {
  background: #f5f5f5;
}

.time {
  font-size: 11px;
  opacity: 0.6;
  margin-top: 4px;
}
/* =========================
   🧮 SOLVER PAGE
========================= */

.solverPage {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: white;
}

.solverTopbar {
  padding: 15px;
  border-bottom: 1px solid black;
  font-size: 20px;
  font-weight: bold;
}

.solverContent {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.solverBox {
  border: 1px solid black;
  padding: 20px;
  max-width: 700px;
  background: white;
}

.solverBox p {
  margin-bottom: 10px;
}

.solverExample {
  font-size: 13px;
  opacity: 0.7;
  margin-bottom: 10px;
}

/* input matches chat style */
#coeffs {
  width: 100%;
  padding: 10px;
  border: 1px solid black;
  outline: none;
  font-size: 14px;
  margin-bottom: 10px;
}

/* result box */
#output {
  margin-top: 20px;
  padding: 15px;
  border: 1px solid black;
  min-height: 60px;
  background: #fafafa;
  line-height: 1.8;
}

/* hover effect like messages */
#output:hover {
  background: #f5f5f5;
}