/* Prompt Generator — 全局样式 */ /* 暗色主题变量 */ :root { --bg-primary: #ffffff; --bg-secondary: #f8fafc; --bg-tertiary: #f1f5f9; --text-primary: #0f172a; --text-secondary: #475569; --text-muted: #94a3b8; --border-color: #e2e8f0; --accent-color: #3b82f6; --accent-hover: #2563eb; --success-color: #22c55e; --danger-color: #ef4444; --warning-color: #f59e0b; --shadow-sm: 0 1px 2px rgba(0,0,0,0.05); --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1); --radius: 8px; } [data-theme="dark"] { --bg-primary: #0f172a; --bg-secondary: #1e293b; --bg-tertiary: #334155; --text-primary: #f1f5f9; --text-secondary: #94a3b8; --text-muted: #64748b; --border-color: #334155; --accent-color: #60a5fa; --accent-hover: #3b82f6; --shadow-sm: 0 1px 2px rgba(0,0,0,0.2); --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3); } * { box-sizing: border-box; margin: 0; padding: 0; } html, body { height: 100%; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: var(--bg-secondary); color: var(--text-primary); display: flex; flex-direction: column; min-height: 100vh; } /* 导航栏 */ .navbar { background: var(--bg-primary); border-bottom: 1px solid var(--border-color); padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; z-index: 100; box-shadow: var(--shadow-sm); } /* 主内容区 */ .main-content { flex: 1; overflow: hidden; } .nav-brand { font-size: 18px; font-weight: 700; color: var(--accent-color); display: flex; align-items: center; gap: 8px; } .nav-tabs { display: flex; gap: 4px; } .nav-tab { padding: 8px 16px; border-radius: 6px; color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 500; transition: all 0.15s; cursor: pointer; } .nav-tab:hover { background: var(--bg-tertiary); color: var(--text-primary); } .nav-tab.active { background: var(--accent-color); color: white; } .nav-actions { display: flex; align-items: center; gap: 12px; } /* 按钮 */ .btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; border: 1px solid var(--border-color); background: var(--bg-primary); color: var(--text-primary); transition: all 0.15s; white-space: nowrap; } .btn:hover { background: var(--bg-tertiary); } .btn-primary { background: var(--accent-color); color: white; border-color: var(--accent-color); } .btn-primary:hover { background: var(--accent-hover); } .btn-danger { background: var(--danger-color); color: white; border-color: var(--danger-color); } .btn-danger:hover { opacity: 0.9; } .btn-sm { padding: 4px 10px; font-size: 12px; } .btn:disabled { opacity: 0.5; cursor: not-allowed; } /* 输入框 */ .input, .textarea, .select { padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 6px; font-size: 14px; background: var(--bg-primary); color: var(--text-primary); width: 100%; transition: border-color 0.15s; } .input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); } .textarea { resize: vertical; min-height: 80px; font-family: inherit; } /* 卡片 */ .card { background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius); box-shadow: var(--shadow-sm); } .card-header { padding: 12px 16px; border-bottom: 1px solid var(--border-color); font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: space-between; } .card-body { padding: 16px; } /* 复选框和单选框 */ .checkbox-group, .radio-group { display: flex; flex-direction: column; gap: 8px; } .checkbox-label, .radio-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--text-primary); } .checkbox-label input, .radio-label input { accent-color: var(--accent-color); width: 16px; height: 16px; } /* 可折叠区域 */ .collapse-header { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; user-select: none; border-radius: 6px; transition: background 0.15s; } .collapse-header:hover { background: var(--bg-tertiary); } .collapse-arrow { transition: transform 0.2s; font-size: 12px; color: var(--text-muted); } .collapse-header.open .collapse-arrow { transform: rotate(90deg); } .collapse-content { display: none; padding: 8px 12px 8px 32px; } .collapse-content.open { display: block; } /* 标签 */ .tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; } .tag-system { background: #dbeafe; color: #1d4ed8; } .tag-personal { background: #dcfce7; color: #15803d; } [data-theme="dark"] .tag-system { background: #1e3a5f; color: #93c5fd; } [data-theme="dark"] .tag-personal { background: #14532d; color: #86efac; } /* 加载状态 */ .spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--border-color); border-top-color: var(--accent-color); border-radius: 50%; animation: spin 0.6s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } /* 消息提示 */ .toast { position: fixed; top: 72px; right: 24px; padding: 12px 20px; border-radius: 8px; font-size: 14px; z-index: 1000; animation: slideIn 0.3s ease; box-shadow: var(--shadow-md); } .toast-success { background: var(--success-color); color: white; } .toast-error { background: var(--danger-color); color: white; } @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } } /* 模态框 */ .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 200; } .modal { background: var(--bg-primary); border-radius: 12px; box-shadow: var(--shadow-md); width: 100%; max-width: 480px; padding: 24px; } .modal-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; } /* 分页 */ .pagination { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 16px 0; } /* 搜索框 */ .search-box { position: relative; } .search-box .input { padding-left: 36px; } .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; } /* 工具类 */ .flex { display: flex; } .flex-col { flex-direction: column; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .p-4 { padding: 16px; } .p-6 { padding: 24px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .text-sm { font-size: 13px; } .text-xs { font-size: 12px; } .text-muted { color: var(--text-muted); } .font-medium { font-weight: 500; } .font-bold { font-weight: 700; } .w-full { width: 100%; } .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hidden { display: none !important; } .selected-session { background: var(--bg-tertiary) !important; border-left: 3px solid var(--accent-color); }