/* ================================================
   Modern Neon Glass Chat Theme
   Fixed & Enhanced Version
   ================================================ */

/* ------------------------------
   Color Palette Variables
------------------------------ */
:root {
  --bg: #0a0f29;       /* Deep midnight */
  --accent: #0abaff;   /* Electric blue */
  --accent2: #b86bff;  /* Neon violet */
}

/* ------------------------------
   Global Styles & Background
------------------------------ */
html, body, #app {
  height: 100%;
}

body {
  background: radial-gradient(1200px 600px at 10% 10%, rgba(10, 186, 255, 0.06), transparent),
              radial-gradient(800px 400px at 90% 90%, rgba(184, 107, 255, 0.04), transparent);
  background-color: var(--bg);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  -webkit-font-smoothing: antialiased;
  color: white;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* ------------------------------
   1. Rotating Circular Text
------------------------------ */
.rotating-text {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56vmin;
  height: 56vmin;
  pointer-events: none;
  z-index: 0;
  opacity: 0.08;
  filter: blur(0.6px);
  color: var(--accent);
  text-shadow: 0 0 10px rgba(10, 186, 255, 0.3);
}

.rotating-text .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center;
  animation: spin 40s linear infinite;
}

.rotating-text .ring span {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 6px;
  transform: translateY(-50%);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ------------------------------
   2. Glass Card (Frosted Panel)
------------------------------ */
.glass-card {
  background: rgba(10, 15, 41, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  border-radius: 20px;
  padding: 1rem;
}

/* ------------------------------
   Scrollbar (Subtle Neon)
------------------------------ */
.msg-scroll::-webkit-scrollbar {
  width: 8px;
}
.msg-scroll::-webkit-scrollbar-thumb {
  background: rgba(184, 107, 255, 0.2);
  border-radius: 8px;
}

/* ------------------------------
   3. Loader & Transition
------------------------------ */
.loader-wrap {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  background-color: var(--bg);
  z-index: 100;
  transition: opacity 2s ease-out, visibility 2s;
}

.loader-circle {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow: 0 0 20px var(--accent), 0 0 40px var(--accent2) inset;
  display: grid;
  place-items: center;
  animation: pulse-glow 1.5s infinite alternate;
  position: relative;
}

.loader-message-content {
  position: relative;
  z-index: 2;
}

@keyframes pulse-glow {
  from { box-shadow: 0 0 15px var(--accent), 0 0 30px var(--accent2) inset; }
  to { box-shadow: 0 0 30px var(--accent), 0 0 60px var(--accent2) inset; }
}

/* ------------------------------
   4. Message Bubbles
------------------------------ */

/* User (Right): Electric Blue → Violet */
.bubble-user {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  border-radius: 20px;
  border-bottom-right-radius: 4px;
  padding: 10px 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2),
              0 0 8px rgba(10, 186, 255, 0.1);
  align-self: flex-end;
  max-width: 70%;
}

/* Bot (Left): Frosted White Bubble */
.bubble-bot {
  background: rgba(255, 255, 255, 0.95);
  color: var(--bg);
  border-radius: 20px;
  border-bottom-left-radius: 4px;
  padding: 10px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  align-self: flex-start;
  max-width: 70%;
}

/* ------------------------------
   5. Floating Particles (Background)
------------------------------ */
.particle {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
  filter: blur(0.4px);
}
