/* 
Theme Name: WeChat Moments
Author: AI Assistant
Description: 仿微信朋友圈风格主题
Version: 1.7
*/

* { box-sizing: border-box; }
html { background-color: #2e2e2e; }
body { 
    background: #2e2e2e; 
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif; 
    margin: 0; padding: 0; color: #333; 
    min-height: 100vh; overflow-y: scroll; 
}
a { text-decoration: none; color: #576b95; }
ul, li { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; display: block; }

.mobile-wrapper {
    margin: 0 auto; width: 100%; max-width: 420px;
    background: #fff; box-shadow: 0 0 30px rgba(0,0,0,0.5);
    min-height: 100vh; position: relative; display: flex; flex-direction: column;
}

.cover-wrap { 
    position: relative; height: 320px; background-color: #333; 
    background-image: url('https://img.alicdn.com/imgextra/i2/O1CN01f3g0s81Gm6rC2d2jI_!!6000000000663-0-tps-1000-667.jpg'); 
    background-position: center; background-size: cover; margin-bottom: 50px; 
}
.top-bar {
    position: absolute; top: 0; left: 0; right: 0; padding: 15px 20px;
    display: flex; justify-content: flex-end; z-index: 10;
}
.top-bar a {
    color: #fff; font-size: 16px; font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6); margin-left: 20px; opacity: 0.9;
}
.user-profile { position: absolute; bottom: -30px; right: 20px; display: flex; align-items: flex-start; }
.user-name { 
    color: #fff; font-weight: bold; margin-right: 20px; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.8); font-size: 20px; margin-top: 10px; 
}
.user-avatar { 
    width: 70px; height: 70px; border-radius: 8px; border: 2px solid #fff; 
    background: #fff; object-fit: cover; box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.container { padding: 0 20px 40px 20px; flex: 1; }

.moments-list { margin-top: -30px; }
.moment-item { display: flex; padding-bottom: 30px; margin-bottom: 20px; border-bottom: 1px solid #f2f2f2; }
.left-avatar { margin-right: 15px; flex-shrink: 0;}
.left-avatar img { width: 42px; height: 42px; border-radius: 6px; background: #eee; object-fit: cover; }
.right-content { flex: 1; min-width: 0; }
.author-name { color: #576b95; font-weight: bold; font-size: 16px; margin-bottom: 5px; line-height: 1.4; }
.post-text { font-size: 15px; color: #333; margin-bottom: 10px; line-height: 1.6; word-wrap: break-word; }
.post-text p:empty, .post-text:empty { display: none; margin: 0; }
.post-text p { margin: 0; }

.pic-grid { display: grid; gap: 5px; margin-bottom: 10px; width: 100%; }
.pic-grid.col-1 img { max-width: 80%; max-height: 250px; width: auto; height: auto; object-fit: cover; }
.pic-grid.col-2 { grid-template-columns: repeat(2, 90px); }
.pic-grid.col-2 img { width: 90px; height: 90px; object-fit: cover; }
.pic-grid.col-3 { grid-template-columns: repeat(3, 90px); }
.pic-grid.col-3 img { width: 90px; height: 90px; object-fit: cover; }

.meta-info { display: flex; justify-content: space-between; align-items: center; height: 20px; position: relative; }
.time { font-size: 12px; color: #b2b2b2; }

.action-btn {
    background: #f7f7f7; color: #576b95;
    width: 34px; height: 24px; border-radius: 4px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 16px; letter-spacing: -2px; line-height: 1;
    position: relative; top: -2px;
}
.action-btn:active { background: #dcdcdc; }

.action-menu {
    position: absolute; right: 42px; top: -6px;
    background: #4c5154; border-radius: 4px; display: flex; align-items: center;
    padding: 0; opacity: 0; visibility: hidden; transform: scale(0.9);
    transform-origin: right center; transition: all 0.2s ease; z-index: 5;
}
.action-menu.show { opacity: 1; visibility: visible; transform: scale(1); }
.menu-item {
    display: flex; align-items: center; justify-content: center;
    width: 80px; height: 36px; color: #fff; font-size: 14px; cursor: pointer;
}
.menu-item:first-child { border-right: 1px solid #3b3f42; }
.menu-item:active { background: #3b3f42; }

/* --- 核心修复：使用 Hex 代码防止图标乱码 --- */
.icon-heart::before { content: "\2661"; margin-right: 5px; font-size: 16px; } /* 空心心形 */
.icon-bubble::before { content: "\1F5E8"; margin-right: 5px; font-size: 14px; } /* 气泡 */


.likes-comments-box {
    background: #f7f7f7; margin-top: 10px; position: relative; border-radius: 4px;
}
.likes-comments-box::before {
    content: ""; position: absolute; top: -10px; left: 10px;
    border: 5px solid transparent; border-bottom-color: #f7f7f7;
}

/* 点赞列表 */
.like-list {
    padding: 6px 10px; color: #576b95; font-size: 13px; font-weight: bold;
    border-bottom: none; /* 默认无边框，由分割线div控制 */
    line-height: 1.4;
}

/* --- 核心修复：独立分割线 --- */
.box-line {
    border-top: 1px solid #e2e2e2;
    margin: 0;
    display: none; /* 默认隐藏，JS控制 */
}

/* 评论列表 */
.comment-list { padding: 6px 10px; font-size: 13px; color: #333; }
.comment-item { margin-bottom: 2px; line-height: 1.4; }
.comment-user { color: #576b95; font-weight: bold; cursor: pointer; }

/* 评论表单 */
.comment-form-box {
    display: none; margin-top: 10px; border: 1px solid #ddd;
    background: #fff; padding: 10px; border-radius: 4px;
}
.guest-inputs {
    display: flex; gap: 10px; margin-bottom: 8px;
}
.guest-inputs input {
    flex: 1; border: 1px solid #eee; border-radius: 4px; 
    padding: 5px 8px; font-size: 12px; outline: none;
    background: #f9f9f9;
}
.comment-form-box form { display: block; }
.comment-form-box form::after { content: ""; display: table; clear: both; }

.comment-form-box textarea {
    width: 100%; border: none; outline: none; resize: none;
    height: 40px; font-size: 14px; font-family: inherit; display: block; 
}
.comment-submit-btn {
    background: #07c160; color: #fff; border: none; padding: 5px 15px;
    border-radius: 4px; font-size: 12px; 
    float: right; margin-top: 5px; cursor: pointer;
}

.footer { text-align: center; padding: 20px; font-size: 12px; color: #ccc; background: #f7f7f7; }