:root {
  --bg: #080f14;
  --panel: #111820;
  --panel-2: #0b1117;
  --silver: #d9e1ea;
  --muted: #8e98a8;
  --cyan: #00c2ff;
  --cyan-soft: #58d5ff;
  --line: #27313a;
  --text-dark: #061017;
  --radius: 22px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", "Sora", Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 194, 255, 0.08), transparent 34%),
    #030608;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: var(--silver);
}

.app {
  width: 100%;
  max-width: 760px;
  height: min(82vh, 760px);
  min-height: 540px;
  background: rgba(17, 24, 32, 0.97);
  border: 1px solid rgba(0, 194, 255, 0.24);
  border-radius: var(--radius);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.55),
    0 0 34px rgba(0, 194, 255, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.header {
  background: linear-gradient(135deg, #05090d 0%, #111820 68%, #0b141b 100%);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid rgba(0, 194, 255, 0.22);
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  width: 78px;
  height: 78px;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
  flex-shrink: 0;
  box-shadow: 0 0 22px rgba(0, 194, 255, 0.12);
}

.brand-copy {
  min-width: 0;
}

.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--muted);
  margin-bottom: 4px;
}

.brand h1 {
  font-size: 23px;
  line-height: 1.05;
  letter-spacing: 0.06em;
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(0, 194, 255, 0.1);
}

.subtitle {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--silver);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(0, 194, 255, 0.18);
  border-radius: 999px;
  color: var(--cyan-soft);
  font-size: 12px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 10px rgba(0, 194, 255, 0.04);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 9px rgba(0, 194, 255, 0.8);
}

.demo-strip {
  min-height: 36px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #090f14;
  border-bottom: 1px solid rgba(142, 152, 168, 0.12);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.demo-strip span:first-child {
  color: var(--cyan);
}

.chat {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px),
    var(--panel-2);
  background-size: 34px 34px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message {
  display: flex;
  width: 100%;
  align-items: flex-end;
  gap: 10px;
}

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

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

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  border: 1px solid rgba(0, 194, 255, 0.32);
  background: linear-gradient(145deg, #111820, #061017);
  box-shadow: 0 0 12px rgba(0, 194, 255, 0.08);
  overflow: hidden;
}

.avatar-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.bubble {
  max-width: 78%;
  padding: 13px 16px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.message.bot .bubble {
  background: rgba(21, 29, 37, 0.96);
  color: var(--silver);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}

.message.user .bubble {
  background: linear-gradient(135deg, #00c2ff, #56d6ff);
  color: var(--text-dark);
  border-bottom-right-radius: 6px;
  font-weight: 650;
  box-shadow: 0 8px 22px rgba(0, 194, 255, 0.12);
}

.typing {
  opacity: 0.74;
  font-style: italic;
}

.cta-card {
  margin: 4px auto 2px;
  width: min(100%, 570px);
  padding: 19px;
  border: 1px solid rgba(0, 194, 255, 0.34);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(17, 24, 32, 0.98), rgba(5, 12, 17, 0.98));
  text-align: center;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

.cta-card h2 {
  font-size: 18px;
  color: #ffffff;
  margin-bottom: 7px;
}

.cta-card p {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  margin-bottom: 14px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--cyan);
  color: var(--text-dark);
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(0, 194, 255, 0.28);
}

.chat-form {
  padding: 14px 16px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
}

.chat-form input {
  flex: 1;
  min-width: 0;
  background: #0b1117;
  color: #ffffff;
  border: 1px solid #34404a;
  border-radius: 14px;
  padding: 13px 15px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-form input::placeholder {
  color: var(--muted);
}

.chat-form input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 194, 255, 0.1);
}

.chat-form button {
  border: none;
  border-radius: 14px;
  background: var(--cyan);
  color: var(--text-dark);
  font-weight: 800;
  padding: 0 22px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.chat-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(0, 194, 255, 0.22);
}

.chat-form button:disabled,
.chat-form input:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.footer {
  min-height: 31px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #05090d;
  color: var(--cyan);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  border-top: 1px solid rgba(0, 194, 255, 0.12);
}

.footer span {
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0, 194, 255, 0.08);
}

.footer i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px rgba(0, 194, 255, 0.7);
}

.chat::-webkit-scrollbar {
  width: 7px;
}

.chat::-webkit-scrollbar-track {
  background: #0b1117;
}

.chat::-webkit-scrollbar-thumb {
  background: #34404a;
  border-radius: 10px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  body {
    padding: 0;
    background: var(--bg);
  }

  .app {
    height: 100dvh;
    min-height: 0;
    max-height: none;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .header {
    padding: 11px 13px;
    gap: 10px;
  }

  .logo {
    width: 58px;
    height: 58px;
    border-radius: 11px;
  }

  .brand {
    gap: 10px;
  }

  .eyebrow {
    font-size: 8px;
    margin-bottom: 3px;
  }

  .brand h1 {
    font-size: 17px;
  }

  .subtitle {
    font-size: 10.5px;
    max-width: 215px;
  }

  .status {
    padding: 6px 8px;
    font-size: 10px;
  }

  .demo-strip {
    padding: 0 13px;
    min-height: 32px;
    font-size: 8.5px;
  }

  .chat {
    padding: 15px 12px;
    gap: 12px;
  }

  .bubble {
    max-width: 86%;
    padding: 11px 13px;
    font-size: 14px;
  }

  .avatar {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
  }

  .chat-form {
    padding: 10px;
    gap: 8px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  .chat-form input {
    padding: 12px 13px;
    font-size: 14px;
  }

  .chat-form button {
    padding: 0 15px;
  }

  .footer {
    display: none;
  }
}

@media (max-width: 390px) {
  .subtitle {
    display: none;
  }

  .status {
    font-size: 0;
    width: 30px;
    height: 30px;
    justify-content: center;
    padding: 0;
  }
}
