body {
  background: #080f19;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #e9f2ff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 10px;
  box-sizing: border-box;
}

.box {
  width: 100%;
  max-width: 500px;
  background: #0f1c2e;
  padding: 15px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6), 0 0 15px rgba(58, 160, 255, 0.15);
  border: 1px solid #1f3554;
  display: flex;
  flex-direction: column;
  height: 92vh;
  position: relative;
}

.chat-header {
  padding-bottom: 10px;
  border-bottom: 1px solid #1f3554;
  margin-bottom: 10px;
}

.bot-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bot-avatar {
  width: 38px;
  height: 38px;
  background: #1e3a8a;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  border: 1px solid #3aa0ff;
}

.chat-header h3 {
  margin: 0;
  font-size: 16px;
  color: #3aa0ff;
}

.online-status {
  font-size: 10px;
  color: #4ade80;
}

/* CHAT STREAM CONTAINER */
.chat-container {
  flex: 1;
  overflow-y: auto;
  background: #080f19;
  padding: 12px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid #1f3554;
  margin-bottom: 10px;
}

.chat-bubble {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  animation: popIn 0.25s ease;
  word-wrap: break-word;
}

.chat-bubble.user {
  background: #1e3a8a;
  color: #dbeafe;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
  max-width: 85%;
  border: 1px solid #2563eb;
}

.chat-bubble.ai {
  background: #111d2e;
  color: #f3f4f6;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  width: 92%;
  border-left: 3px solid #3aa0ff;
  border-top: 1px solid #1f3554;
  border-right: 1px solid #1f3554;
  border-bottom: 1px solid #1f3554;
}

.chat-bubble.system-error {
  background: #2a1215;
  border-left: 3px solid #f87171;
  color: #fecaca;
  width: 92%;
}

/* WHATSAPP-STYLE MENU BUTTONS */
.option-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.menu-btn {
  background: #1a2e4a;
  color: #38bdf8;
  border: 1px solid #2e4a73;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: none;
}

.menu-btn:hover, .menu-btn:active {
  background: #3aa0ff;
  color: #000;
  border-color: #3aa0ff;
}

.input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

textarea {
  flex: 1;
  height: 48px;
  background: #0a1424;
  border: 1px solid #2e4a73;
  color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  resize: none;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}

textarea:focus {
  border-color: #3aa0ff;
}

button#solveBtn {
  padding: 0 16px;
  height: 48px;
  background: #3aa0ff;
  border: none;
  color: white;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(58, 160, 255, 0.2);
  white-space: nowrap;
}

/* MOVABLE DRAGGABLE FAB BUTTON */
.doubt-fab {
  position: fixed;
  bottom: 79px;
  right: 25px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  font-size: 20px;
  cursor: move;
  background: #3aa0ff;
  color: white;
  box-shadow: 0 4px 15px rgba(58,160,255,0.6);
  z-index: 999;
  touch-action: none;
  user-select: none;
}

.my-doubt-panel {
  position: fixed;
  bottom: 85px;
  right: 25px;
  width: 290px;
  max-height: 380px;
  background: #0f1c2e;
  border-radius: 14px;
  padding: 14px;
  color: #e9f2ff;
  box-shadow: 0 10px 25px rgba(0,0,0,0.8);
  border: 1px solid #2e4a73;
  z-index: 1000;
  overflow-y: auto;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  border-bottom: 1px solid #2e4a73;
  padding-bottom: 6px;
}

.panel-header h3 { margin: 0; font-size: 14px; color: #3aa0ff; }
.close-btn { background: transparent; color: #94a3b8; font-size: 14px; border: none; cursor: pointer; }
.pending { color: #fbbf24; font-weight: bold; }
.solved { color: #4ade80; font-weight: bold; }
.doubt-item { background: #172a45; padding: 10px; border-radius: 8px; margin-bottom: 8px; font-size: 12px; border: 1px solid #26436d; }
.notify-dot { position: absolute; top: 3px; right: 3px; width: 10px; height: 10px; background: #ef4444; border-radius: 50%; border: 2px solid #0f1c2e; }

@keyframes popIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

* { -webkit-tap-highlight-color: transparent; }
input, textarea { user-select: text; }
