/* 知识库网页系统 - 样式 */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: #f5f7fa; color: #333; line-height: 1.6; } /* 登录页 */ .login-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); } .login-box { background: white; padding: 40px; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); width: 100%; max-width: 400px; } .login-box h1 { text-align: center; margin-bottom: 30px; color: #333; } .form-group { margin-bottom: 20px; } .form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: #555; } .form-group input { width: 100%; padding: 12px 16px; border: 2px solid #e1e5eb; border-radius: 8px; font-size: 16px; transition: border-color 0.2s; } .form-group input:focus { outline: none; border-color: #667eea; } .btn-primary { width: 100%; padding: 14px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; } .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4); } .error { background: #fee; color: #c00; padding: 12px; border-radius: 8px; margin-bottom: 20px; text-align: center; } /* 主页 */ .dashboard { max-width: 1000px; margin: 0 auto; padding: 20px; } .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid #e1e5eb; } .header h1 { color: #333; } .user-info { display: flex; align-items: center; gap: 16px; } .user-info span { color: #666; } .btn-logout { padding: 8px 16px; background: #f0f0f0; color: #666; text-decoration: none; border-radius: 6px; font-size: 14px; transition: background 0.2s; } .btn-logout:hover { background: #e0e0e0; } /* 搜索栏 */ .search-bar { margin-bottom: 20px; } .search-bar form { display: flex; gap: 10px; } .search-bar input { flex: 1; padding: 12px 16px; border: 2px solid #e1e5eb; border-radius: 8px; font-size: 16px; } .search-bar input:focus { outline: none; border-color: #667eea; } .search-bar button { padding: 12px 24px; background: #667eea; color: white; border: none; border-radius: 8px; cursor: pointer; font-size: 16px; } .search-bar button:hover { background: #5a6fd6; } .btn-clear { padding: 12px 16px; background: #f0f0f0; color: #666; text-decoration: none; border-radius: 8px; display: flex; align-items: center; } .stats { color: #666; margin-bottom: 16px; } .search-hint { color: #999; font-size: 14px; } /* 文档列表 */ .document-list { display: flex; flex-direction: column; gap: 12px; } .document-card { display: flex; gap: 16px; padding: 20px; background: white; border-radius: 10px; text-decoration: none; color: inherit; transition: transform 0.2s, box-shadow 0.2s; border: 1px solid #e1e5eb; } .document-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); } .doc-icon { font-size: 32px; flex-shrink: 0; } .doc-info { flex: 1; min-width: 0; } .doc-name { font-size: 18px; font-weight: 600; color: #333; margin-bottom: 4px; } .doc-meta { font-size: 13px; color: #999; margin-bottom: 8px; } .doc-preview { font-size: 14px; color: #666; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .empty { text-align: center; padding: 60px 20px; color: #999; font-size: 18px; } /* 文档查看页 */ .view-page { max-width: 900px; margin: 0 auto; padding: 20px; } .view-page .header { flex-direction: column; align-items: flex-start; gap: 12px; } .folder-info { color: #666; font-size: 14px; margin-top: 4px; } .btn-back { display: inline-block; padding: 8px 16px; background: #f0f0f0; color: #666; text-decoration: none; border-radius: 6px; font-size: 14px; } .btn-back:hover { background: #e0e0e0; } .document-content { background: white; padding: 40px; border-radius: 10px; border: 1px solid #e1e5eb; line-height: 1.8; } .document-content h1 { font-size: 28px; margin: 24px 0 16px 0; padding-bottom: 12px; border-bottom: 2px solid #e1e5eb; } .document-content h1:first-child { margin-top: 0; } .document-content h2 { font-size: 22px; margin: 20px 0 12px 0; } .document-content h3 { font-size: 18px; margin: 16px 0 8px 0; } .document-content p { margin-bottom: 16px; } .document-content ul { margin: 16px 0; padding-left: 24px; } .document-content li { margin-bottom: 8px; } .document-content code { background: #f5f5f5; padding: 2px 6px; border-radius: 4px; font-family: "SF Mono", Monaco, "Courier New", monospace; font-size: 14px; } .document-content pre { background: #2d2d2d; color: #f8f8f2; padding: 16px; border-radius: 8px; overflow-x: auto; margin: 16px 0; } .document-content pre code { background: none; padding: 0; color: inherit; } .document-content a { color: #667eea; text-decoration: none; } .document-content a:hover { text-decoration: underline; } /* 搜索高亮 */ mark { background: #fff3cd; padding: 1px 4px; border-radius: 3px; } /* 文件夹分隔符 */ .folder-separator { padding: 16px 20px; background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); border-left: 4px solid #667eea; margin: 16px 0 8px 0; font-weight: 600; color: #495057; font-size: 14px; } .folder-separator:first-child { margin-top: 0; } /* 文档查看页 */ @media (max-width: 600px) { .login-box { margin: 20px; padding: 30px; } .document-card { padding: 16px; } .doc-icon { display: none; } .document-content { padding: 20px; } }