:root {
  --bot-bg: #1e1f22;
  --bot-side: #2b2d31;
  --bot-panel: #313338;
  --bot-ink: #f2f3f5;
  --bot-muted: #b5bac1;
  --bot-line: #3f4147;
  --bot-blue: #5865f2;
  --bot-green: #23a55a;
  --bot-red: #da373c;
}

.bot-app {
  min-height: calc(100vh - 44px);
  background: #111214;
  color: var(--bot-ink);
}

.bot-shell {
  width: min(100% - 1rem, 88rem);
  margin: 0 auto;
  padding: 1rem 0 2.5rem;
}

.bot-window {
  min-height: 42rem;
  overflow: hidden;
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr) 13rem;
  border: 1px solid var(--bot-line);
  border-radius: 1rem;
  background: var(--bot-panel);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.35);
}

.bot-channels,
.bot-members {
  padding: 1rem;
  background: var(--bot-side);
}

.bot-brand {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

.bot-section-label {
  margin: 1rem 0 0.4rem;
  color: var(--bot-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bot-channel,
.bot-command,
.bot-send,
.bot-slash-option {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 0.45rem;
  padding: 0.45rem 0.6rem;
  background: transparent;
  color: var(--bot-muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.bot-channel::before {
  content: "# ";
}

.bot-channel.is-active {
  background: #404249;
  color: #fff;
}

.bot-channel:hover,
.bot-channel:focus-visible,
.bot-command:hover,
.bot-command:focus-visible,
.bot-slash-option:hover,
.bot-slash-option:focus-visible {
  background: #404249;
  color: #fff;
  outline: 2px solid var(--bot-blue);
  outline-offset: 1px;
}

.bot-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
}

.bot-topic {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--bot-line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.bot-topic strong::before {
  content: "# ";
  color: var(--bot-muted);
}

.bot-topic span {
  margin-left: 0.7rem;
  color: var(--bot-muted);
  font-size: 0.9rem;
}

.bot-messages {
  min-height: 29rem;
  max-height: 34rem;
  overflow: auto;
  padding: 1rem;
}

.bot-message {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.55rem 0;
}

.bot-avatar {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bot-blue);
  color: #fff;
  font-weight: 700;
}

.bot-avatar.is-user {
  background: #9b6a45;
}

.bot-message-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: baseline;
}

.bot-message-head time {
  color: var(--bot-muted);
  font-size: 0.72rem;
}

.bot-message p {
  margin: 0.2rem 0 0;
  line-height: 1.6;
}

.bot-tag {
  padding: 0.08rem 0.3rem;
  border-radius: 0.2rem;
  background: var(--bot-blue);
  font-size: 0.7rem;
}

.bot-composer {
  position: relative;
  margin: 0 1rem 1rem;
}

.bot-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 0.65rem;
  background: #383a40;
}

.bot-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--bot-ink);
  font: inherit;
}

.bot-input:focus-visible {
  outline: 2px solid var(--bot-blue);
  outline-offset: 2px;
}

.bot-send {
  width: auto;
  background: var(--bot-blue);
  color: #fff;
  text-align: center;
}

.bot-slash {
  position: absolute;
  inset: auto 0 calc(100% + 0.4rem) 0;
  max-height: 16rem;
  overflow: auto;
  padding: 0.45rem;
  border: 1px solid var(--bot-line);
  border-radius: 0.65rem;
  background: #111214;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.35);
}

.bot-slash-option {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.5rem;
  color: var(--bot-ink);
}

.bot-slash-option small {
  color: var(--bot-muted);
}

.bot-member {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  color: var(--bot-muted);
}

.bot-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--bot-green);
}

.bot-command-list {
  display: grid;
  gap: 0.25rem;
}

.bot-command {
  color: #d7d9ff;
  font-family: "IBM Plex Mono", monospace;
}

.bot-note {
  margin-top: 1rem;
  padding: 0.7rem;
  border: 1px solid #555862;
  border-radius: 0.6rem;
  color: var(--bot-muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.bot-footer {
  padding: 1rem;
  text-align: center;
  background: #111214;
  color: var(--bot-muted);
  font-size: 0.88rem;
}

@media (max-width: 850px) {
  .bot-window {
    grid-template-columns: 11rem minmax(0, 1fr);
  }

  .bot-members {
    display: none;
  }
}

@media (max-width: 590px) {
  .bot-window {
    grid-template-columns: 1fr;
  }

  .bot-channels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .bot-brand,
  .bot-section-label,
  .bot-command-list,
  .bot-note {
    width: 100%;
  }

  .bot-channel {
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bot-channel,
  .bot-command,
  .bot-send {
    transition: none;
  }
}
