* { box-sizing: border-box; }

body {
  margin: 0;
  height: 100vh;
  background: #0f0f0f;
  color: #e5e7eb;
  font-family: system-ui, sans-serif;
  display: flex;
}

/* SIDEBAR */
#sidebar {
  width: 260px;
  background: #111;
  border-right: 1px solid #1f2937;
  position: fixed;
  top: 0;
  bottom: 0;
  left: -260px;
  transition: left .25s;
  display: flex;
  flex-direction: column;
}
#sidebar.active { left: 0; }

.sidebar-top { padding: 12px; flex: 1; }
.new-chat {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: #fff;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
}
.history-title {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 8px;
}
.history-item {
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
}
.history-item:hover,
.history-item.active {
  background: #1f2937;
}
.sidebar-bottom {
  padding: 12px;
  border-top: 1px solid #1f2937;
}

/* APP */
.app {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* HEADER */
.header {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-bottom: 1px solid #1f2937;
}
.burger {
  background: none;
  border: none;
  font-size: 22px;
  color: #fff;
  cursor: pointer;
}
.logo { font-weight: 600; }

/* WELCOME CENTER */
#welcome {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}
#welcome h1 {
  margin-bottom: 8px;
}
#welcome p {
  color: #9ca3af;
  margin-bottom: 20px;
}

/* CENTER INPUT */
.center-input {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 520px;
}
.center-input input {
  flex: 1;
  padding: 14px 16px;
  border-radius: 999px;
  border: none;
  background: #171717;
  color: #fff;
}
.center-input button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: #000;
  font-size: 18px;
  cursor: pointer;
}

/* CHAT */
#chat {
  flex: 1;
  padding: 24px 16px 120px;
  overflow-y: auto;
}
.msg-user,
.msg-ai {
  max-width: 800px;
  margin: 0 auto 16px;
}
.msg-user { text-align: right; }
.msg-ai {
  background: #171717;
  padding: 16px;
  border-radius: 12px;
}

/* BOTTOM INPUT */
.composer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: #0f0f0f;
  border-top: 1px solid #1f2937;
}
.composer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
}
.composer-inner input {
  flex: 1;
  padding: 14px 16px;
  border-radius: 999px;
  border: none;
  background: #171717;
  color: #fff;
}
.composer-inner button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: none;
  font-size: 18px;
}

/* HIDDEN */
.hidden { display: none; }
