:root {
  --ai-blue: #1677ff;
  --ai-cyan: #16c7ff;
  --dark: #071326;
  --panel: rgba(9, 25, 52, .94);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
  background: radial-gradient(circle at 20% 10%, #123b70, #050b18 55%, #02050b);
  min-height: 100vh;
  color: #fff;
}
.chat-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.chat-card {
  width: min(720px, 100%);
  height: min(820px, calc(100vh - 40px));
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid rgba(79, 190, 255, .35);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0,0,0,.45), 0 0 40px rgba(22,119,255,.12);
  overflow: hidden;
}
.chat-header {
  display: flex; gap: 14px; align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(22,119,255,.28), rgba(22,199,255,.08));
}
.bot-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, var(--ai-blue), var(--ai-cyan));
  box-shadow: 0 0 24px rgba(22,199,255,.35);
}
h1 { font-size: 19px; margin: 0 0 4px; }
.chat-header p { margin: 0; color: #b9c9df; font-size: 13px; }
.quick-buttons { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px 4px; }
.quick-buttons button {
  border: 1px solid rgba(92,190,255,.3); background: rgba(255,255,255,.06);
  color: #eaf5ff; border-radius: 999px; padding: 8px 12px; cursor: pointer;
}
.quick-buttons button:hover { background: rgba(22,119,255,.25); }
.messages { flex: 1; overflow-y: auto; padding: 16px; }
.msg { display: flex; margin: 10px 0; }
.msg.user { justify-content: flex-end; }
.bubble {
  max-width: 82%; padding: 11px 14px; border-radius: 16px;
  line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg.bot .bubble { background: #12243f; border: 1px solid #203b60; }
.msg.user .bubble { background: linear-gradient(135deg, #1267e8, #159cd9); }
.input-area { display: flex; gap: 8px; padding: 14px; border-top: 1px solid rgba(255,255,255,.08); }
textarea {
  flex: 1; resize: none; min-height: 44px; max-height: 120px;
  border: 1px solid #315071; border-radius: 14px; padding: 12px;
  background: #08172b; color: #fff; outline: none; font: inherit;
}
textarea:focus { border-color: var(--ai-cyan); box-shadow: 0 0 0 2px rgba(22,199,255,.12); }
#sendButton {
  align-self: stretch; border: 0; border-radius: 14px; padding: 0 18px;
  background: linear-gradient(135deg, var(--ai-blue), var(--ai-cyan));
  color: #fff; font-weight: 700; cursor: pointer;
}
#sendButton:disabled { opacity: .55; cursor: wait; }
.notice { margin: 0; padding: 0 16px 12px; font-size: 11px; color: #8fa5c2; }
@media (max-width: 600px) {
  .chat-page { padding: 0; }
  .chat-card { height: 100vh; border-radius: 0; }
  .bubble { max-width: 90%; }
  .quick-buttons { overflow-x: auto; flex-wrap: nowrap; }
  .quick-buttons button { white-space: nowrap; }
}
