/* Reset & Base */
:root {
    --text-color: #333;
    --bg-color: #fff;
    --accent-color: #222; /* 黑色极简 */
    --gray-color: #999;
    --border-color: #eee;
    --drawer-bg: #fff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    background: var(--bg-color);
    line-height: 1.8;
    font-size: 16px;
}
a { text-decoration: none; color: inherit; transition: 0.3s; }
a:hover { color: #666; }
ul { list-style: none; }
img { max-width: 100%; border-radius: 4px; }

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

/* Header */
.site-header { padding: 20px 0; border-bottom: 1px solid transparent; }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 50px; }
.text-logo { font-size: 24px; font-weight: bold; letter-spacing: 1px; font-family: "Georgia", serif; }
.logo img { height: 40px; width: auto; }

/* Menu Icon */
.menu-icon { background: none; border: none; cursor: pointer; display: flex; flex-direction: column; gap: 5px; }
.menu-icon span { width: 24px; height: 2px; background: #333; display: block; transition: 0.3s; }
.menu-icon:hover span { background: #000; }

/* Visitor Plate */
.user-plate { margin-top: 10px; padding-bottom: 20px; border-bottom: 1px solid var(--border-color); margin-bottom: 40px; }
.interaction-title { display: inline-block; vertical-align: middle; }
.visitor-avatars { overflow-x: auto; white-space: nowrap; padding: 5px 0; scrollbar-width: none; }
.visitor-avatars::-webkit-scrollbar { display: none; }
.user-avatar-link { display: inline-block; margin-right: 8px; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: transform 0.2s; }
.user-avatar:hover { transform: scale(1.1); z-index: 2; position: relative; }

/* Post List (Visual Two Columns) */
.post-item { display: flex; gap: 30px; margin-bottom: 50px; padding-bottom: 50px; border-bottom: 1px dashed var(--border-color); }
.post-thumb { flex: 0 0 240px; }
.post-thumb img { width: 100%; height: 160px; object-fit: cover; border-radius: 6px; }
.post-content { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.post-content.no-thumb { width: 100%; }

.post-title { font-size: 22px; margin-bottom: 10px; font-weight: 600; }
.post-excerpt { color: #666; font-size: 15px; margin-bottom: 15px; line-height: 1.6; text-align: justify; }
.post-meta { font-size: 12px; color: #aaa; text-transform: uppercase; letter-spacing: 1px; }
.post-meta.bottom { display: flex; gap: 15px; margin-top: auto; }

/* Pagination */
.pagination { display: flex; justify-content: space-between; padding: 20px 0; }
.pagination a { padding: 8px 20px; border: 1px solid #eee; border-radius: 20px; font-size: 14px; }
.pagination a:hover { border-color: #333; background: #333; color: #fff; }

/* Post Detail */
.single-header { margin-bottom: 40px; text-align: center; padding-bottom: 30px; border-bottom: 1px solid #eee; }
.single-title { font-size: 32px; margin-bottom: 15px; }
.single-meta span { margin: 0 10px; color: #999; font-size: 13px; }
.single-body { font-size: 17px; line-height: 2; color: #2c3e50; margin-bottom: 50px; }
.copyright-tip { background: #f9f9f9; padding: 15px; font-size: 13px; color: #888; text-align: center; border-radius: 4px; }

/* -----------------------------
   Comments System (Fixed)
   ----------------------------- */
.comments-area { margin-top: 60px; }
.comment-list, .comment-children { list-style: none; padding: 0; margin: 0; }

/* 评论单条 */
.comment-body { margin-bottom: 30px; position: relative; }

/* 作者信息部分 */
.comment-author { display: flex; align-items: center; margin-bottom: 12px; }
.comment-author .avatar { 
    width: 44px; height: 44px; border-radius: 50%; margin-right: 12px; 
    border: 1px solid #f0f0f0; /* 增加细边框 */
    object-fit: cover;
}
.comment-info { display: flex; flex-direction: column; font-size: 14px; }
.comment-info cite { font-style: normal; font-weight: bold; color: #222; }
.comment-meta a { font-size: 12px; color: #bbb; margin-top: 2px; }

/* 评论内容气泡 */
.comment-content { 
    margin-left: 56px; /* 对齐头像右侧 */
    font-size: 15px; 
    color: #444; 
    line-height: 1.7; 
    background: #fdfdfd;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #f3f3f3;
}

/* 回复链接 */
.comment-reply { margin-left: 56px; margin-top: 8px; font-size: 12px; }
.comment-reply a { color: #333; border-bottom: 1px solid #ddd; }
.comment-reply a:hover { color: #000; border-bottom-color: #000; }

/* 徽章/等级样式 */
.user-badge, .user-level {
    display: inline-block; padding: 1px 6px; border-radius: 3px; 
    font-size: 10px; margin-left: 6px; color: #fff; transform: scale(0.9);
    vertical-align: middle; font-weight: normal;
}
.badge-owner { background: #000; }
.lv-max { background: #ff9800; }
.lv-4, .lv-3 { background: #4caf50; }
.lv-1 { background: #ccc; }

/* 
   === 阶梯与拍平逻辑 === 
*/
/* Level 2: 缩进显示 */
.comment-children { margin-left: 40px; margin-top: 20px; border-left: 2px solid #eee; padding-left: 15px; }

/* Level 3+: 拍平 (关键逻辑) */
.comment-children .comment-children { 
    margin-left: 0; padding-left: 0; border-left: none; 
    margin-top: 15px; 
}
.comment-children .comment-children .comment-body { 
    background: #fafafa; 
    padding: 15px; 
    margin-bottom: 10px;
    border-radius: 6px;
    border: 1px solid #eee;
}
/* 拍平后的内部调整 */
.comment-children .comment-children .comment-content {
    background: none; border: none; padding: 5px 0; margin-left: 56px;
}

/* 
   === 表单与按钮 === 
*/
.respond { margin-top: 50px; border-top: 1px dashed #eee; padding-top: 30px; }
.response-title { font-size: 20px; margin-bottom: 20px; font-weight: bold; }

.input-group { display: flex; gap: 10px; margin-bottom: 10px; }
.input-group input, .textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 4px; background: #f9f9f9; transition: 0.3s; }
.input-group input:focus, .textarea:focus { background: #fff; border-color: #333; outline: none; }

.form-submit { margin-top: 20px; text-align: right; }
.submit-btn {
    display: inline-block;
    background-color: #222 !important; /* 强制黑色背景 */
    color: #ffffff !important; /* 强制白色文字 */
    border: 1px solid #222;
    padding: 10px 30px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1.5;
    width: auto;
    -webkit-appearance: none;
    transition: all 0.3s ease;
}
.submit-btn:hover {
    background-color: #444 !important;
    border-color: #444;
}

/* Drawer Menu */
.drawer-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 999; visibility: hidden; opacity: 0; transition: 0.3s; }
.drawer-content { position: absolute; bottom: -100%; left: 0; width: 100%; background: #fff; border-radius: 20px 20px 0 0; padding: 30px; transition: 0.4s; max-height: 80vh; overflow-y: auto; }
.drawer-overlay.active { visibility: visible; opacity: 1; }
.drawer-overlay.active .drawer-content { bottom: 0; }
.drawer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.close-btn { background: none; border: none; font-size: 30px; cursor: pointer; }
.drawer-nav ul li { margin-bottom: 15px; font-size: 18px; font-weight: bold; }

/* Footer */
.site-footer { margin-top: 80px; padding: 40px 0; font-size: 13px; color: #999; border-top: 1px solid #eee; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; }

/* Mobile Responsive */
@media (max-width: 768px) {
    .post-item { flex-direction: column; gap: 15px; }
    .post-thumb { flex: auto; }
    .header-inner { padding: 0 10px; }
    .footer-inner { flex-direction: column; gap: 20px; text-align: center; }
    .input-group { flex-direction: column; }
    .comment-children { padding-left: 10px; margin-left: 15px; }
}