:root {
  --base-60: #343434;
  --surface-30: #454545;
  --accent-10: #29b36b;
  --ink: #f2f2f2;
  --muted: #c4c4c4;
  --user: #4d4d4d;
  --bot: #3f3f3f;
  --border: #555555;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--base-60);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
}

.shell {
  width: min(940px, calc(100vw - 2rem));
  height: min(94vh, 960px);
  margin: 3vh auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-30);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.38);
}

.shell__header {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-bottom: 1px solid var(--border);
  background: #3b3b3b;
}

h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.brand__dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--accent-10);
}

.chat-box {
  overflow-y: auto;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message {
  max-width: min(75ch, 92%);
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  animation: show 180ms ease-out;
}

.message--user {
  align-self: flex-end;
  background: var(--user);
}

.message--bot {
  align-self: flex-start;
  background: var(--bot);
}

.message--system {
  display: none;
}

.message__label {
  margin: 0 0 0.25rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.message__text {
  margin: 0;
  line-height: 1.45;
  white-space: pre-wrap;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  border-top: 1px solid var(--border);
  padding: 0.95rem 1rem 1rem;
  background: #3b3b3b;
}

#message-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  font-family: inherit;
  color: var(--ink);
  background: #4a4a4a;
}

#message-input:focus-visible {
  outline: 2px solid var(--accent-10);
  border-color: var(--accent-10);
}

#send-button {
  border: none;
  border-radius: 12px;
  background: var(--accent-10);
  color: #122117;
  font-family: "Space Grotesk", sans-serif;
  padding: 0.75rem 1rem;
  min-width: 94px;
  cursor: pointer;
}

#send-button:disabled {
  background: #6da989;
  color: #173525;
  cursor: wait;
}

@keyframes show {
  from {
    transform: translateY(5px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 700px) {
  .shell {
    width: 100vw;
    height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .message {
    max-width: 96%;
  }
}
