/* 魔镜全局样式 */
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;background:#f5f5f7;min-height:100vh}
.gradient-bg{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%)}
.card{background:white;border-radius:16px;padding:24px;box-shadow:0 2px 12px rgba(0,0,0,0.06);transition:all 0.3s}
.card:hover{box-shadow:0 8px 30px rgba(0,0,0,0.1)}
.fade-in{animation:fadeIn 0.4s ease}
@keyframes fadeIn{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}
.nav-item{padding:8px 16px;border-radius:10px;cursor:pointer;transition:all 0.2s;font-size:14px;white-space:nowrap}
.nav-item.active{background:rgba(255,255,255,0.2);font-weight:600}
.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.5);z-index:100;display:flex;align-items:center;justify-content:center}
.modal-box{background:white;border-radius:16px;padding:32px;max-width:520px;width:90%;max-height:80vh;overflow-y:auto}
.badge{display:inline-block;padding:2px 10px;border-radius:12px;font-size:12px;font-weight:500}
.tag{padding:3px 10px;border-radius:8px;font-size:12px;background:#f0f0f0}
.spinner{display:inline-block;width:20px;height:20px;border:2px solid #e0e0e0;border-top-color:#667eea;border-radius:50%;animation:spin 0.8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.template-card{border-color:#e5e7eb}
.template-card:hover{border-color:#c4b5fd}
.line-clamp-2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.chat-container{display:flex;flex-direction:column;gap:12px;padding:12px 16px;overflow-y:auto;scroll-behavior:smooth;max-height:420px;min-height:300px}
.chat-bubble{max-width:85%;padding:12px 16px;border-radius:16px;font-size:14px;line-height:1.6;animation:chatFadeIn 0.3s ease;word-break:break-word}
.chat-bubble-ai{align-self:flex-start;background:linear-gradient(135deg,#f0efff 0%,#e8e4ff 100%);color:#333;border-bottom-left-radius:4px;border:1px solid #ddd6fe}
.chat-bubble-user{align-self:flex-end;background:#fff;color:#333;border-bottom-right-radius:4px;border:1px solid #e5e7eb;box-shadow:0 1px 4px rgba(0,0,0,0.05)}
.chat-bubble-ai .chat-avatar{display:inline-flex;width:28px;height:28px;border-radius:50%;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;align-items:center;justify-content:center;font-size:14px;margin-right:8px;flex-shrink:0}
.chat-input-area{background:#fff;border-top:1px solid #f0f0f0;padding:12px 16px}
.chat-header{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);padding:14px 16px;display:flex;align-items:center;gap:10px;color:#fff}
.chat-header-avatar{width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,0.2);display:flex;align-items:center;justify-content:center;font-size:18px}
.chat-result-box{padding:12px;border-radius:12px;margin-top:8px;animation:chatFadeIn 0.3s ease}
.chat-result-box.success{background:#f0fdf4;border:1px solid #bbf7d0}
.chat-result-box.error{background:#fef2f2;border:1px solid #fecaca}
.chat-result-box.loading{background:#f5f3ff;border:1px solid #ddd6fe}
@keyframes chatFadeIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
.file-list{display:flex;flex-direction:column;gap:8px}
.file-item{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:10px;background:#fafafa;border:1px solid #f0f0f0;transition:all 0.2s;cursor:pointer}
.file-item:hover{border-color:#ddd6fe;background:#f5f3ff}
.file-icon{width:32px;height:32px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:16px;background:#f0efff;color:#667eea;flex-shrink:0}
.file-info{flex:1;min-width:0}
.file-name{font-size:13px;font-weight:500;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.file-meta{font-size:11px;color:#999;margin-top:2px}
.file-empty{padding:32px 16px;text-align:center;color:#ccc;font-size:13px}

/* 通知中心 */
.notif-bell{position:relative;cursor:pointer;font-size:20px;padding:6px 10px;border-radius:10px;transition:all 0.2s;user-select:none}
.notif-bell:hover{background:rgba(102,126,234,0.1)}
.notif-badge{position:absolute;top:-2px;right:-2px;background:#ef4444;color:#fff;font-size:10px;font-weight:700;min-width:18px;height:18px;border-radius:9px;display:flex;align-items:center;justify-content:center;padding:0 4px;border:2px solid #fff}
.notif-badge.hidden{display:none}
.notif-dropdown{position:absolute;top:100%;right:0;width:380px;max-height:480px;overflow-y:auto;background:#fff;border-radius:12px;box-shadow:0 10px 40px rgba(0,0,0,0.15);z-index:200;margin-top:8px;animation:notifIn 0.2s ease}
.notif-dropdown.hidden{display:none}
@keyframes notifIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}
.notif-item{padding:14px 16px;border-bottom:1px solid #f3f4f6;cursor:pointer;transition:background 0.15s;display:flex;gap:12px;align-items:flex-start}
.notif-item:hover{background:#f9fafb}
.notif-item.unread{background:#f0efff}
.notif-item.unread:hover{background:#e8e4ff}
.notif-item .notif-icon{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0}
.notif-item .notif-body{flex:1;min-width:0}
.notif-item .notif-title{font-size:14px;font-weight:600;color:#1f2937;margin-bottom:4px}
.notif-item .notif-content{font-size:12px;color:#6b7280;line-height:1.5}
.notif-item .notif-time{font-size:11px;color:#9ca3af;margin-top:6px}
.notif-item .notif-actions{display:flex;gap:8px;margin-top:8px}
.notif-item .notif-actions button{padding:4px 14px;border-radius:8px;font-size:12px;font-weight:600;cursor:pointer;border:none;transition:all 0.2s}
.notif-item .btn-accept{background:#10b981;color:#fff}
.notif-item .btn-accept:hover{background:#059669}
.notif-item .btn-decline{background:#f3f4f6;color:#6b7280}
.notif-item .btn-decline:hover{background:#e5e7eb;color:#ef4444}
.notif-empty{padding:48px 16px;text-align:center;color:#9ca3af;font-size:14px}
.notif-header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid #f3f4f6;position:sticky;top:0;background:#fff;border-radius:12px 12px 0 0}
.notif-header .notif-title-text{font-size:14px;font-weight:700;color:#1f2937}
.notif-header .notif-mark-read{font-size:12px;color:#667eea;cursor:pointer;font-weight:500}
.notif-header .notif-mark-read:hover{color:#764ba2}
.notif-del-btn{background:none;border:none;color:#9ca3af;font-size:14px;cursor:pointer;padding:4px;flex-shrink:0;margin-top:8px}
.notif-del-btn:hover{color:#ef4444}
