:root {
  --bg: #071120;
  --bg-soft: #0d1b31;
  --panel: rgba(17, 28, 48, 0.96);
  --panel-2: rgba(23, 37, 61, 0.98);
  --text: #edf4ff;
  --muted: #9db3d8;
  --blue: #2563eb;
  --blue-soft: #60a5fa;
  --cyan: #22d3ee;
  --yellow: #facc15;
  --border: rgba(255,255,255,0.08);
  --shadow: 0 20px 50px rgba(0,0,0,0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.20), transparent 25%),
    radial-gradient(circle at bottom right, rgba(34, 211, 238, 0.15), transparent 25%),
    linear-gradient(180deg, #040b16 0%, #071120 100%);
  color: var(--text);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px 1fr;
}

.sidebar {
  padding: 28px 22px;
  border-right: 1px solid var(--border);
  background: rgba(8, 18, 34, 0.75);
  backdrop-filter: blur(10px);
}

.brand {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}

.brand-main {
  color: white;
}

.brand-accent {
  color: var(--yellow);
}

.sidebar-subtitle {
  color: var(--muted);
  margin-bottom: 24px;
  font-weight: 600;
}

.sidebar-card {
  background: linear-gradient(180deg, rgba(17,28,48,0.95), rgba(23,37,61,0.95));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.sidebar-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.sidebar-card p {
  color: var(--muted);
  line-height: 1.7;
  margin: 6px 0;
}

.chip {
  display: inline-block;
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.20);
  color: #bfdbfe;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 12px;
}

.main-panel {
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.topbar {
  margin-bottom: 20px;
}

.topbar h1 {
  margin: 0 0 10px 0;
  font-size: 36px;
}

.topbar p {
  margin: 0;
  color: var(--muted);
}

.chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(17,28,48,0.94), rgba(23,37,61,0.96));
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.message {
  display: flex;
  margin-bottom: 16px;
}

.message.user {
  justify-content: flex-end;
}

.message.bot {
  justify-content: flex-start;
}

.bubble {
  max-width: 75%;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.message.bot .bubble {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border: 1px solid var(--border);
}

.message.user .bubble {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-soft) 100%);
  color: white;
}

.chat-form {
  border-top: 1px solid var(--border);
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 14px;
  background: rgba(8, 18, 34, 0.55);
}

.chat-form textarea {
  resize: none;
  min-height: 72px;
  max-height: 140px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  outline: none;
  background: rgba(255,255,255,0.04);
  color: white;
  font-size: 15px;
}

.chat-form textarea::placeholder {
  color: #89a0c7;
}

.chat-form button {
  border: none;
  border-radius: 16px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 100%);
  color: white;
  font-size: 15px;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .chat-form {
    grid-template-columns: 1fr;
  }

  .topbar h1 {
    font-size: 28px;
  }

  .bubble {
    max-width: 100%;
  }
}
