文件
2026-06-04 22:42:27 +08:00

781 行
14 KiB
CSS

:root {
--bg-primary: #f5f5f5;
--bg-secondary: #ffffff;
--bg-tertiary: #fafafa;
--bg-hover: #f5f5f5;
--text-primary: #333333;
--text-secondary: #666666;
--text-tertiary: #999999;
--border-color: #e0e0e0;
--accent-color: #07c160;
--accent-hover: #00a86b;
--shadow-color: rgba(0, 0, 0, 0.1);
--shadow-hover: rgba(0, 0, 0, 0.15);
}
body.dark-mode {
--bg-primary: #1a1a1a;
--bg-secondary: #2d2d2d;
--bg-tertiary: #3d3d3d;
--bg-hover: #4d4d4d;
--text-primary: #ffffff;
--text-secondary: #b8b8b8;
--text-tertiary: #888888;
--border-color: #3d3d3d;
--accent-color: #4caf50;
--accent-hover: #66bb6a;
--shadow-color: rgba(0, 0, 0, 0.3);
--shadow-hover: rgba(0, 0, 0, 0.4);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: var(--bg-primary);
margin: 0;
padding: 0;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
color: var(--text-primary);
transition: background-color 0.3s ease, color 0.3s ease;
}
/* 通用容器样式 */
.doc-container,
.api-doc-container,
.terms-container {
max-width: 1200px;
margin: 20px auto 40px;
background: var(--bg-secondary);
padding: 40px;
border-radius: 10px;
box-shadow: 0 2px 10px var(--shadow-color);
transition: all 0.3s ease;
}
/* 通用头部样式 */
.doc-header,
.api-doc-header,
.terms-header {
text-align: center;
margin-bottom: 40px;
padding-bottom: 20px;
border-bottom: 2px solid var(--accent-color);
}
.api-doc-header {
background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
color: white;
padding: 40px 20px;
border-radius: 12px;
}
.doc-header h1,
.api-doc-header h1,
.terms-header h1 {
font-size: 32px;
margin-bottom: 15px;
font-weight: 700;
color: var(--accent-color);
}
.api-doc-header h1 {
color: white;
font-size: 36px;
}
.doc-header p,
.api-doc-header p,
.terms-header p {
color: var(--text-secondary);
font-size: 14px;
}
.api-doc-header p {
color: rgba(255, 255, 255, 0.9);
font-size: 16px;
}
/* 通用内容样式 */
.doc-content,
.terms-section,
.api-section {
margin-bottom: 30px;
}
.doc-content h2,
.terms-section h2,
.api-section h2 {
color: var(--text-primary);
font-size: 24px;
margin-top: 30px;
margin-bottom: 15px;
padding-left: 10px;
border-left: 4px solid var(--accent-color);
}
.api-section h2 {
font-size: 28px;
padding-bottom: 15px;
border-bottom: 2px solid var(--accent-color);
border-left: none;
padding-left: 0;
}
.doc-content h3,
.terms-section h3,
.api-section h3 {
color: var(--text-secondary);
font-size: 18px;
margin: 15px 0 10px 0;
}
.api-section h3 {
font-size: 22px;
}
.doc-content p,
.terms-section p,
.api-section p {
color: var(--text-secondary);
line-height: 1.8;
margin-bottom: 15px;
}
.terms-section p {
text-align: justify;
}
/* 列表样式 */
.terms-section ul,
.api-section ul {
color: var(--text-secondary);
line-height: 1.8;
margin: 10px 0 15px 30px;
}
.terms-section li,
.api-section li {
margin-bottom: 8px;
}
/* API 特有样式 */
.api-endpoint {
background: var(--bg-tertiary);
border-radius: 8px;
padding: 20px;
margin-bottom: 30px;
border-left: 4px solid var(--accent-color);
transition: all 0.3s ease;
}
.api-endpoint h4 {
font-size: 18px;
margin-bottom: 15px;
color: var(--text-primary);
display: flex;
align-items: center;
}
.api-endpoint h4 span {
margin-left: 10px;
font-size: 14px;
font-weight: normal;
color: var(--text-secondary);
}
.api-method {
display: inline-block;
padding: 4px 10px;
border-radius: 4px;
font-size: 12px;
font-weight: bold;
margin-right: 10px;
}
.method-get {
background: var(--accent-color);
color: white;
}
.method-post {
background: #2196F3;
color: white;
}
.api-params {
margin: 20px 0;
}
.api-params h5 {
font-size: 16px;
margin-bottom: 10px;
color: var(--text-secondary);
}
.api-params table {
width: 100%;
border-collapse: collapse;
margin-bottom: 20px;
}
.api-params th,
.api-params td {
padding: 12px;
text-align: left;
border-bottom: 1px solid var(--border-color);
}
.api-params th {
background: var(--bg-tertiary);
font-weight: 600;
color: var(--text-primary);
}
.api-params tr:hover {
background: var(--bg-hover);
}
.api-example {
background: var(--bg-tertiary);
border-radius: 8px;
padding: 20px;
margin: 20px 0;
transition: all 0.3s ease;
}
.api-example h5 {
font-size: 16px;
margin-bottom: 10px;
color: var(--text-secondary);
}
.api-example pre {
background: #333;
color: #f0f0f0;
padding: 15px;
border-radius: 6px;
overflow-x: auto;
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
font-size: 14px;
}
.api-response {
margin: 20px 0;
}
.api-response h5 {
font-size: 16px;
margin-bottom: 10px;
color: var(--text-secondary);
}
.api-tags {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin: 10px 0;
}
.api-tag {
padding: 4px 12px;
border-radius: 12px;
font-size: 12px;
background: #e3f2fd;
color: #1976D2;
}
/* 按钮样式 */
.back-btn,
.back-link {
display: inline-block;
margin-top: 30px;
padding: 12px 24px;
background: var(--accent-color);
color: white;
text-decoration: none;
border-radius: 6px;
font-weight: 500;
transition: all 0.3s ease;
}
.back-btn {
border-radius: 25px;
font-weight: bold;
}
.back-btn:hover,
.back-link:hover {
background: var(--accent-hover);
transform: translateY(-2px);
}
/* 主题切换按钮 */
.theme-toggle-btn {
position: fixed;
top: 20px;
right: 20px;
width: 40px;
height: 40px;
border-radius: 50%;
background: var(--bg-secondary);
border: 1px solid var(--border-color);
color: var(--text-primary);
font-size: 18px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 2px 8px var(--shadow-color);
transition: all 0.3s ease;
z-index: 1000;
}
.theme-toggle-btn:hover {
transform: scale(1.1);
box-shadow: 0 4px 12px var(--shadow-hover);
}
/* 特殊样式 */
.update-date {
color: var(--text-tertiary);
font-size: 12px;
text-align: center;
margin-bottom: 20px;
}
.highlight {
color: #ff4d4f;
font-weight: bold;
}
.terms-footer {
margin-top: 40px;
padding-top: 20px;
border-top: 1px solid var(--border-color);
text-align: center;
color: var(--text-tertiary);
font-size: 14px;
}
/* 响应式设计 */
@media (max-width: 768px) {
.doc-container,
.terms-container,
.api-doc-container {
padding: 20px;
margin: 10px;
}
.doc-header h1,
.terms-header h1,
.api-doc-header h1 {
font-size: 28px;
}
.doc-content h2,
.terms-section h2,
.api-section h2 {
font-size: 24px;
}
.doc-content h3,
.terms-section h3,
.api-section h3 {
font-size: 20px;
}
.api-params table {
font-size: 14px;
}
.api-params th,
.api-params td {
padding: 8px;
}
}
/* 文档中心首页样式 */
.docs-container {
max-width: 1200px;
margin: 0 auto;
padding: 40px 20px;
}
.docs-header {
text-align: center;
margin-bottom: 60px;
padding: 60px 20px;
background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
color: white;
border-radius: 12px;
box-shadow: 0 4px 20px var(--shadow-color);
}
.docs-header h1 {
font-size: 42px;
margin-bottom: 20px;
font-weight: 700;
color: white;
}
.docs-header p {
font-size: 18px;
margin-bottom: 30px;
opacity: 0.9;
color: white;
}
.docs-nav {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
margin-bottom: 60px;
}
.docs-card {
background: var(--bg-secondary);
border-radius: 10px;
padding: 30px;
box-shadow: 0 2px 10px var(--shadow-color);
transition: all 0.3s ease;
}
.docs-card:hover {
transform: translateY(-5px);
box-shadow: 0 8px 25px var(--shadow-hover);
}
.docs-card-icon {
font-size: 48px;
color: var(--accent-color);
margin-bottom: 20px;
}
.docs-card h2 {
font-size: 24px;
margin-bottom: 15px;
color: var(--text-primary);
}
.docs-card p {
color: var(--text-secondary);
line-height: 1.6;
margin-bottom: 20px;
}
.docs-card-link {
display: inline-block;
padding: 10px 20px;
background: var(--accent-color);
color: white;
text-decoration: none;
border-radius: 6px;
font-weight: 500;
transition: all 0.3s ease;
}
.docs-card-link:hover {
background: var(--accent-hover);
transform: translateY(-2px);
}
.docs-features {
background: var(--bg-secondary);
border-radius: 12px;
padding: 50px;
box-shadow: 0 2px 10px var(--shadow-color);
margin-bottom: 60px;
}
.docs-features h2 {
text-align: center;
font-size: 32px;
margin-bottom: 40px;
color: var(--text-primary);
}
.features-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 30px;
}
.feature-item {
text-align: center;
padding: 20px;
}
.feature-icon {
font-size: 36px;
color: var(--accent-color);
margin-bottom: 15px;
}
.feature-item h3 {
font-size: 18px;
margin-bottom: 10px;
color: var(--text-primary);
}
.feature-item p {
color: var(--text-secondary);
line-height: 1.5;
}
.docs-footer {
text-align: center;
padding: 40px 20px;
background: #333;
color: white;
border-radius: 12px;
margin-top: 60px;
}
.docs-footer p {
margin-bottom: 10px;
color: white;
}
.docs-footer-links {
margin-top: 20px;
}
.docs-footer-links a {
color: var(--accent-color);
text-decoration: none;
margin: 0 15px;
transition: color 0.3s ease;
}
.docs-footer-links a:hover {
color: var(--accent-hover);
text-decoration: underline;
}
/* 响应式设计 */
@media (max-width: 768px) {
.doc-container,
.terms-container,
.api-doc-container {
padding: 20px;
margin: 10px;
}
.doc-header h1,
.terms-header h1,
.api-doc-header h1 {
font-size: 28px;
}
.doc-content h2,
.terms-section h2,
.api-section h2 {
font-size: 24px;
}
.doc-content h3,
.terms-section h3,
.api-section h3 {
font-size: 20px;
}
.api-params table {
font-size: 14px;
}
.api-params th,
.api-params td {
padding: 8px;
}
.docs-header {
padding: 40px 20px;
}
.docs-header h1 {
font-size: 32px;
}
.docs-container {
padding: 20px 15px;
}
.docs-features {
padding: 30px 20px;
}
.docs-card {
padding: 20px;
}
}
/* 导航栏样式 */
.navbar {
background: var(--bg-secondary);
box-shadow: 0 2px 10px var(--shadow-color);
position: sticky;
top: 0;
z-index: 1000;
height: 60px;
display: flex;
align-items: center;
transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.navbar-container {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
.navbar-brand {
display: flex;
align-items: center;
}
.navbar-logo {
display: flex;
align-items: center;
text-decoration: none;
color: var(--accent-color);
font-size: 20px;
font-weight: bold;
transition: color 0.3s ease;
}
.navbar-logo i {
font-size: 24px;
margin-right: 8px;
}
.navbar-menu {
display: flex;
align-items: center;
}
.navbar-link {
display: block;
padding: 10px 15px;
text-decoration: none;
color: var(--text-primary);
font-weight: 500;
transition: all 0.3s ease;
border-radius: 4px;
margin: 0 5px;
}
.navbar-link:hover {
color: var(--accent-color);
background: var(--bg-hover);
}
.login-btn {
background: var(--accent-color);
color: white !important;
}
.login-btn:hover {
background: var(--accent-hover) !important;
color: white !important;
}
.navbar-user {
display: flex;
align-items: center;
}
.user-dropdown {
position: relative;
cursor: pointer;
}
.user-name {
display: flex;
align-items: center;
padding: 8px 12px;
border-radius: 20px;
background: var(--bg-tertiary);
font-weight: 500;
transition: all 0.3s ease;
color: var(--text-primary);
}
.user-name:hover {
background: var(--bg-hover);
color: var(--accent-color);
}
.dropdown-menu {
position: absolute;
top: 100%;
right: 0;
margin-top: 8px;
background: var(--bg-secondary);
border-radius: 8px;
box-shadow: 0 4px 16px var(--shadow-hover);
min-width: 180px;
opacity: 0;
visibility: hidden;
transform: translateY(-10px);
transition: all 0.3s ease;
border: 1px solid var(--border-color);
}
.user-dropdown:hover .dropdown-menu {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.dropdown-item {
display: flex;
align-items: center;
padding: 10px 15px;
text-decoration: none;
color: var(--text-primary);
transition: all 0.3s ease;
border-radius: 4px;
margin: 2px;
}
.dropdown-item i {
margin-right: 10px;
font-size: 14px;
color: var(--text-secondary);
}
.dropdown-item:hover {
background: var(--bg-hover);
color: var(--accent-color);
}
.dropdown-item:hover i {
color: var(--accent-color);
}
/* 响应式导航栏 */
@media (max-width: 768px) {
.navbar-menu {
display: none;
}
.navbar-container {
padding: 0 15px;
}
.navbar-logo span {
display: none;
}
.navbar-logo i {
margin-right: 0;
}
}