/* ==================== 全局重置 ==================== */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } html { font-size: 16px; scroll-behavior: smooth; } body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background-color: #f8fafc; color: #1a202c; line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; } /* ==================== 导航栏 ==================== */ .navbar { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(0, 0, 0, 0.05); padding: 0.75rem 1.5rem; } .nav-container { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; } .nav-brand { font-size: 1.25rem; font-weight: 700; color: #2d3748; text-decoration: none; } .nav-links { list-style: none; display: flex; gap: 1.5rem; } .nav-links a { text-decoration: none; color: #4a5568; font-weight: 500; transition: color 0.2s; } .nav-links a:hover { color: #3182ce; } /* ==================== 主内容区 ==================== */ .main-content { flex: 1; max-width: 1200px; margin: 2rem auto; padding: 0 1.5rem; width: 100%; } /* ==================== 瀑布流布局 ==================== */ .waterfall { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; } /* ==================== 卡片 ==================== */ .card { background: #ffffff; border-radius: 20px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease; display: flex; flex-direction: column; } .card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1); } .card-image { width: 100%; height: 180px; overflow: hidden; } .card-image img { width: 100%; height: 100%; object-fit: cover; display: block; } .card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; } .card-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.3; } .card-title a { color: #2d3748; text-decoration: none; transition: color 0.2s; } .card-title a:hover { color: #3182ce; } .card-date { display: block; font-size: 0.875rem; color: #a0aec0; margin-bottom: 0.75rem; } .card-summary { color: #718096; font-size: 0.9375rem; line-height: 1.6; flex: 1; margin-bottom: 1rem; } .card-link { color: #3182ce; text-decoration: none; font-weight: 500; font-size: 0.9375rem; transition: color 0.2s; align-self: flex-start; } .card-link:hover { color: #2b6cb0; } /* ==================== 空状态 ==================== */ .empty-state { grid-column: 1 / -1; text-align: center; padding: 4rem 1rem; color: #a0aec0; font-size: 1.125rem; } .empty-state a { color: #3182ce; text-decoration: none; } /* ==================== 上传表单 ==================== */ .upload-container { max-width: 600px; margin: 0 auto; } .upload-container h1 { margin-bottom: 1.5rem; font-size: 1.75rem; font-weight: 700; } .upload-form { display: flex; flex-direction: column; gap: 1.25rem; } .form-group { display: flex; flex-direction: column; gap: 0.5rem; } .form-group label { font-weight: 600; color: #2d3748; } .form-group input[type="text"], .form-group input[type="file"] { padding: 0.625rem 0.75rem; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 1rem; transition: border-color 0.2s; } .form-group input[type="text"]:focus, .form-group input[type="file"]:focus { outline: none; border-color: #3182ce; box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1); } /* ==================== 按钮 ==================== */ .btn { display: inline-block; padding: 0.625rem 1.25rem; border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background-color 0.2s, transform 0.1s; } .btn:active { transform: scale(0.98); } .btn-primary { background-color: #3182ce; color: #ffffff; } .btn-primary:hover { background-color: #2b6cb0; } .btn-danger { background-color: #e53e3e; color: #ffffff; } .btn-danger:hover { background-color: #c53030; } /* ==================== 管理页面表格 ==================== */ .admin-container { max-width: 900px; margin: 0 auto; } .admin-container h1 { margin-bottom: 1.5rem; font-size: 1.75rem; font-weight: 700; } .admin-table { width: 100%; border-collapse: collapse; background: #ffffff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); } .admin-table th, .admin-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid #e2e8f0; } .admin-table th { background-color: #f7fafc; font-weight: 600; color: #4a5568; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; } .admin-table td a { color: #3182ce; text-decoration: none; } .admin-table td a:hover { text-decoration: underline; } /* ==================== 页脚 ==================== */ .footer { text-align: center; padding: 1.5rem; color: #a0aec0; font-size: 0.875rem; border-top: 1px solid #e2e8f0; margin-top: auto; } /* ==================== 响应式 ==================== */ @media (max-width: 768px) { .waterfall { grid-template-columns: 1fr; } .navbar { padding: 0.5rem 1rem; } .nav-links { gap: 1rem; } .main-content { padding: 0 1rem; } } /* ==================== 代码高亮(Pygments 默认主题) ==================== */ .codehilite { background: #f7fafc; border-radius: 8px; padding: 1rem; overflow-x: auto; margin: 1rem 0; } .codehilite pre { margin: 0; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 0.875rem; line-height: 1.5; }