:root {
  color-scheme: dark;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #07090f;
  color: #f7f8fc;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(
      circle at 50% 0%,
      #18234a 0,
      transparent 42%
    ),
    #07090f;
}

a {
  color: inherit;
}

button,
textarea {
  font: inherit;
}

.header,
.footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header {
  min-height: 80px;
}

.logo {
  color: #a9b9ff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-decoration: none;
}

.header-actions {
  display: flex;
  gap: 22px;
  align-items: center;
}

.languages {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #262d41;
  border-radius: 999px;
  background: #0d111d;
}

.language-link {
  min-width: 34px;
  padding: 6px 8px;
  border-radius: 999px;
  color: #7f879b;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.language-link.active {
  background: #e9edff;
  color: #090c14;
}

.contact,
.footer a {
  color: #c5c9d6;
  text-decoration: none;
}

.main {
  display: grid;
  align-items: center;
  padding: 46px 20px 80px;
}

.hero {
  width: min(850px, 100%);
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 26px;
  color: #8fa5ff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  max-width: 820px;
  margin: 0 auto;
  font-size: clamp(42px, 8vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.description {
  max-width: 650px;
  margin: 30px auto 32px;
  color: #b6bccd;
  font-size: clamp(18px, 3vw, 23px);
  line-height: 1.55;
}

.conversation {
  max-width: 760px;
  max-height: 320px;
  margin: 0 auto 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  text-align: left;
  scrollbar-width: thin;
}

.message {
  max-width: min(610px, 88%);
  padding: 14px 17px;
  border-radius: 18px;
  line-height: 1.55;
  animation: message-enter 260ms ease-out;
}

.message--assistant {
  align-self: flex-start;
  border: 1px solid #293149;
  border-bottom-left-radius: 6px;
  background: #111624;
  color: #dbe1f1;
}

.message--user {
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  background: #e9edff;
  color: #090c14;
}

.typing {
  width: fit-content;
  margin: 0 auto 12px 45px;
  padding: 12px 16px;
  border: 1px solid #293149;
  border-radius: 18px 18px 18px 6px;
  background: #111624;
}

.typing span {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin: 0 2px;
  border-radius: 50%;
  background: #8994ad;
  animation: typing-dot 1.1s infinite ease-in-out;
}

.typing span:nth-child(2) {
  animation-delay: 120ms;
}

.typing span:nth-child(3) {
  animation-delay: 240ms;
}

.prompt {
  max-width: 760px;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid #303852;
  border-radius: 22px;
  background: rgb(15 19 31 / 88%);
  box-shadow: 0 28px 90px rgb(0 0 0 / 36%);
  text-align: left;
}

textarea {
  width: 100%;
  min-height: 116px;
  resize: vertical;
  padding: 24px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f7f8fc;
  line-height: 1.5;
}

textarea::placeholder {
  color: #777f95;
}

textarea:focus-visible {
  box-shadow: inset 0 0 0 2px #8fa5ff;
}

.prompt-footer {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid #252b3f;
}

#status {
  color: #8c94a9;
  font-size: 13px;
}

.prompt button {
  padding: 11px 19px;
  border: 0;
  border-radius: 999px;
  background: #e9edff;
  color: #0a0d17;
  font-weight: 750;
  cursor: pointer;
}

.prompt button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.suggestions {
  max-width: 760px;
  margin: 18px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.suggestions button {
  padding: 9px 14px;
  border: 1px solid #2a3147;
  border-radius: 999px;
  background: #111522;
  color: #bbc2d4;
  cursor: pointer;
}

.suggestions button:hover {
  border-color: #7389e5;
  color: #ffffff;
}

.footer {
  min-height: 74px;
  border-top: 1px solid #171b29;
  color: #777f95;
  font-size: 13px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@keyframes typing-dot {
  0%,
  60%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

@keyframes message-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .header,
  .footer {
    width: min(100% - 28px, 1180px);
  }

  .header-actions {
    gap: 10px;
  }

  .contact {
    display: none;
  }

  .main {
    padding-top: 32px;
  }

  .message {
    max-width: 94%;
  }

  .typing {
    margin-left: 4px;
  }

  .prompt-footer {
    align-items: flex-end;
  }

  #status {
    max-width: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .message,
  .typing span {
    animation: none;
  }
}