:root {
  --bg: #0f172a;
  --card: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --border: rgba(148, 163, 184, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans TC", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1e293b 0%, #0f172a 55%);
  color: var(--text);
}

.app-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px;
}

.app-header {
  text-align: center;
  margin-bottom: 20px;
}

.app-header h1 {
  margin: 0;
  font-size: clamp(2rem, 2.5vw, 2.8rem);
}

.app-header p {
  margin: 10px auto 0;
  color: var(--muted);
  max-width: 640px;
}

.chat-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  min-height: 520px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.chat-message {
  max-width: 80%;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.65;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.25);
}

.user-message {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(14, 165, 233, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.bot-message {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.chat-input-form {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.chat-input-form input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  outline: none;
  font-size: 1rem;
}

.chat-input-form button {
  border: none;
  border-radius: 14px;
  padding: 14px 22px;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #0f172a;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chat-input-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(56, 189, 248, 0.18);
}

@media (max-width: 640px) {
  .app-shell {
    padding: 16px;
  }
  .chat-container {
    min-height: 420px;
  }
}
