:root {
  --bg: #050810;
  --panel: #0b1020;
  --panel-soft: #0e1426;
  --border: #1e2944;
  --accent: #27d3ff; /* neon cyan */
  --accent-soft: #1597ff; /* blue */
  --accent-warm: #ffb347; /* soft orange/yellow */
  --accent-hot: #ff4b6e;  /* red/pink */
  --text-main: #f5f7ff;
  --text-muted: #9aa4c6;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at top left, #12254b 0, transparent 55%),
    radial-gradient(circle at bottom right, #3a1038 0, transparent 55%),
    var(--bg);
  color: var(--text-main);
}

/* Boot screen (full overlay every reload) */

#boot-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #141a33 0, #050810 60%);
  z-index: 20;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

#boot-screen.hidden {
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
}

.boot-inner {
  background: radial-gradient(circle at center, #121c36 0, #050810 80%);
  border-radius: 18px;
  padding: 32px 42px;
  box-shadow:
    0 0 30px rgba(39, 211, 255, 0.4),
    0 0 70px rgba(0, 0, 0, 0.9);
  text-align: center;
  max-width: 480px;
  width: 90%;
}

.boot-title {
  margin: 0 0 4px;
  font-size: 28px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.boot-subtitle {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--text-muted);
}

.boot-steps {
  text-align: left;
  margin: 16px 0 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.boot-line {
  opacity: 0.25;
  transition: opacity 0.4s ease;
}

.boot-line.active {
  opacity: 1;
  color: var(--accent-soft);
}

.boot-bar {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: #0c1220;
  overflow: hidden;
  margin-bottom: 12px;
}

.boot-bar-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #27d3ff, #ffb347, #ff4b6e);
  transform-origin: left;
  transform: scaleX(0);
  animation: boot-fill 4s ease-out forwards;
}

@keyframes boot-fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.boot-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.boot-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #2a3658;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
}

.boot-dots span:nth-child(1) {
  animation: boot-dot 1.2s infinite ease-in-out;
}
.boot-dots span:nth-child(2) {
  animation: boot-dot 1.2s 0.2s infinite ease-in-out;
}
.boot-dots span:nth-child(3) {
  animation: boot-dot 1.2s 0.4s infinite ease-in-out;
}

@keyframes boot-dot {
  0%,
  100% {
    transform: translateY(0);
    background: #2a3658;
  }
  50% {
    transform: translateY(-4px);
    background: var(--accent);
  }
}

.boot-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* Main app */

.app-shell {
  max-width: 900px;
  height: 100vh;
  margin: 0 auto;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #10162a, #181636);
  border: 1px solid rgba(39, 211, 255, 0.35);
  box-shadow: 0 0 18px rgba(39, 211, 255, 0.2);
}

.title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #ffffff, #27d3ff);
  box-shadow:
    0 0 14px rgba(39, 211, 255, 0.9),
    0 0 28px rgba(39, 211, 255, 0.7);
}

.chat-header h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(6, 20, 32, 0.95);
  border: 1px solid rgba(39, 211, 255, 0.5);
  font-size: 12px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ff4b6e;
  box-shadow: 0 0 10px rgba(255, 75, 110, 0.8);
}

.status-pill.ready .status-dot {
  background: #32e86b;
  box-shadow: 0 0 10px rgba(50, 232, 107, 0.9);
}

.status-pill.connecting .status-dot {
  animation: status-pulse 1.1s infinite ease-in-out;
}

@keyframes status-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

/* Chat window */

.chat-window {
  flex: 1;
  background: radial-gradient(circle at top left, #11162a, #050810 55%);
  border-radius: 22px;
  padding: 14px 16px 12px;
  border: 1px solid rgba(21, 151, 255, 0.3);
  box-shadow:
    0 0 22px rgba(0, 0, 0, 0.8),
    inset 0 0 26px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.messages {
  height: 100%;
  overflow-y: auto;
  padding-right: 8px;
}

.message {
  display: flex;
  margin-bottom: 10px;
}

.message.bot {
  justify-content: flex-start;
}

.message.user {
  justify-content: flex-end;
}

.bubble {
  max-width: 80%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
}

.message.bot .bubble {
  background: linear-gradient(135deg, #141b30, #10162a);
  border: 1px solid rgba(39, 211, 255, 0.3);
  box-shadow: 0 0 16px rgba(39, 211, 255, 0.25);
}

.message.user .bubble {
  background: radial-gradient(circle at top left, #27d3ff, #1597ff);
  color: #02040b;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 18px rgba(21, 151, 255, 0.7);
}

.typing-dots span {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 4px;
  border-radius: 999px;
  background: #9aa4c6;
  animation: typing 1s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}
.typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing {
  0%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-4px);
  }
}

/* Suggestions row */

.suggestion-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-right: 8px;
}

.suggestion-btn {
  border: 1px solid rgba(39, 211, 255, 0.3);
  background: radial-gradient(circle at top left, #32ff8e, #1ed760);
  color: #02040b;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  cursor: pointer;

  box-shadow:
    0 0 10px rgba(50, 255, 150, 0.7),
    0 0 20px rgba(30, 215, 96, 0.7);

  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.1s ease,
    border-color 0.2s ease;
}


/* Input bar */

.input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 12px;
  background: linear-gradient(90deg, #050810, #0c1324);
  border-radius: 999px;
  border: 1px solid rgba(21, 151, 255, 0.4);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.9);
}

#user-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
}

#user-input::placeholder {
  color: var(--text-muted);
}

#send-btn {
  border: none;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 12px;
  text-transform: uppercase;
  cursor: pointer;
  background: radial-gradient(circle at top left, #ff5e21, #ff3b1f);
  color: #02040b;
  box-shadow:
    0 0 12px rgba(39, 211, 255, 0.8),
    0 0 26px rgba(21, 151, 255, 0.8);
  transition:
    transform 0.08s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease;
}

#send-btn:hover {
  transform: translateY(-1px);
  box-shadow:
  0 0 18px rgba(255, 93, 33, 1),
  0 0 32px rgba(255, 59, 31, 1);


#send-btn:active {
  transform: translateY(1px) scale(0.97);
  box-shadow:
  0 0 10px rgba(255, 93, 33, 0.7);


#send-btn:disabled {
  opacity: 0.4;
  cursor: default;
  box-shadow: none;
}

/* Mobile tweaks */

@media (max-width: 768px) {
  .app-shell {
    padding: 10px 8px 10px;
  }

  .chat-header {
    border-radius: 16px;
  }

  .messages .bubble {
    max-width: 100%;
  }

  .suggestion-row {
    overflow-x: auto;
  }
}
