﻿:root { color-scheme: light; }
body { margin: 0; font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; background: #f0f2f5; color: #1f2937; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 24px; }
.card { background: #fff; border-radius: 16px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); border: 1px solid #eef0f4; }
.hero { padding: 24px 30px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; }
.hero h1 { margin: 0 0 8px; font-size: 26px; color: #111827; }
.hero p { margin: 0; color: #6b7280; font-size: 15px; }
.hero-btn { background: #eff6ff; color: #2563eb; border: none; padding: 8px 16px; border-radius: 8px; cursor: pointer; font-weight: 600; transition: background 0.2s; }
.hero-btn:hover { background: #dbeafe; }
.chat { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
.panel { padding: 20px; display: flex; flex-direction: column; }
.messages { flex: 1; height: 560px; overflow-y: auto; padding: 10px 16px; background: #f8fafc; border-radius: 12px; border: 1px solid #e2e8f0; scroll-behavior: smooth; }
.msg { margin: 16px 0; display: flex; flex-direction: column; animation: fadeIn 0.3s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.msg-content { padding: 14px 18px; border-radius: 14px; line-height: 1.6; font-size: 15px; max-width: 90%; word-break: break-word; }
.msg-content p:first-child { margin-top: 0; }
.msg-content p:last-child { margin-bottom: 0; }
.msg-content pre { background: #1e293b; color: #f8fafc; padding: 12px; border-radius: 8px; overflow-x: auto; }
.msg-content code { font-family: 'Consolas', monospace; background: rgba(0,0,0,0.05); padding: 2px 4px; border-radius: 4px; }
.msg-content pre code { background: none; padding: 0; }
.msg.user { align-items: flex-end; }
.msg.user .msg-content { background: #2563eb; color: #fff; border-bottom-right-radius: 4px; }
.msg.user .msg-content code { background: rgba(255,255,255,0.2); }
.msg.assistant { align-items: flex-start; }
.msg.assistant .msg-content { background: #ffffff; border: 1px solid #e2e8f0; border-bottom-left-radius: 4px; color: #334155; box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
.meta { font-size: 12px; color: #94a3b8; margin-bottom: 6px; padding: 0 4px; }
.input-area { margin-top: 16px; position: relative; }
textarea { width: 100%; height: 120px; resize: none; border-radius: 12px; border: 1px solid #cbd5e1; padding: 14px; font: inherit; box-sizing: border-box; background: #fff; transition: border-color 0.2s; font-size: 15px; }
textarea:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.actions { position: absolute; bottom: 12px; right: 12px; display: flex; align-items: center; gap: 12px; }
button.send-btn { border: 0; background: #2563eb; color: #fff; padding: 8px 20px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; transition: background 0.2s; box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2); }
button.send-btn:hover { background: #1d4ed8; }
button.send-btn:disabled { background: #94a3b8; cursor: not-allowed; box-shadow: none; }
.status { font-size: 13px; color: #64748b; }
.aside h3 { margin: 0 0 14px; font-size: 16px; color: #1e293b; display: flex; align-items: center; gap: 6px; }
.aside h3::before { content: ''; display: block; width: 4px; height: 16px; background: #3b82f6; border-radius: 2px; }
.aside p, .aside li { color: #475569; line-height: 1.6; font-size: 14px; }
.aside ul { padding-left: 20px; margin: 0 0 20px 0; }
.aside li { margin-bottom: 8px; cursor: pointer; transition: color 0.2s; }
.aside li:hover { color: #2563eb; }
.source { padding: 12px; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 10px; background: #f8fafc; }
.source-title { font-weight: 600; color: #1e293b; margin-bottom: 4px; font-size: 13px; }
.source-meta { display: flex; justify-content: space-between; color: #64748b; font-size: 12px; margin-bottom: 6px; }
.source-path { font-size: 11px; color: #94a3b8; word-break: break-all; font-family: monospace; }
.typing-indicator { display: inline-flex; gap: 4px; padding: 4px 8px; }
.typing-dot { width: 6px; height: 6px; background: #cbd5e1; border-radius: 50%; animation: typing 1.4s infinite ease-in-out both; }
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typing { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); background: #3b82f6; } }
.placeholder { color: #94a3b8; font-size: 13px; }
@media (max-width: 900px) { .chat { grid-template-columns: 1fr; } .messages { height: 400px; } }
