:root {
  color-scheme: dark;
  --ink: #f5f7ff;
  --muted: #aeb6cc;
  --panel: rgba(14, 19, 35, 0.86);
  --line: rgba(168, 184, 255, 0.17);
  --violet: #a892ff;
  --cyan: #66e0e5;
  --deep: #070a13;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--deep);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 45% -10%, rgba(82, 66, 151, 0.24), transparent 40rem),
    linear-gradient(145deg, #080b16 0%, #060811 60%, #0b0d19 100%);
}

button,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.ambient {
  position: fixed;
  z-index: 0;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.14;
  pointer-events: none;
}

.ambient-one {
  top: -12rem;
  right: -7rem;
  background: var(--violet);
}

.ambient-two {
  bottom: -14rem;
  left: -10rem;
  background: var(--cyan);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 72rem);
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.25rem;
  margin-bottom: 1.25rem;
}

.brand {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 1px solid rgba(168, 146, 255, 0.7);
  border-radius: 0.75rem 0.3rem 0.75rem 0.3rem;
  color: #0a0c16;
  background: linear-gradient(135deg, #c5b9ff, #6fe2e6);
  font-weight: 800;
  box-shadow: 0 0 28px rgba(122, 113, 230, 0.28);
}

.brand strong,
.brand small {
  display: block;
  letter-spacing: 0.16em;
}

.brand strong {
  font-size: 0.95rem;
}

.brand small {
  margin-top: 0.05rem;
  color: var(--muted);
  font-size: 0.65rem;
}

.status {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  color: #c9d0df;
  font-size: 0.86rem;
}

.status-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #68dbc4;
  box-shadow: 0 0 0.75rem rgba(104, 219, 196, 0.8);
}

.chat-card {
  min-height: calc(100vh - 6.5rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  background: linear-gradient(150deg, rgba(19, 25, 45, 0.94), rgba(9, 13, 25, 0.93));
  box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.33);
  backdrop-filter: blur(24px);
}

.intro {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: 2rem 2rem 1.25rem;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--cyan) !important;
  font-size: 0.72rem !important;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.intro h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 620;
  letter-spacing: -0.045em;
  line-height: 1;
}

.intro p:not(.eyebrow) {
  max-width: 42rem;
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.clear-button,
.suggestions button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.clear-button {
  flex: 0 0 auto;
  min-height: 2.7rem;
  padding: 0 1rem;
  border-radius: 0.8rem;
  color: #cbd1df;
  font-size: 0.9rem;
}

.clear-button:hover,
.suggestions button:hover {
  border-color: rgba(168, 146, 255, 0.55);
  background: rgba(168, 146, 255, 0.08);
}

.clear-button:active,
.suggestions button:active {
  transform: translateY(1px);
}

.suggestions {
  display: flex;
  gap: 0.6rem;
  padding: 0 2rem 1.35rem;
  overflow-x: auto;
}

.suggestions button {
  min-height: 2.55rem;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
  color: #d7dbea;
  font-size: 0.88rem;
}

.messages {
  height: min(37vh, 24rem);
  min-height: 14rem;
  overflow-y: auto;
  border-block: 1px solid var(--line);
  padding: 1.5rem 2rem;
  background: rgba(3, 6, 14, 0.24);
  scrollbar-color: rgba(168, 146, 255, 0.45) transparent;
}

.message {
  display: grid;
  grid-template-columns: 2.15rem minmax(0, 1fr);
  gap: 0.8rem;
  max-width: 48rem;
  margin-bottom: 1.35rem;
}

.message:last-child {
  margin-bottom: 0;
}

.user-message {
  margin-left: auto;
}

.avatar {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border: 1px solid rgba(168, 146, 255, 0.32);
  border-radius: 0.7rem;
  color: var(--violet);
  background: rgba(168, 146, 255, 0.09);
  font-size: 0.8rem;
  font-weight: 800;
}

.user-message .avatar {
  color: #062125;
  background: var(--cyan);
}

.message-label {
  display: block;
  margin: 0.05rem 0 0.35rem;
  color: #cfd5e6;
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.message p {
  margin: 0;
  color: #eef1fa;
  font-size: 1rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.user-message p {
  color: #cfd6e7;
}

.typing p {
  color: var(--muted);
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  padding: 1.25rem 2rem 0.7rem;
}

.composer textarea {
  width: 100%;
  min-height: 3.25rem;
  max-height: 9rem;
  resize: none;
  border: 1px solid rgba(168, 184, 255, 0.2);
  border-radius: 1rem;
  outline: none;
  padding: 0.9rem 1rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  font-size: 1rem;
  line-height: 1.45;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.composer textarea:focus {
  border-color: rgba(111, 226, 230, 0.62);
  box-shadow: 0 0 0 0.22rem rgba(111, 226, 230, 0.09);
}

.composer textarea::placeholder {
  color: #858da3;
}

.send-button {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
  min-width: 7rem;
  min-height: 3.25rem;
  border: 0;
  border-radius: 1rem;
  color: #0a0c15;
  background: linear-gradient(135deg, #b7a7ff, #6fe2e6);
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 0.8rem 2.2rem rgba(104, 132, 215, 0.2);
}

.send-button svg {
  width: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.send-button:disabled {
  cursor: wait;
  filter: grayscale(0.6);
  opacity: 0.58;
}

.notice {
  margin: 0;
  padding: 0.2rem 2rem 1.3rem;
  color: #7f879b;
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
}

.error-message p {
  color: #ffb3bd;
}

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

@media (max-width: 640px) {
  .shell {
    width: 100%;
    padding: 0;
  }

  .topbar {
    min-height: 4.25rem;
    margin: 0;
    padding: 0 1rem;
  }

  .chat-card {
    min-height: calc(100vh - 4.25rem);
    border-inline: 0;
    border-bottom: 0;
    border-radius: 1.4rem 1.4rem 0 0;
  }

  .intro {
    display: block;
    padding: 1.5rem 1rem 1rem;
  }

  .intro h1 {
    font-size: 2.35rem;
  }

  .clear-button {
    margin-top: 1rem;
  }

  .suggestions {
    padding: 0 1rem 1rem;
  }

  .messages {
    height: 39vh;
    padding: 1.25rem 1rem;
  }

  .composer {
    grid-template-columns: minmax(0, 1fr) 3.35rem;
    padding: 1rem 1rem 0.65rem;
  }

  .send-button {
    min-width: 3.35rem;
    padding: 0;
  }

  .send-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .notice {
    padding-inline: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

