/* ==========================================================================
   HONEY AI - STANDALONE LLM CHAT APPLICATION STYLES (POLISHED & REFINED)
   ========================================================================== */

:root {
  /* Dark Black Palette */
  --bg-app: #000000;
  --bg-gradient: linear-gradient(180deg, #000000 0%, #0c0c0c 50%, #030303 100%);
  
  --bg-sidebar: #090909;
  --bg-sidebar-hover: #141414;
  --bg-sidebar-active: #1e1e1e;

  --bg-header: rgba(10, 10, 10, 0.85);
  --bg-composer: rgba(10, 10, 10, 0.9);
  --bg-input: #121212;

  --border-dark: #1f1f1f;
  --border-subtle: #141414;

  /* Accent & Bubble Colors */
  --accent-blue: #007aff;
  --accent-blue-dim: #0056b3;
  --accent-blue-glow: rgba(0, 122, 255, 0.35);
  --accent-blue-soft: rgba(0, 122, 255, 0.12);

  --bubble-incoming-bg: #181818;
  --bubble-incoming-border: #262626;
  --bubble-incoming-text: #f1f5f9;

  --bubble-outgoing-bg: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
  --bubble-outgoing-text: #ffffff;
  --bubble-outgoing-shadow: 0 3px 12px rgba(0, 122, 255, 0.3);

  --text-main: #ffffff;
  --text-muted: #999999;
  --text-faint: #555555;

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: var(--font-main);
  background: var(--bg-app);
  color: var(--text-main);
}

body.dark-black-theme {
  background: var(--bg-gradient);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

/* Mobile Sidebar Backdrop Overlay */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 25;
  display: none;
}

.sidebar-backdrop.visible {
  display: block;
}

/* App Container Layout */
.llm-app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
  background: transparent;
}

/* Common Icon Buttons */
.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: #1f1f1f;
  color: var(--text-main);
}

/* ==========================================================================
   1. CHATGPT / GEMINI STYLE THREAD HISTORY SIDEBAR MENU
   ========================================================================== */
.llm-sidebar {
  width: 260px;
  min-width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-dark);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 30;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  transition: transform var(--transition-normal), width var(--transition-normal), min-width var(--transition-normal), opacity var(--transition-normal);
}

.llm-sidebar.collapsed {
  transform: translateX(-100%);
  width: 0;
  min-width: 0;
  border-right: none;
  opacity: 0;
  pointer-events: none;
}

.sidebar-top {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.new-chat-btn {
  flex: 1;
  background: var(--bg-sidebar-hover);
  border: 1px solid var(--border-dark);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.new-chat-btn:hover {
  background: var(--accent-blue-soft);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  box-shadow: 0 0 10px var(--accent-blue-soft);
}

.sidebar-close-btn {
  display: flex;
  flex-shrink: 0;
}

/* Sidebar Control Panels Accordion (STATUS, BRAIN MONITOR, DEVELOPMENT, OWNER TRAINING) */
.sidebar-panels-accordion {
  padding: 0 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid var(--border-dark);
}

/* Neural Activity Screen Card */
.neural-screen-card {
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  background: rgba(10, 10, 14, 0.95);
  overflow: hidden;
  margin-bottom: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(0, 122, 255, 0.08);
}

.neural-screen-header {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.neural-screen-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--accent-blue);
  letter-spacing: 0.06em;
}

.neural-pulse-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-blue);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-blue);
  animation: pulseDot 1.5s infinite alternate;
}

@keyframes pulseDot {
  0% { opacity: 0.4; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.2); }
}

.neural-screen-tag {
  font-size: 0.62rem;
  color: var(--text-faint);
  font-family: monospace;
}

.neural-canvas-wrap {
  position: relative;
  width: 100%;
  height: 110px;
  background: radial-gradient(circle at center, rgba(0, 122, 255, 0.08) 0%, rgba(5, 5, 8, 0.95) 100%);
  overflow: hidden;
}

.neural-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.neural-screen-overlay-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 12px 12px;
  pointer-events: none;
}

.panel-section {
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  background: rgba(18, 18, 18, 0.6);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.panel-section:hover {
  border-color: #2a2a2a;
}

.panel-section.active {
  border-color: var(--accent-blue);
  background: rgba(0, 122, 255, 0.06);
}

.panel-header-btn {
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.panel-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.panel-section.active .panel-header-left {
  color: var(--accent-blue);
}

.panel-chevron {
  color: var(--text-faint);
  transition: transform var(--transition-fast);
}

.panel-section.active .panel-chevron {
  transform: rotate(180deg);
  color: var(--accent-blue);
}

.status-dot {
  width: 6px;
  height: 6px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
}

.panel-content {
  display: none;
  padding: 8px 12px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.2);
}

.panel-sub-header {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--accent-blue);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2px;
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.panel-section.active .panel-content {
  display: flex;
}

.panel-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.74rem;
}

.panel-stat-row.column {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  margin-top: 2px;
  padding-top: 4px;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
}

.stat-label {
  color: var(--text-muted);
  flex-shrink: 0;
}

.stat-value {
  font-weight: 700;
  color: var(--text-main);
  text-align: right;
  word-break: break-word;
}

.panel-stat-row.column .stat-value {
  text-align: left;
  font-size: 0.73rem;
  line-height: 1.35;
}

.stat-value.active {
  color: #10b981;
}

.stat-value.highlight {
  color: var(--accent-blue);
}

.stat-progress-bar {
  width: 70px;
  height: 4px;
  background: #222;
  border-radius: 2px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--accent-blue);
}

.panel-btn-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 4px;
}

.panel-action-btn {
  width: 100%;
  padding: 6px 10px;
  background: var(--accent-blue);
  color: #fff;
  border: 1px solid var(--accent-blue);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.panel-action-btn:hover {
  background: #0066d6;
  border-color: #0066d6;
  box-shadow: 0 0 10px rgba(0, 122, 255, 0.3);
}

.panel-action-btn.outline {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-dark);
}

.panel-action-btn.outline:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border-color: #333;
}

.primary-learning-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 122, 255, 0.15) !important;
  color: var(--accent-blue) !important;
  border: 1px solid var(--accent-blue) !important;
  padding: 7px 10px !important;
  letter-spacing: 0.02em;
}

.primary-learning-btn:hover {
  background: var(--accent-blue) !important;
  color: #fff !important;
  box-shadow: 0 0 12px var(--accent-blue-glow) !important;
}

.primary-learning-btn svg {
  transition: transform var(--transition-fast);
}

.primary-learning-btn.open svg {
  transform: rotate(180deg);
}

.text-faint {
  color: var(--text-faint) !important;
}

/* Thread History List */
.threads-history {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  white-space: nowrap;
}

.history-group-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 8px 0;
}

.threads-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.thread-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border-left: 3px solid transparent;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.thread-icon {
  color: var(--text-faint);
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.thread-item:hover {
  background: var(--bg-sidebar-hover);
  color: var(--text-main);
}

.thread-item:hover .thread-icon {
  color: var(--text-muted);
}

.thread-item.active {
  background: var(--accent-blue-soft);
  border-left-color: var(--accent-blue);
  color: var(--accent-blue);
  font-weight: 700;
}

.thread-item.active .thread-icon {
  color: var(--accent-blue);
}

.thread-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.thread-delete-btn {
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  flex-shrink: 0;
  opacity: 0;
  transition: all var(--transition-fast);
}

.thread-item:hover .thread-delete-btn {
  opacity: 1;
}

.thread-delete-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Sidebar Footer (User Account Node) */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-dark);
  white-space: nowrap;
}

.user-profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--accent-blue);
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-plan {
  font-size: 0.72rem;
  color: var(--accent-blue);
}

.settings-btn {
  color: var(--text-faint);
  flex-shrink: 0;
}

.settings-btn:hover {
  color: var(--text-main);
}

/* ==========================================================================
   2. MAIN LLM CHAT CANVAS
   ========================================================================== */
.llm-canvas {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: transparent;
  position: relative;
  overflow: hidden;
  height: 100vh;
}

/* Top LLM Header */
.llm-header {
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-header);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-dark);
  z-index: 15;
  position: relative;
}

.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-avatar-wrap.header-avatar {
  width: 44px;
  height: 44px;
  margin-bottom: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.model-selector-wrap {
  position: relative;
}

.model-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-dark);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.model-badge:hover {
  border-color: var(--accent-blue);
  background: var(--accent-blue-soft);
}

.model-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--accent-blue);
}

.model-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
}

.model-tag {
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.model-tag-subtle {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.chevron-icon {
  color: var(--text-faint);
  transition: transform var(--transition-fast);
}

.model-selector-wrap.active .chevron-icon {
  transform: rotate(180deg);
}

/* Model Dropdown Menu */
.model-dropdown-menu {
  position: absolute;
  top: 45px;
  left: 0;
  width: 280px;
  background-color: #141414;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dropdown-item {
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.dropdown-item:hover {
  background: #1f1f1f;
}

.dropdown-item.active {
  background: var(--accent-blue-soft);
  border: 1px solid var(--accent-blue);
}

.dropdown-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.dropdown-item-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
}

.dropdown-item-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Hero Welcome Screen (For New Chats) */
.hero-welcome-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* Ambient Bioluminescent Glowing Orbs */
.ambient-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
  opacity: 0.25;
}

.ambient-glow-orb.orb-1 {
  top: 15%;
  left: 20%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(0, 122, 255, 0.4) 0%, rgba(0, 0, 0, 0) 70%);
  animation: orbDrift 14s infinite ease-in-out alternate;
}

.ambient-glow-orb.orb-2 {
  bottom: 20%;
  right: 15%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(0, 195, 255, 0.3) 0%, rgba(0, 0, 0, 0) 70%);
  animation: orbDrift 18s infinite ease-in-out alternate-reverse;
}

@keyframes orbDrift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -40px) scale(1.15); }
  100% { transform: translate(-20px, 30px) scale(0.95); }
}

/* Interactive Background Particle Canvas */
.hero-particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.65;
}

/* Background Character Watermark Overlay & Animations */
.hero-bg-character-wrap {
  position: absolute;
  right: 0;
  bottom: 0;
  top: 0;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.28;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  filter: drop-shadow(0 0 25px rgba(0, 122, 255, 0.25));
}

.hero-hologram-ring {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px dashed rgba(0, 122, 255, 0.25);
  top: 15%;
  right: 5%;
  animation: hologramRotate 25s linear infinite;
}

@keyframes hologramRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-bg-character {
  height: 94%;
  max-height: 560px;
  width: auto;
  object-fit: contain;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 98%), linear-gradient(to left, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 98%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 98%), linear-gradient(to left, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 98%);
  animation: characterFloat 6s ease-in-out infinite alternate;
}

@keyframes characterFloat {
  0% { transform: translateY(0px) scale(1); }
  100% { transform: translateY(-10px) scale(1.01); }
}

.hero-content-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero-avatar-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  animation: avatarPopIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes avatarPopIn {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

.hero-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-blue);
  box-shadow: 0 0 20px var(--accent-blue-glow);
}

.hero-pulse-ring {
  position: absolute;
  inset: -6px;
  border: 1.5px solid var(--accent-blue);
  border-radius: 50%;
  opacity: 0.4;
}

.hero-pulse-ring.ring-1 {
  animation: pulseRing 3s infinite;
}

.hero-pulse-ring.ring-2 {
  animation: pulseRing 3s infinite 1.5s;
}

@keyframes pulseRing {
  0% { transform: scale(0.95); opacity: 0.6; }
  50% { transform: scale(1.18); opacity: 0.05; }
  100% { transform: scale(0.95); opacity: 0.6; }
}

.hero-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 6px;
  animation: heroTitleFadeIn 2.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Hero Left-Aligned Incoming Chat Message Container & Receiving Animation */
.hero-incoming-container {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 18px;
}

.hero-typing-indicator {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  animation: typingPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.hero-bubble-seq {
  align-self: flex-start !important;
  max-width: 92% !important;
  margin-bottom: 6px;
  margin-left: 0 !important;
  animation: incomingReceivePop 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-bubble-seq .speech-bubble {
  background: linear-gradient(135deg, rgba(38, 38, 44, 0.95) 0%, rgba(20, 20, 24, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 16px !important;
  font-size: 0.94rem;
  line-height: 1.48;
  color: #f2f2f7;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  text-align: left !important;
  text-indent: 0 !important;
  white-space: normal !important;
  border-radius: 18px 18px 18px 4px !important;
}

@keyframes incomingReceivePop {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Suggestion Cards Grid */
.suggestions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
}

.suggestion-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
}

.suggestion-card:hover {
  border-color: var(--accent-blue);
  background: #181818;
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.15);
  transform: translateY(-2px);
}

.card-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-text strong {
  font-size: 0.88rem;
  color: var(--text-main);
}

.card-text span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Message History Container */
.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.messages-track {
  width: 100%;
  max-width: 800px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Speech Bubbles (Mobile Phone iMessage / Android Design) */
.message-bubble-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 72%;
  animation: mobileBubblePop 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.message-bubble-group.incoming {
  align-self: flex-start;
}

.message-bubble-group.outgoing {
  align-self: flex-end;
}

.msg-sender-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 2px;
  padding-left: 2px;
}

.msg-sender-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--accent-blue);
}

.speech-bubble {
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 0.94rem;
  line-height: 1.42;
  word-break: break-word;
  letter-spacing: -0.01em;
}

/* Incoming (Honey AI - iOS Dark Mode Grey Bubble) */
.message-bubble-group.incoming .speech-bubble {
  background-color: #26262a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f2f2f7;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Outgoing (User - iOS Vibrant iMessage Blue Bubble) */
.message-bubble-group.outgoing .speech-bubble {
  background: linear-gradient(180deg, #007aff 0%, #0062d6 100%);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 122, 255, 0.3);
}

/* Image Attachment inside Bubble */
.bubble-img-attachment {
  margin-top: 8px;
  border-radius: var(--radius-md);
  overflow: hidden;
  max-width: 340px;
}

.bubble-img-attachment img {
  width: 100%;
  height: auto;
  display: block;
}

/* Voice Message Waveform Player */
.voice-bubble-player {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
  padding: 4px 0;
}

.voice-play-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.voice-wave-bars {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1;
  height: 20px;
}

.wave-bar {
  width: 3px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 2px;
}

.wave-bar.active {
  background: #ffffff;
}

.voice-time-label {
  font-size: 0.74rem;
  opacity: 0.9;
}

/* Message Meta & Action Toolbar */
.bubble-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  font-size: 0.68rem;
  color: var(--text-faint);
}

.message-bubble-group.outgoing .bubble-meta {
  justify-content: flex-end;
  color: rgba(255, 255, 255, 0.75);
}

.msg-action-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.message-bubble-group.incoming:hover .msg-action-bar {
  opacity: 1;
}

.msg-action-btn {
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-size: 0.74rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.msg-action-btn:hover {
  color: var(--accent-blue);
}

/* ==========================================================================
   PURE REAL-WORLD TEXT TYPING INDICATOR (iMessage / Telegram / WhatsApp)
   ========================================================================== */
.typing-indicator-wrap,
.generating-wrap {
  width: 100%;
  max-width: 800px;
  margin: 6px auto 10px;
  padding: 0 24px;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  animation: typingFadeIn 0.15s ease-out;
}

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

.typing-bubble,
.generating-bubble {
  background-color: #26262a !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 18px !important;
  border-bottom-left-radius: 4px !important;
  padding: 10px 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  width: fit-content !important;
  min-width: 52px !important;
  height: 34px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.typing-bubble .dot,
.generating-bubble .dot {
  width: 7px !important;
  height: 7px !important;
  background-color: #8e8e93 !important;
  border-radius: 50% !important;
  display: inline-block !important;
  opacity: 0.35 !important;
  animation: typingDotWave 1.4s infinite ease-in-out both !important;
}

.typing-bubble .dot:nth-child(1),
.generating-bubble .dot:nth-child(1) { animation-delay: -0.32s !important; }
.typing-bubble .dot:nth-child(2),
.generating-bubble .dot:nth-child(2) { animation-delay: -0.16s !important; }
.typing-bubble .dot:nth-child(3),
.generating-bubble .dot:nth-child(3) { animation-delay: 0s !important; }

@keyframes typingDotWave {
  0%, 80%, 100% {
    transform: scale(0.7);
    opacity: 0.35;
    background-color: #8e8e93;
  }
  40% {
    transform: scale(1.15);
    opacity: 1;
    background-color: #00d2ff;
    box-shadow: 0 0 6px rgba(0, 210, 255, 0.5);
  }
}

.generating-label,
.msg-sender-header.typing-header {
  display: none !important;
}

/* ==========================================================================
   3. FLOATING PROMPT COMPOSER
   ========================================================================== */
.composer-container {
  padding: 14px 24px 16px;
  background-color: var(--bg-composer);
  border-top: 1px solid var(--border-dark);
  backdrop-filter: blur(16px);
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Emoji Drawer */
.emoji-drawer {
  position: absolute;
  bottom: 90px;
  background-color: #141414;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
  z-index: 40;
}

.emoji-grid {
  display: flex;
  gap: 8px;
}

.emoji-btn {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: transform var(--transition-fast);
}

.emoji-btn:hover {
  transform: scale(1.25);
  background: #222;
}

/* Form Input Pill */
.composer-form {
  width: 100%;
  max-width: 800px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-full);
  padding: 6px 8px 6px 12px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.composer-form:focus-within {
  border-color: var(--accent-blue);
  box-shadow: 0 0 12px var(--accent-blue-soft);
}

.input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
}

.input-wrap textarea {
  width: 100%;
  max-height: 120px;
  min-height: 24px;
  padding: 4px 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.94rem;
  font-family: inherit;
  resize: none;
}

.input-wrap textarea::placeholder {
  color: var(--text-faint);
}

.send-btn {
  background: var(--bubble-outgoing-bg);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--bubble-outgoing-shadow);
  transition: all var(--transition-fast);
}

.send-btn:hover {
  transform: scale(1.06);
  filter: brightness(1.1);
}

.send-btn:active {
  transform: scale(0.95);
}

.composer-disclaimer {
  margin-top: 8px;
  font-size: 0.7rem;
  color: var(--text-faint);
  text-align: center;
}

/* ==========================================================================
   4. RESPONSIVE BREAKPOINTS (Mobile Drawer Overlay)
   ========================================================================== */
@media (max-width: 768px) {
  .llm-sidebar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.95);
  }

  .suggestions-grid {
    grid-template-columns: 1fr;
  }

  .messages-track, .composer-form {
    max-width: 100%;
  }

  .messages-container {
    padding: 16px 0;
  }

  .message-bubble-group {
    max-width: 88%;
  }

  .composer-container {
    padding: 10px 14px 14px;
  }
}

/* ==========================================================================
   5. HONEY FAST-TRACK LEARNING CENTER MODAL
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.learning-center-modal {
  width: 100%;
  max-width: 980px;
  height: 82vh;
  max-height: 720px;
  background: #0d0d0e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 122, 255, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.modal-subtitle {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-primary-btn {
  background: var(--accent-blue);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 0 12px var(--accent-blue-glow);
}

.modal-primary-btn:hover {
  background: #0062d6;
  box-shadow: 0 0 18px rgba(0, 122, 255, 0.4);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color var(--transition-fast);
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Modal Sidebar Tabs Navigation */
.modal-sidebar-nav {
  width: 220px;
  border-right: 1px solid var(--border-dark);
  background: rgba(0, 0, 0, 0.3);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
}

.lc-tab-btn {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lc-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.lc-tab-btn.active {
  color: var(--accent-blue);
  background: var(--accent-blue-soft);
  border-color: rgba(0, 122, 255, 0.3);
}

/* Modal Main Content Area */
.modal-main-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  background: #09090a;
}

.lc-tab-view {
  display: none;
}

.lc-tab-view.active {
  display: block;
}

.lc-view-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

/* Overview Dashboard Grid */
.lc-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.lc-card {
  background: rgba(18, 18, 22, 0.8);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: border-color var(--transition-fast);
}

.lc-card:hover {
  border-color: #2a2a30;
}

.lc-card.full-width {
  grid-column: span 2;
}

.lc-card.current-study-card {
  border-color: rgba(0, 122, 255, 0.3);
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.08) 0%, rgba(18, 18, 22, 0.9) 100%);
}

.lc-card-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lc-card-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-blue);
  text-transform: uppercase;
}

.lc-card-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
}

.lc-card-count {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
}

.lc-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lc-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lc-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.lc-stat-val {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
}

.lc-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.lc-action-btn {
  align-self: flex-start;
  padding: 8px 16px;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lc-action-btn:hover {
  background: #0062d6;
  box-shadow: 0 0 12px var(--accent-blue-glow);
}

.text-amber {
  color: #f59e0b !important;
}

/* =========================================================
   MOBILE PWA & RESPONSIVE APP NAVIGATION
========================================================= */
.pwa-install-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f121a;
  border: 1px solid #00ffe0;
  border-radius: 16px;
  padding: 12px 18px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 8px 30px rgba(0, 255, 224, 0.25);
  z-index: 10000;
  max-width: 90%;
  width: 380px;
  animation: pwaSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-install-banner.active {
  display: flex;
}

@keyframes pwaSlideUp {
  from { transform: translate(-50%, 40px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: rgba(10, 10, 15, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  z-index: 999;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
  box-sizing: border-box;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #8e8ea0;
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 700;
  transition: color 0.2s ease;
}

.mobile-nav-item.active, .mobile-nav-item:hover {
  color: #00ffe0;
}

.mobile-nav-icon {
  font-size: 1.15rem;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
  }
  .app-container {
    padding-bottom: 74px !important;
  }
  .admin-container {
    padding-bottom: 90px !important;
  }
}
