﻿:root {
  --bg: #f6f3eb;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-border: rgba(30, 35, 40, 0.12);
  --text: #1b1f24;
  --muted: #5f6773;
  --accent: #0f766e;
  --accent-2: #b45309;
  --assistant: #ffffff;
  --user: #d9f6f2;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  background: radial-gradient(circle at 20% 10%, #f8dec6 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, #cde9ff 0%, transparent 45%), var(--bg);
  color: var(--text);
  display: grid;
  place-items: center;
  padding: 20px;
}

.bg-shape {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  filter: blur(34px);
  opacity: 0.45;
}

.shape-a {
  width: 320px;
  height: 320px;
  background: #f59e0b;
  top: -90px;
  right: -100px;
}

.shape-b {
  width: 280px;
  height: 280px;
  background: #14b8a6;
  bottom: -80px;
  left: -90px;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  height: min(88vh, 900px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  backdrop-filter: blur(12px);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(20, 22, 26, 0.16);
}

.topbar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--panel-border);
  background: linear-gradient(120deg, rgba(15, 118, 110, 0.08), rgba(180, 83, 9, 0.08));
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.3px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.chat {
  padding: 18px;
  overflow: auto;
  display: grid;
  gap: 12px;
  align-content: start;
}

.msg {
  display: grid;
  gap: 6px;
  max-width: 84%;
  animation: fadeUp 0.22s ease;
}

.msg.user {
  justify-self: end;
}

.msg.assistant {
  justify-self: start;
}

.meta {
  font-size: 12px;
  color: var(--muted);
}

.bubble {
  border-radius: 16px;
  padding: 11px 13px;
  line-height: 1.48;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid var(--panel-border);
}

.msg.user .bubble {
  background: var(--user);
}

.msg.assistant .bubble {
  background: var(--assistant);
}

.composer {
  border-top: 1px solid var(--panel-border);
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  background: rgba(255, 255, 255, 0.7);
}

#input {
  width: 100%;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  resize: none;
  padding: 12px;
  font: inherit;
  max-height: 180px;
  outline: none;
  background: white;
}

#send {
  border: none;
  border-radius: 14px;
  padding: 0 18px;
  font: inherit;
  font-weight: 600;
  color: white;
  background: linear-gradient(140deg, var(--accent), #0a5d57);
  cursor: pointer;
}

#send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

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

@media (max-width: 720px) {
  body {
    padding: 10px;
  }

  .shell {
    height: 94vh;
    border-radius: 16px;
  }

  .msg {
    max-width: 94%;
  }
}

