* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f7f8fa;
  color: #1f2328;
  -webkit-font-smoothing: antialiased;
}

.app {
  display: flex;
  height: 100vh;
}

/* ---------- Sidebar ---------- */

.sidebar {
  width: 250px;
  padding: 36px 22px;
  background: #1f232b;
  color: white;
  display: flex;
  flex-direction: column;
}

.sidebar h1 {
  margin: 0 0 40px;
  font-size: 1.75rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.room {
  padding: 14px 16px;
  margin-bottom: 8px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease;
}

.room:hover {
  background: rgba(255,255,255,.08);
}

.room.active {
  background: #4f8cff;
  color: white;
}

.room:not(.active):last-child {
  opacity: .78;
}

/* ---------- Main ---------- */

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.header {
  padding: 42px 52px 30px;
  background: white;
  border-bottom: 1px solid #eceff2;
}

.header h2 {
  margin: 0;
  font-size: 2.15rem;
  font-weight: 650;
  letter-spacing: -.03em;
}

.mode-title {
  margin: 28px 0 10px;
  font-size: .78rem;
  font-weight: 700;
  color: #9aa2ad;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.mode-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.mode {
  border: 1px solid #d9dde3;
  background: white;
  color: #727983;
  padding: 10px 20px;
  border-radius: 999px;
  font: inherit;
  font-size: .92rem;
  cursor: pointer;
  transition: all .18s ease;
}

.mode:hover {
  border-color: #4f8cff;
}

.mode.active {
  background: #4f8cff;
  border-color: #4f8cff;
  color: white;
}

.header p {
  margin: 0;
  color: #727983;
  font-size: 1rem;
}

/* ---------- Conversation ---------- */

.chat {
  flex: 1;
  overflow-y: auto;
  padding: 56px;
}

.system,
.user {
  max-width: 760px;
  background: white;
  border-radius: 20px;
  padding: 34px;
  margin-bottom: 24px;
  line-height: 1.8;
  box-shadow:
    0 2px 8px rgba(0,0,0,.03),
    0 10px 30px rgba(0,0,0,.03);
}

.system strong {
  display: block;
  margin-bottom: 22px;
  font-size: 1.05rem;
  font-weight: 650;
}

.system p:last-child {
  margin-bottom: 0;
}

.user {
  margin-left: auto;
}

/* ---------- Composer ---------- */

.composer {
  display: flex;
  align-items: end;
  gap: 18px;
  padding: 28px 34px;
  background: white;
  border-top: 1px solid #eceff2;
}

textarea {
  flex: 1;
  resize: none;
  min-height: 72px;
  padding: 18px 20px;
  border: 1px solid #e2e4e8;
  border-radius: 16px;
  background: white;
  font: inherit;
  line-height: 1.6;
  transition: all .15s ease;
}

textarea::placeholder {
  color: #9aa2ad;
}

textarea:focus {
  outline: none;
  border-color: #4f8cff;
  box-shadow: 0 0 0 4px rgba(79,140,255,.08);
}

#send {
  width: 122px;
  height: 72px;
  border: none;
  border-radius: 16px;
  background: #4f8cff;
  color: white;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}

#send:hover {
  filter: brightness(1.03);
}

#send:active {
  transform: translateY(1px);
}