/* GLOBAL */
body {
  margin: 0;
  padding: 0;
  background: #020617;
  color: #e2e8f0;
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 40px;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

/* CANVAS */
#neuralCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  opacity: 0.55;
}

/* CHAT WINDOW */
.chat-window {
  width: 360px;
  background: #020617;
  border-radius: 14px;
  padding: 18px 18px 22px;
  box-shadow: 0 0 30px rgba(0,0,0,0.7);
  border: 1px solid #1e293b;
  position: relative;
  z-index: 10;
  animation: breathe 6s infinite ease-in-out;
}

@keyframes breathe {
  0% { transform: scale(1); }
  50% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

/* HEADER */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.avatar {
  width: 48px;
  height: 48px;
  margin-right: 10px;
  flex-shrink: 0;
}

.avatar svg {
  width: 48px;
  height: 48px;
  display: block;
  overflow: visible;
}

/* HALO */
.halo {
  animation: haloOrganicV33 8.5s ease-in-out infinite;
  transform-origin: center;
}

@keyframes haloOrganicV33 {
  0%   { transform: translateX(0px) scale(1.00,1.00) rotate(0deg); opacity:0.55; }
  15%  { transform: translateX(-4px) scale(1.18,1.05) rotate(-2deg); opacity:0.90; }
  35%  { transform: translateX(6px) scale(1.28,1.12) rotate(3deg); opacity:1.00; }
  55%  { transform: translateX(-5px) scale(1.20,1.08) rotate(-1deg); opacity:0.88; }
  75%  { transform: translateX(3px) scale(1.24,1.10) rotate(2deg); opacity:0.95; }
  100% { transform: translateX(0px) scale(1.00,1.00) rotate(0deg); opacity:0.55; }
}

/* BADGE */
.badge {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid #f5e7c7;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #f5e7c7;
  text-shadow: 0 0 6px rgba(245,231,199,0.35);
  box-shadow:
    0 0 6px rgba(245,231,199,0.25),
    0 0 8px rgba(34,197,94,0.25);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34,197,94,0.9);
}

/* STATUS */
.status-block {
  text-align: right;
  min-width: 120px;
}

.dot-online {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 6px #22c55e;
  margin-right: 4px;
}

.online {
  color: #22c55e;
  font-size: 12px;
  font-weight: bold;
}

.watching {
  font-size: 11px;
  margin-top: 2px;
  background: linear-gradient(90deg,#facc15,#fbbf24,#facc15);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: goldPulse 3s infinite ease-in-out;
  font-weight: bold;
}

@keyframes goldPulse {
  0% { opacity:0.7; text-shadow:0 0 2px #facc15; }
  50% { opacity:1; text-shadow:0 0 6px #fbbf24; }
  100% { opacity:0.7; text-shadow:0 0 2px #facc15; }
}

/* MESSAGES */
.messages {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.6;
}

.msg {
  margin-bottom: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.msg.visible {
  opacity: 1;
}

.agent-text {
  color: #f5e7c7;
  text-shadow: 0 0 6px rgba(245,231,199,0.55);
}

.agent-text strong {
  color: #fde68a;
  text-shadow: 0 0 8px rgba(250,204,21,0.7);
}

.ip-highlight {
  color: #fbbf24;
  text-shadow: 0 0 4px rgba(250,204,21,0.7);
}

/* TYPING */
.typing {
  font-size: 13px;
  opacity: 0.7;
  margin-top: 4px;
  display: none;
}

.dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ec4899;
  margin-right: 3px;
  animation: blink 1s infinite;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0% { opacity: 0.2; }
  50% { opacity: 1; }
  100% { opacity: 0.2; }
}

/* BUTTON */
.button-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
}

.button {
  display: inline-block;
  background: #0f172a;
  color: #f5e7c7;
  padding: 16px 26px;
  margin-top: 14px;
  margin-bottom: 6px;
  border-radius: 9px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 800;
  border: 1px solid #f5e7c7;
  box-shadow: 0 0 10px rgba(245,231,199,0.25);
  transition: 0.25s ease;
}

.button:hover {
  box-shadow: 0 0 16px rgba(245,231,199,0.45);
  transform: translateY(-1px);
}

/* GOLD COSMIC TEXT */
.gold-cosmic {
  background: linear-gradient(
    90deg,
    #fde68a,
    #fbbf24,
    #a5f3fc,
    #c4b5fd,
    #f9a8d4,
    #fde68a
  );
  background-size: 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbowSoft 12s ease-in-out infinite;
  text-shadow: 0 0 6px rgba(255,255,255,0.15);
}

@keyframes rainbowSoft {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* LEGAL */
.legal {
  margin-top: 14px;
  text-align: center;
  font-size: 11px;
  opacity: 0.45;
}

/* RESPONSIVE */
@media (max-width: 480px) {
  .chat-window {
    width: 90vw;
    transform: scale(1.03);
  }
  .avatar {
    width: 44px;
    height: 44px;
  }
  .avatar svg {
    width: 44px;
    height: 44px;
  }
}

@media (min-width: 1600px) {
  .chat-window {
    transform: scale(1.25);
  }
  #neuralCanvas {
    opacity: 0.6;
  }
}
