/* 基本样式 */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
}

.header h1 a {
    color: #333;
    text-decoration: none;
}

/* 导航样式 */
.nav {
    background: #fff;
    padding: 15px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
}

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

.nav a {
    margin: 0 10px;
    text-decoration: none;
    color: #333;
}

.nav a:hover {
    color: #0066cc;
}

/* 搜索框样式 */
.search-box {
    margin: 20px 0;
}

.search-box form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.search-box input[type="text"] {
    padding: 8px 12px;
    width: 300px;
    max-width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex: 1;
    min-width: 200px;
}

.search-box button {
    padding: 8px 15px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.search-box button:hover {
    background: #0052a3;
}

/* 文章列表样式 */
.post {
    background: #fff;
    margin-bottom: 30px;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.post h2 {
    margin: 0 0 15px 0;
    font-size: 24px;
}

.post h2 a {
    color: #333;
    text-decoration: none;
}

.post h2 a:hover {
    color: #0066cc;
}

.post-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.post-meta a {
    color: #0066cc;
    text-decoration: none;
}

.post-content {
    font-size: 16px;
    color: #333;
    line-height: 1.8;
}

.post-content p {
    display: block;
    margin-top: 1.5em;
    margin-bottom: 1.5em;
    line-height: 1.8;
}

.read-more {
    color: #0066cc;
    text-decoration: none;
    font-weight: bold;
}

.read-more:hover {
    text-decoration: underline;
}

/* 分页样式 */
.pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination a,
.pagination span {
    display: inline-block;
    margin: 0 5px;
    padding: 8px 12px;
    background: #f4f4f4;
    border-radius: 3px;
    text-decoration: none;
    color: #333;
    min-width: 36px;
}

.pagination a:hover {
    background: #e0e0e0;
}

.pagination .current {
    background: #0066cc;
    color: white;
}

.pagination .disabled {
    color: #999;
    cursor: not-allowed;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 18px;
}

/* 标签样式 */
.tags {
    margin: 20px 0;
}

.tags a {
    display: inline-block;
    background: #f4f4f4;
    padding: 5px 10px;
    margin-right: 5px;
    margin-bottom: 5px;
    border-radius: 3px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
}

.tags a:hover {
    background: #e0e0e0;
}

/* 图片样式 */
img {
    max-width: 100%;
    height: auto;
}

.wp-block-image {
    text-align: center;
    margin: 1.5em 0;
}

.wp-block-image img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.wp-block-image figcaption {
    font-size: 0.9em;
    color: #666;
    margin-top: 0.5em;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

th, td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

th {
    background: #f4f4f4;
}

/* 评论样式 */
.comments {
    margin-top: 40px;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.comments h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.comments-list {
    margin-bottom: 30px;
}

.comment {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment:last-child {
    border-bottom: none;
}

.comment-meta {
    margin-bottom: 10px;
    font-size: 14px;
}

.comment-author {
    font-weight: bold;
    color: #333;
    margin-right: 10px;
}

.comment-date {
    color: #999;
}

.comment-content {
    line-height: 1.6;
    color: #555;
}

.no-comments {
    text-align: center;
    color: #999;
    padding: 20px;
    font-style: italic;
}

.comment-form-wrapper {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.comment-form-wrapper h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
}

.comment-form .form-group {
    margin-bottom: 15px;
}

.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.comment-form textarea {
    resize: vertical;
}

.comment-form button {
    padding: 10px 20px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.comment-form button:hover {
    background: #0052a3;
}

/* 验证码样式 */
.captcha-group .captcha-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.captcha-img {
    width: 150px;
    height: 50px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.btn-refresh {
    padding: 8px 12px;
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.btn-refresh:hover {
    background: #e0e0e0;
}

.captcha-group input {
    width: 120px !important;
}

/* 消息提示样式 */
.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;
}

/* 输入框placeholder样式 */
.comment-form input::placeholder,
.comment-form textarea::placeholder {
    color: #999;
    font-size: 14px;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 24px;
    }

    .nav-inner {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .nav a {
        margin: 0 5px;
        font-size: 14px;
        padding: 8px 10px;
    }

    .search-box form {
        flex-direction: column;
    }

    .search-box input[type="text"] {
        width: 100%;
    }

    .search-box button {
        width: 100%;
    }

    .post {
        padding: 20px;
        margin-bottom: 20px;
    }

    .post h2 {
        font-size: 20px;
    }

    .post-content {
        font-size: 15px;
    }

    .pagination a,
    .pagination span {
        padding: 6px 10px;
        margin: 2px;
    }

    .comments {
        padding: 20px;
    }

    .captcha-group .captcha-input-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .captcha-img {
        width: 100%;
        max-width: 200px;
        height: auto;
    }

    .captcha-group input {
        width: 100% !important;
    }

    .comment-form button {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .post {
        padding: 15px;
    }

    .post h2 {
        font-size: 18px;
    }
}
