* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

header h1 {
    font-size: 24px;
}

header h1 a {
    color: #333;
    text-decoration: none;
}

header nav a {
    margin-left: 20px;
    color: #666;
    text-decoration: none;
}

header nav a:hover {
    color: #007bff;
}

main {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.main-content {
    flex: 1;
    background: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
}

.sidebar-widget {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.sidebar-widget h3 {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
    color: #333;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 8px;
}

.category-list a {
    color: #666;
    text-decoration: none;
    display: block;
    padding: 5px 0;
    transition: color 0.3s;
}

.category-list a:hover {
    color: #007bff;
    padding-left: 5px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
}

.tag-item:hover {
    background: #007bff;
    color: #fff;
}

.tag-count {
    font-size: 11px;
    opacity: 0.7;
}

.archive-list {
    list-style: none;
}

.archive-list li {
    margin-bottom: 8px;
}

.archive-list a {
    color: #666;
    text-decoration: none;
    display: block;
    padding: 5px 0;
    transition: color 0.3s;
}

.archive-list a:hover {
    color: #007bff;
    padding-left: 5px;
}

.archive-count {
    color: #999;
    font-size: 12px;
    margin-left: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .main-content {
        padding: 20px;
    }

    .sidebar-widget {
        padding: 15px;
    }
}

.posts {
    margin-top: 20px;
}

.post {
    border-bottom: 1px solid #eee;
    padding: 30px 0;
}

.post:last-child {
    border-bottom: none;
}

.post h2 {
    margin-bottom: 10px;
}

.post h2 a {
    color: #333;
    text-decoration: none;
    font-size: 24px;
}

.post h2 a:hover {
    color: #007bff;
}

.meta {
    color: #999;
    font-size: 14px;
    margin: 10px 0;
}

.meta span {
    margin-right: 15px;
}

.excerpt {
    color: #666;
    margin: 15px 0;
    line-height: 1.8;
}

.excerpt p {
    margin-bottom: 10px;
}

.excerpt p:last-child {
    margin-bottom: 0;
}

.excerpt img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

.tags {
    margin: 15px 0;
}

.tag {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 5px;
    text-decoration: none;
}

.tag:hover {
    background: #007bff;
    color: #fff;
}

.read-more {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

.post-detail {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 0;
}

.post-header {
    border-bottom: 2px solid #007bff;
    padding: 30px;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.post-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 25px;
    color: #2c3e50;
    word-wrap: break-word;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    padding: 15px 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-label {
    color: #007bff;
    font-size: 14px;
    font-weight: 600;
}

.meta-value {
    color: #495057;
    font-size: 14px;
    font-weight: 500;
}

.meta-value a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s;
}

.meta-value a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.post-tags {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.post-tags .tag {
    display: inline-block;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #fff;
    padding: 4px 12px;   
    font-size: 13px;
    margin-right: 8px;
    margin-top: 4px;
    margin-bottom: 4px;
    text-decoration: none;
    transition: all 0.3s;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.post-tags .tag:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

.post-content {
    line-height: 1.9;
    font-size: 16px;
    color: #333;
    word-wrap: break-word;
}

.post-content p {
    margin-bottom: 20px;
    text-align: justify;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
}

.post-content h1 {
    font-size: 28px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.post-content h2 {
    font-size: 24px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
}

.post-content h3 {
    font-size: 20px;
}

.post-content h4 {
    font-size: 18px;
}

.post-content ul,
.post-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.post-content blockquote {
    border-left: 4px solid #007bff;
    padding: 15px 20px;
    margin: 20px 0;
    background: #f8f9fa;
    border-radius: 4px;
    font-style: italic;
    color: #666;
}

.post-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #e83e8c;
}

.post-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 20px 0;
    line-height: 1.6;
}

.post-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: 14px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-content a {
    color: #007bff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s;
}

.post-content a:hover {
    color: #0056b3;
    border-bottom-color: #0056b3;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.post-content table th,
.post-content table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.post-content table th {
    background: #f8f9fa;
    font-weight: 600;
}

.post-content hr {
    border: none;
    border-top: 2px solid #f0f0f0;
    margin: 30px 0;
}

.search-box {
    margin: 20px 0;
}

.search-box form {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-box button {
    padding: 12px 30px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.search-box button:hover {
    background: #0056b3;
}

.pagination {
    margin-top: 30px;
    text-align: center;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.pagination .page-link {
    display: inline-block;
    padding: 8px 12px;
    min-width: 36px;
    text-align: center;
    background: #fff;
    color: #333;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 14px;
}

.pagination .page-link:hover {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.pagination .page-current {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
    font-weight: 500;
    cursor: default;
}

.pagination .page-current:hover {
    background: #007bff;
    color: #fff;
}

.pagination .page-ellipsis {
    display: inline-block;
    padding: 8px 4px;
    color: #999;
    font-size: 14px;
}

.pagination .page-nav {
    padding: 8px 16px;
    font-weight: 500;
}

.error-page {
    text-align: center;
    padding: 60px 20px;
}

.error-page h1 {
    font-size: 72px;
    color: #007bff;
    margin-bottom: 20px;
}

.error-page p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.error-page a {
    display: inline-block;
    padding: 12px 30px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

.error-page a:hover {
    background: #0056b3;
}

footer {
    background: #fff;
    padding: 20px;
    text-align: center;
    color: #999;
    border-top: 1px solid #eee;
}

footer p {
    margin: 5px 0;
}

footer .footer-info {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

footer .footer-info a {
    color: #999;
    text-decoration: none;
}

footer .footer-info a:hover {
    color: #007bff;
    text-decoration: underline;
}

/* 评论区域样式 */
.comments-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

.comments-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #333;
    padding-bottom: 15px;
    border-bottom: 2px solid #007bff;
}

.comments-list {
    margin-bottom: 40px;
}

.comment-item {
    background: #f8f9fa;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.comment-author {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.comment-time {
    color: #999;
    font-size: 13px;
}

.comment-content {
    color: #555;
    line-height: 1.8;
    font-size: 15px;
    word-wrap: break-word;
}

.comment-content p {
    margin-bottom: 10px;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.no-comments {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-size: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

/* 评论表单样式 */
.comment-form-wrapper {
    background: #fff;
    padding: 30px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.comment-form-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 25px;
    color: #333;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.comment-form {
    max-width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group .required {
    color: #dc3545;
    margin-left: 3px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    background: #007bff;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: #0056b3;
}

.btn-submit:active {
    transform: translateY(1px);
}

.form-tip {
    margin-left: 15px;
    color: #999;
    font-size: 13px;
}

/* 响应式设计 - 评论区域 */
@media (max-width: 768px) {
    .comment-form-wrapper {
        padding: 20px;
    }
    
    .comment-item {
        padding: 15px;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

