* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif; background: #f5f7fa; color: #333; line-height: 1.6; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 20px 0; }
.header .logo { font-size: 28px; font-weight: bold; text-decoration: none; color: white; }
.header .description { font-size: 14px; margin-top: 5px; opacity: 0.9; }
.header nav { margin-top: 15px; }
.header nav a { color: white; text-decoration: none; margin-right: 20px; font-size: 14px; opacity: 0.9; }
.header nav a:hover { opacity: 1; border-bottom: 2px solid white; }

.main { display: flex; margin-top: 30px; }

.content { flex: 1; margin-right: 30px; }
.sidebar { width: 300px; flex-shrink: 0; }

.post-card { background: white; border-radius: 8px; padding: 25px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.post-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-2px); transition: all 0.3s; }
.post-card h2 { font-size: 20px; margin-bottom: 10px; }
.post-card h2 a { color: #333; text-decoration: none; }
.post-card h2 a:hover { color: #667eea; }
.post-card .meta { font-size: 13px; color: #888; margin-bottom: 15px; }
.post-card .meta span { margin-right: 15px; }
.post-card .excerpt { color: #666; font-size: 14px; line-height: 1.8; }
.post-card .tags { margin-top: 15px; }
.post-card .tags a { display: inline-block; background: #f0f0f0; color: #666; padding: 4px 10px; border-radius: 4px; font-size: 12px; margin-right: 8px; text-decoration: none; }
.post-card .tags a:hover { background: #667eea; color: white; }

.sidebar-widget { background: white; border-radius: 8px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.sidebar-widget h3 { font-size: 16px; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #667eea; }
.sidebar-widget ul { list-style: none; }
.sidebar-widget ul li { margin-bottom: 10px; }
.sidebar-widget ul li a { color: #555; text-decoration: none; font-size: 14px; }
.sidebar-widget ul li a:hover { color: #667eea; }
.sidebar-widget .tag-cloud { margin-top: 10px; }
.sidebar-widget .tag-cloud a { display: inline-block; background: #f0f0f0; color: #666; padding: 4px 10px; border-radius: 4px; font-size: 13px; margin-right: 6px; margin-bottom: 6px; text-decoration: none; }
.sidebar-widget .tag-cloud a:hover { background: #667eea; color: white; }

.pagination { text-align: center; margin-top: 30px; }
.pagination a, .pagination span { display: inline-block; padding: 8px 16px; margin: 0 4px; border-radius: 4px; text-decoration: none; color: #666; }
.pagination a:hover { background: #667eea; color: white; }
.pagination .current { background: #667eea; color: white; }

.post-header { background: white; border-radius: 8px; padding: 30px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.post-header h1 { font-size: 28px; margin-bottom: 15px; }
.post-header .meta { font-size: 14px; color: #888; }
.post-header .meta span { margin-right: 20px; }

.post-content { background: white; border-radius: 8px; padding: 30px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.post-content h2 { font-size: 22px; margin: 25px 0 15px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.post-content h3 { font-size: 18px; margin: 20px 0 12px; }
.post-content p { margin-bottom: 15px; font-size: 15px; color: #444; }
.post-content img { max-width: 100%; height: auto; border-radius: 4px; }
.post-content code { background: #f8f9fa; padding: 2px 6px; border-radius: 4px; font-family: 'Consolas', monospace; }
.post-content pre { background: #2d2d2d; color: #ccc; padding: 15px; border-radius: 8px; overflow-x: auto; margin-bottom: 15px; }
.post-content pre code { background: none; padding: 0; color: #ccc; }

.comments { background: white; border-radius: 8px; padding: 30px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.comments h3 { font-size: 20px; margin-bottom: 20px; }
.comment-list { margin-bottom: 25px; }
.comment-item { padding: 15px 0; border-bottom: 1px solid #eee; }
.comment-item:last-child { border-bottom: none; }
.comment-item .author { font-weight: bold; color: #333; margin-bottom: 5px; }
.comment-item .date { font-size: 12px; color: #999; margin-bottom: 10px; }
.comment-item .content { color: #555; font-size: 14px; }

.comment-form { margin-top: 25px; }
.comment-form h4 { font-size: 16px; margin-bottom: 15px; }
.comment-form .form-group { margin-bottom: 15px; }
.comment-form .form-group label { display: block; font-size: 14px; margin-bottom: 5px; color: #666; }
.comment-form .form-group input, .comment-form .form-group textarea { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.comment-form .form-group textarea { height: 120px; resize: vertical; }
.comment-form .btn { background: #667eea; color: white; padding: 10px 25px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; }
.comment-form .btn:hover { background: #5a6fd6; }

.footer { background: #333; color: #999; padding: 30px 0; margin-top: 50px; text-align: center; }
.footer p { font-size: 14px; }

.page-title { background: white; border-radius: 8px; padding: 25px 30px; margin-bottom: 30px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.page-title h1 { font-size: 24px; color: #333; }

.admin-header { background: #333; color: white; padding: 15px 0; }
.admin-header .container { display: flex; justify-content: space-between; align-items: center; }
.admin-header .logo { font-size: 20px; font-weight: bold; color: white; text-decoration: none; }
.admin-header nav a { color: white; text-decoration: none; margin-left: 20px; font-size: 14px; }

.admin-content { background: white; border-radius: 8px; padding: 30px; margin-top: 30px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.admin-content h2 { font-size: 22px; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid #eee; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 12px; text-align: left; border-bottom: 1px solid #eee; }
.admin-table th { background: #f8f9fa; font-weight: 600; }
.admin-table tr:hover { background: #fafafa; }

.admin-btn { display: inline-block; padding: 6px 14px; border-radius: 4px; text-decoration: none; font-size: 13px; margin-right: 8px; }
.admin-btn.edit { background: #5cb85c; color: white; }
.admin-btn.edit:hover { background: #4cae4c; }
.admin-btn.delete { background: #d9534f; color: white; }
.admin-btn.delete:hover { background: #c9302c; }
.admin-btn.add { background: #667eea; color: white; }
.admin-btn.add:hover { background: #5a6fd6; }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 14px; margin-bottom: 5px; color: #666; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.form-group textarea { height: 200px; resize: vertical; }
.form-group .btn { background: #667eea; color: white; padding: 10px 30px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; }
.form-group .btn:hover { background: #5a6fd6; }

.alert { padding: 12px 15px; border-radius: 4px; margin-bottom: 15px; font-size: 14px; }
.alert.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

@media (max-width: 768px) {
    .main { flex-direction: column; }
    .content { margin-right: 0; margin-bottom: 20px; }
    .sidebar { width: 100%; }
    .header nav a { margin-right: 10px; }
}