From 9c46609f33c0acccf29e9fb2623cdffb88c15879 Mon Sep 17 00:00:00 2001 From: starmen1265 Date: Sun, 15 Feb 2026 02:03:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E9=80=A0=E4=B8=BA=E6=9A=97=E8=89=B2?= =?UTF-8?q?=E7=A7=91=E6=8A=80=E6=84=9F=E9=A3=8E=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 深色背景配合网格和光晕效果 - 青色/紫色渐变作为主题色 - JetBrains Mono + Space Grotesk 字体组合 - 卡片悬停动效和发光边框 - 科技感按钮和输入框样式 - 代码块和文档内容样式优化 - 响应式布局和自定义滚动条 --- style.css | 726 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 580 insertions(+), 146 deletions(-) diff --git a/style.css b/style.css index a6b03c3..4d4172b 100644 --- a/style.css +++ b/style.css @@ -1,4 +1,26 @@ -/* 知识库网页系统 - 样式 */ +/* 知识库网页系统 - 暗色科技感风格 */ + +@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Space+Grotesk:wght@400;500;600;700&display=swap'); + +:root { + --bg-deep: #0a0e17; + --bg-surface: #111827; + --bg-elevated: #1a2234; + --bg-card: rgba(26, 34, 52, 0.7); + --border: rgba(56, 189, 248, 0.15); + --border-glow: rgba(56, 189, 248, 0.4); + --text-primary: #f1f5f9; + --text-secondary: #94a3b8; + --text-muted: #64748b; + --accent-cyan: #38bdf8; + --accent-blue: #3b82f6; + --accent-purple: #a855f7; + --accent-green: #22c55e; + --gradient-cyber: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 50%, #ec4899 100%); + --gradient-card: linear-gradient(145deg, rgba(56, 189, 248, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%); + --glow-cyan: 0 0 30px rgba(56, 189, 248, 0.3); + --glow-purple: 0 0 30px rgba(168, 85, 247, 0.3); +} * { margin: 0; @@ -7,106 +29,301 @@ } body { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - background: #f5f7fa; - color: #333; + font-family: 'Space Grotesk', -apple-system, sans-serif; + background: var(--bg-deep); + color: var(--text-primary); line-height: 1.6; + min-height: 100vh; + position: relative; + overflow-x: hidden; } -/* 登录页 */ +/* 背景网格效果 */ +body::before { + content: ''; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-image: + linear-gradient(rgba(56, 189, 248, 0.03) 1px, transparent 1px), + linear-gradient(90deg, rgba(56, 189, 248, 0.03) 1px, transparent 1px); + background-size: 50px 50px; + pointer-events: none; + z-index: 0; +} + +/* 光晕效果 */ +body::after { + content: ''; + position: fixed; + top: -50%; + left: -50%; + width: 200%; + height: 200%; + background: radial-gradient(circle at 30% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 40%), + radial-gradient(circle at 70% 80%, rgba(168, 85, 247, 0.06) 0%, transparent 40%); + pointer-events: none; + z-index: 0; + animation: pulse-glow 20s ease-in-out infinite; +} + +@keyframes pulse-glow { + 0%, 100% { opacity: 1; } + 50% { opacity: 0.6; } +} + +/* ============ 登录页 ============ */ .login-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; - background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + position: relative; + z-index: 1; + padding: 20px; +} + +.login-container::before { + content: ''; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 600px; + height: 600px; + background: conic-gradient(from 0deg, transparent, var(--accent-cyan), transparent, var(--accent-purple), transparent); + border-radius: 50%; + opacity: 0.1; + animation: rotate-bg 30s linear infinite; + filter: blur(60px); +} + +@keyframes rotate-bg { + from { transform: translate(-50%, -50%) rotate(0deg); } + to { transform: translate(-50%, -50%) rotate(360deg); } } .login-box { - background: white; - padding: 40px; - border-radius: 12px; - box-shadow: 0 10px 40px rgba(0,0,0,0.2); + background: var(--bg-card); + backdrop-filter: blur(20px); + -webkit-backdrop-filter: blur(20px); + padding: 48px 40px; + border-radius: 20px; + border: 1px solid var(--border); width: 100%; - max-width: 400px; + max-width: 420px; + position: relative; + z-index: 1; + box-shadow: var(--glow-cyan); + animation: float-in 0.6s cubic-bezier(0.16, 1, 0.3, 1); +} + +@keyframes float-in { + from { + opacity: 0; + transform: translateY(30px) scale(0.95); + } + to { + opacity: 1; + transform: translateY(0) scale(1); + } +} + +.login-box::before { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + height: 3px; + background: var(--gradient-cyber); + border-radius: 20px 20px 0 0; } .login-box h1 { text-align: center; - margin-bottom: 30px; - color: #333; + margin-bottom: 8px; + font-size: 28px; + font-weight: 700; + background: var(--gradient-cyber); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; + letter-spacing: -0.5px; +} + +.login-box h1::before { + content: ''; + display: none; +} + +.login-box::after { + content: 'KNOWLEDGE BASE'; + display: block; + text-align: center; + font-size: 11px; + letter-spacing: 4px; + color: var(--text-muted); + margin-bottom: 32px; + font-family: 'JetBrains Mono', monospace; } .form-group { - margin-bottom: 20px; + margin-bottom: 24px; } .form-group label { display: block; margin-bottom: 8px; font-weight: 500; - color: #555; + font-size: 13px; + color: var(--text-secondary); + text-transform: uppercase; + letter-spacing: 1px; + font-family: 'JetBrains Mono', monospace; } .form-group input { width: 100%; - padding: 12px 16px; - border: 2px solid #e1e5eb; - border-radius: 8px; - font-size: 16px; - transition: border-color 0.2s; + padding: 14px 16px; + background: var(--bg-surface); + border: 1px solid var(--border); + border-radius: 10px; + font-size: 15px; + color: var(--text-primary); + font-family: 'Space Grotesk', sans-serif; + transition: all 0.3s ease; +} + +.form-group input::placeholder { + color: var(--text-muted); } .form-group input:focus { outline: none; - border-color: #667eea; + border-color: var(--accent-cyan); + box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15), var(--glow-cyan); + background: var(--bg-elevated); } .btn-primary { width: 100%; - padding: 14px; - background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + padding: 14px 24px; + background: var(--gradient-cyber); color: white; border: none; - border-radius: 8px; - font-size: 16px; + border-radius: 10px; + font-size: 15px; font-weight: 600; cursor: pointer; - transition: transform 0.2s, box-shadow 0.2s; + font-family: 'Space Grotesk', sans-serif; + letter-spacing: 0.5px; + transition: all 0.3s ease; + position: relative; + overflow: hidden; +} + +.btn-primary::before { + content: ''; + position: absolute; + top: 0; + left: -100%; + width: 100%; + height: 100%; + background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); + transition: left 0.5s ease; } .btn-primary:hover { transform: translateY(-2px); - box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4); + box-shadow: 0 8px 25px rgba(56, 189, 248, 0.4); +} + +.btn-primary:hover::before { + left: 100%; +} + +.btn-primary:active { + transform: translateY(0); } .error { - background: #fee; - color: #c00; - padding: 12px; - border-radius: 8px; - margin-bottom: 20px; + background: rgba(239, 68, 68, 0.15); + border: 1px solid rgba(239, 68, 68, 0.3); + color: #f87171; + padding: 12px 16px; + border-radius: 10px; + margin-bottom: 24px; text-align: center; + font-size: 14px; + animation: shake 0.5s ease; } -/* 主页 */ +@keyframes shake { + 0%, 100% { transform: translateX(0); } + 25% { transform: translateX(-5px); } + 75% { transform: translateX(5px); } +} + +/* ============ 主页 ============ */ .dashboard { - max-width: 1000px; + max-width: 1100px; margin: 0 auto; - padding: 20px; + padding: 32px 24px; + position: relative; + z-index: 1; } .header { display: flex; justify-content: space-between; align-items: center; - margin-bottom: 24px; - padding-bottom: 16px; - border-bottom: 2px solid #e1e5eb; + margin-bottom: 32px; + padding-bottom: 20px; + border-bottom: 1px solid var(--border); + animation: fade-down 0.5s ease; +} + +@keyframes fade-down { + from { + opacity: 0; + transform: translateY(-20px); + } + to { + opacity: 1; + transform: translateY(0); + } } .header h1 { - color: #333; + font-size: 24px; + font-weight: 700; + color: var(--text-primary); + display: flex; + align-items: center; + gap: 12px; +} + +.header h1::before { + content: ''; + display: none; +} + +.header h1::after { + content: ''; + width: 8px; + height: 8px; + background: var(--accent-green); + border-radius: 50%; + animation: pulse-dot 2s ease-in-out infinite; + box-shadow: 0 0 10px var(--accent-green); +} + +@keyframes pulse-dot { + 0%, 100% { opacity: 1; transform: scale(1); } + 50% { opacity: 0.5; transform: scale(1.2); } } .user-info { @@ -116,78 +333,132 @@ body { } .user-info span { - color: #666; + color: var(--text-secondary); + font-size: 14px; + font-family: 'JetBrains Mono', monospace; +} + +.user-info span::before { + content: '// '; + color: var(--text-muted); } .btn-logout { - padding: 8px 16px; - background: #f0f0f0; - color: #666; + padding: 10px 20px; + background: transparent; + color: var(--text-secondary); text-decoration: none; - border-radius: 6px; - font-size: 14px; - transition: background 0.2s; + border-radius: 8px; + font-size: 13px; + font-weight: 500; + border: 1px solid var(--border); + transition: all 0.3s ease; + font-family: 'JetBrains Mono', monospace; } .btn-logout:hover { - background: #e0e0e0; + border-color: var(--accent-cyan); + color: var(--accent-cyan); + box-shadow: 0 0 15px rgba(56, 189, 248, 0.2); } /* 搜索栏 */ .search-bar { - margin-bottom: 20px; + margin-bottom: 24px; + animation: fade-up 0.5s ease 0.1s both; +} + +@keyframes fade-up { + from { + opacity: 0; + transform: translateY(20px); + } + to { + opacity: 1; + transform: translateY(0); + } } .search-bar form { display: flex; - gap: 10px; + gap: 12px; } .search-bar input { flex: 1; - padding: 12px 16px; - border: 2px solid #e1e5eb; - border-radius: 8px; - font-size: 16px; + padding: 14px 20px; + background: var(--bg-card); + backdrop-filter: blur(10px); + border: 1px solid var(--border); + border-radius: 12px; + font-size: 15px; + color: var(--text-primary); + font-family: 'Space Grotesk', sans-serif; + transition: all 0.3s ease; +} + +.search-bar input::placeholder { + color: var(--text-muted); } .search-bar input:focus { outline: none; - border-color: #667eea; + border-color: var(--accent-cyan); + box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15); } .search-bar button { - padding: 12px 24px; - background: #667eea; - color: white; - border: none; - border-radius: 8px; + padding: 14px 28px; + background: var(--bg-elevated); + color: var(--accent-cyan); + border: 1px solid var(--accent-cyan); + border-radius: 12px; cursor: pointer; - font-size: 16px; + font-size: 14px; + font-weight: 600; + font-family: 'JetBrains Mono', monospace; + transition: all 0.3s ease; } .search-bar button:hover { - background: #5a6fd6; + background: var(--accent-cyan); + color: var(--bg-deep); + box-shadow: var(--glow-cyan); } .btn-clear { - padding: 12px 16px; - background: #f0f0f0; - color: #666; + padding: 14px 20px; + background: transparent; + color: var(--text-secondary); text-decoration: none; - border-radius: 8px; + border-radius: 12px; + border: 1px solid var(--border); display: flex; align-items: center; + font-size: 14px; + transition: all 0.3s ease; +} + +.btn-clear:hover { + border-color: var(--text-secondary); + color: var(--text-primary); } .stats { - color: #666; - margin-bottom: 16px; + color: var(--text-muted); + margin-bottom: 20px; + font-size: 13px; + font-family: 'JetBrains Mono', monospace; + animation: fade-up 0.5s ease 0.15s both; +} + +.stats::before { + content: '> '; + color: var(--accent-cyan); } .search-hint { - color: #999; - font-size: 14px; + color: var(--text-secondary); } /* 文档列表 */ @@ -195,109 +466,216 @@ body { display: flex; flex-direction: column; gap: 12px; + animation: fade-up 0.5s ease 0.2s both; } .document-card { display: flex; gap: 16px; - padding: 20px; - background: white; - border-radius: 10px; + padding: 20px 24px; + background: var(--bg-card); + backdrop-filter: blur(10px); + border-radius: 14px; text-decoration: none; color: inherit; - transition: transform 0.2s, box-shadow 0.2s; - border: 1px solid #e1e5eb; + border: 1px solid var(--border); + transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); + position: relative; + overflow: hidden; +} + +.document-card::before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: 0; + width: 3px; + background: var(--gradient-cyber); + opacity: 0; + transition: opacity 0.3s ease; +} + +.document-card::after { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: var(--gradient-card); + opacity: 0; + transition: opacity 0.3s ease; } .document-card:hover { - transform: translateY(-2px); - box-shadow: 0 4px 12px rgba(0,0,0,0.1); + transform: translateX(8px); + border-color: var(--border-glow); + box-shadow: var(--glow-cyan); +} + +.document-card:hover::before { + opacity: 1; +} + +.document-card:hover::after { + opacity: 1; } .doc-icon { - font-size: 32px; + font-size: 28px; flex-shrink: 0; + filter: grayscale(0.3); + transition: filter 0.3s ease; + position: relative; + z-index: 1; +} + +.document-card:hover .doc-icon { + filter: grayscale(0); } .doc-info { flex: 1; min-width: 0; + position: relative; + z-index: 1; } .doc-name { - font-size: 18px; + font-size: 16px; font-weight: 600; - color: #333; - margin-bottom: 4px; + color: var(--text-primary); + margin-bottom: 6px; + font-family: 'JetBrains Mono', monospace; } .doc-meta { - font-size: 13px; - color: #999; + font-size: 12px; + color: var(--text-muted); margin-bottom: 8px; + font-family: 'JetBrains Mono', monospace; +} + +.doc-meta .size, +.doc-meta .date { + opacity: 0.8; } .doc-preview { - font-size: 14px; - color: #666; + font-size: 13px; + color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + line-height: 1.5; } .empty { text-align: center; - padding: 60px 20px; - color: #999; - font-size: 18px; + padding: 80px 20px; + color: var(--text-muted); + font-size: 16px; + animation: fade-up 0.5s ease; } -/* 文档查看页 */ +.empty::before { + content: '[ ]'; + display: block; + font-family: 'JetBrains Mono', monospace; + font-size: 48px; + color: var(--border); + margin-bottom: 16px; +} + +/* 文件夹分隔符 */ +.folder-separator { + padding: 14px 20px; + background: var(--bg-elevated); + border-left: 3px solid var(--accent-purple); + margin: 8px 0; + font-weight: 600; + color: var(--text-secondary); + font-size: 13px; + font-family: 'JetBrains Mono', monospace; + border-radius: 0 8px 8px 0; + letter-spacing: 0.5px; + animation: fade-up 0.3s ease; +} + +.folder-separator::before { + content: none; +} + +/* ============ 文档查看页 ============ */ .view-page { max-width: 900px; margin: 0 auto; - padding: 20px; + padding: 32px 24px; + position: relative; + z-index: 1; } .view-page .header { flex-direction: column; align-items: flex-start; - gap: 12px; + gap: 16px; + animation: fade-down 0.5s ease; } .folder-info { - color: #666; - font-size: 14px; + color: var(--text-muted); + font-size: 12px; + font-family: 'JetBrains Mono', monospace; margin-top: 4px; } +.folder-info::before { + content: '~/ '; + color: var(--accent-cyan); +} + .btn-back { - display: inline-block; - padding: 8px 16px; - background: #f0f0f0; - color: #666; + display: inline-flex; + align-items: center; + gap: 8px; + padding: 10px 18px; + background: transparent; + color: var(--text-secondary); text-decoration: none; - border-radius: 6px; - font-size: 14px; + border-radius: 8px; + font-size: 13px; + border: 1px solid var(--border); + font-family: 'JetBrains Mono', monospace; + transition: all 0.3s ease; } .btn-back:hover { - background: #e0e0e0; + border-color: var(--accent-cyan); + color: var(--accent-cyan); +} + +.btn-back::before { + content: '←'; } .document-content { - background: white; - padding: 40px; - border-radius: 10px; - border: 1px solid #e1e5eb; + background: var(--bg-card); + backdrop-filter: blur(10px); + padding: 48px; + border-radius: 16px; + border: 1px solid var(--border); line-height: 1.8; + animation: fade-up 0.5s ease 0.1s both; } .document-content h1 { - font-size: 28px; - margin: 24px 0 16px 0; - padding-bottom: 12px; - border-bottom: 2px solid #e1e5eb; + font-size: 32px; + margin: 32px 0 20px 0; + padding-bottom: 16px; + border-bottom: 1px solid var(--border); + color: var(--text-primary); + font-weight: 700; } .document-content h1:first-child { @@ -305,87 +683,110 @@ body { } .document-content h2 { - font-size: 22px; - margin: 20px 0 12px 0; + font-size: 24px; + margin: 28px 0 16px 0; + color: var(--text-primary); + font-weight: 600; } .document-content h3 { font-size: 18px; - margin: 16px 0 8px 0; + margin: 20px 0 12px 0; + color: var(--accent-cyan); + font-weight: 600; } .document-content p { margin-bottom: 16px; + color: var(--text-secondary); } .document-content ul { margin: 16px 0; padding-left: 24px; + color: var(--text-secondary); } .document-content li { margin-bottom: 8px; } +.document-content li::marker { + color: var(--accent-cyan); +} + .document-content code { - background: #f5f5f5; - padding: 2px 6px; - border-radius: 4px; - font-family: "SF Mono", Monaco, "Courier New", monospace; - font-size: 14px; + background: var(--bg-surface); + padding: 3px 8px; + border-radius: 6px; + font-family: 'JetBrains Mono', monospace; + font-size: 13px; + color: var(--accent-cyan); + border: 1px solid var(--border); } .document-content pre { - background: #2d2d2d; - color: #f8f8f2; - padding: 16px; - border-radius: 8px; + background: var(--bg-surface); + padding: 20px; + border-radius: 12px; overflow-x: auto; - margin: 16px 0; + margin: 20px 0; + border: 1px solid var(--border); } .document-content pre code { background: none; padding: 0; - color: inherit; + border: none; + color: var(--text-primary); } .document-content a { - color: #667eea; + color: var(--accent-cyan); text-decoration: none; + border-bottom: 1px dashed var(--accent-cyan); + transition: all 0.2s ease; } .document-content a:hover { - text-decoration: underline; + color: var(--accent-purple); + border-color: var(--accent-purple); } /* 搜索高亮 */ mark { - background: #fff3cd; - padding: 1px 4px; - border-radius: 3px; + background: rgba(250, 204, 21, 0.3); + color: #fde047; + padding: 2px 6px; + border-radius: 4px; } -/* 文件夹分隔符 */ -.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) { +/* ============ 响应式 ============ */ +@media (max-width: 640px) { .login-box { - margin: 20px; - padding: 30px; + margin: 16px; + padding: 32px 24px; + } + + .header { + flex-direction: column; + gap: 16px; + align-items: flex-start; + } + + .search-bar form { + flex-wrap: wrap; + } + + .search-bar input { + width: 100%; + } + + .search-bar button, + .btn-clear { + flex: 1; + text-align: center; + justify-content: center; } .document-card { @@ -397,6 +798,39 @@ mark { } .document-content { - padding: 20px; + padding: 24px; + } + + .document-content h1 { + font-size: 24px; + } + + .document-content h2 { + font-size: 20px; } } + +/* ============ 滚动条 ============ */ +::-webkit-scrollbar { + width: 8px; + height: 8px; +} + +::-webkit-scrollbar-track { + background: var(--bg-surface); +} + +::-webkit-scrollbar-thumb { + background: var(--border); + border-radius: 4px; +} + +::-webkit-scrollbar-thumb:hover { + background: var(--accent-cyan); +} + +/* ============ 选中文本 ============ */ +::selection { + background: rgba(56, 189, 248, 0.3); + color: var(--text-primary); +}