/*
Theme Name: WeChat Article
Theme URI: https://example.com/
Author: Your Name
Author URI: https://example.com/
Description: A WeChat official account style theme for WordPress
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wechat-article
*/

/* 全局样式 */
* {
    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.7;
    color: #333;
    background-color: #f7f7f7;
    padding-bottom: 60px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 文章头部样式 */
.article-header {
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.article-title {
    font-size: 24px;
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 16px;
    color: #333;
}

.article-meta {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #888;
}

.author-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.author-info {
    flex: 1;
}

.author-name {
    display: block;
    font-weight: 500;
    color: #333;
}

.follow-btn {
    background-color: #07c160;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.follow-btn:hover {
    background-color: #06ad56;
}

/* 文章内容样式 */
.article-content {
    font-size: 16px;
    margin-bottom: 30px;
}

.article-content p {
    margin-bottom: 16px;
    text-align: justify;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
    border-radius: 4px;
    display: block;
}

.article-content h2 {
    font-size: 20px;
    margin: 24px 0 16px;
    color: #333;
}

.article-content blockquote {
    border-left: 4px solid #07c160;
    padding-left: 15px;
    margin: 16px 0;
    color: #666;
    background-color: #f5f5f5;
    padding: 10px 15px;
    border-radius: 0 4px 4px 0;
}

/* 文章标签样式 */
.article-tags {
    margin: 20px 0;
    padding: 10px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.article-tags a {
    display: inline-block;
    background-color: #f5f5f5;
    color: #666;
    padding: 4px 10px;
    border-radius: 4px;
    margin-right: 8px;
    margin-bottom: 8px;
    text-decoration: none;
    font-size: 14px;
}

/* 互动按钮样式 */
.article-actions {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s;
}

/* 添加按钮图标样式 */
.action-btn::before {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-bottom: 5px;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    text-align: center;
}

/* 点赞按钮图标 */
.like-btn::before {
    content: "\f004";
}

/* 评论按钮图标 */
.comment-btn::before {
    content: "\f075";
}

/* 收藏按钮图标 */
.favorite-btn::before {
    content: "\f02e";
}

/* 分享按钮图标 */
.share-btn::before {
    content: "\f1e0";
}

.action-btn:hover {
    color: #07c160;
    background-color: #f5f5f5;
}

/* 相关推荐样式 - 仿微信公众号 */
.related-posts.wechat-style {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.related-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.related-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.related-item {
    width: 32%;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    background-color: #fff;
}

.related-link {
    display: block;
    text-decoration: none !important;
    color: #333 !important;
}

.related-thumbnail {
    width: 100%;
    height: 100px;
    overflow: hidden;
}

.related-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-link:hover .related-thumbnail img {
    transform: scale(1.05);
}

.related-content {
    padding: 10px;
}

.related-post-title {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .related-item {
        width: 100%;
    }
}
.related-item:hover {
    transform: translateY(-3px);
}

.related-thumbnail {
    width: 100%;
    height: 100px;
    overflow: hidden;
    border-radius: 4px 4px 0 0;
}

.related-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.related-item:hover .related-thumbnail img {
    transform: scale(1.05);
}

.related-content {
    padding: 8px 10px;
}

.related-post-title {
    font-size: 14px;
    margin-top: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-item a {
    text-decoration: none;
    color: #333;
    display: block;
}

.related-item a:hover .related-post-title {
    color: #07c160;
}

/* 二维码模态框样式 */
/* 二维码响应式样式 */
.qrcode-container {
    text-align: center;
    padding: 20px;
}

.responsive-qrcode {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    margin: 0 auto 15px;
    display: block;
}

/* 模态框样式优化 */
.modal {
    display: none !important; /* 强制默认隐藏 */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: #000;
}

/* 移动端适配 */
@media screen and (max-width: 480px) {
    .modal-content {
        width: 95%;
        padding: 15px;
    }
    .responsive-qrcode {
        max-height: 250px;
    }
}
@media (max-width: 768px) {
    .article-title {
        font-size: 20px;
    }

    .article-content {
        font-size: 15px;
    }

    .related-item {
        width: 100%;
    }
}

/* 强制隐藏所有固定定位的二维码 */
div[style*="fixed"][style*="bottom"][style*="left"] {
    display: none !important;
}

/* 额外保险 - 隐藏常见二维码容器类名 */
.qrcode-container-fixed, .fixed-qrcode, .bottom-left-qrcode {
    display: none !important;
}

/* 随机标签样式 - 微信风格 */
.random-tags {
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.tags-title {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
    font-weight: bold;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    display: inline-block;
    padding: 5px 12px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 18px;
    color: #666;
    text-decoration: none !important;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background-color: #e6f7ff;
    border-color: #91d5ff;
    color: #1890ff;
}
/* 头部按钮样式 */
.header-actions {
    display: flex;
    gap: 10px;
}

.header-actions .action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-actions .follow-btn {
    background-color: #07c160;
    color: #fff;
}

.header-actions .follow-btn:hover {
    background-color: #06ad56;
}

.header-actions .share-btn {
    background-color: #f2f2f2;
    color: #333;
}

.header-actions .share-btn:hover {
    background-color: #e6e6e6;
}

.header-actions .action-btn i {
    margin-right: 5px;
}

.share-btn {
    background-color: #f2f2f2;
    color: #333;
}

.share-btn:hover {
    background-color: #e6e6e6;
}

/* 分享模态框样式 */
.share-link {
    margin-top: 15px;
    display: flex;
    align-items: center;
}

.share-link input {
    flex: 1;
    padding: 8px;
    border: 1px solid #eee;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.copy-btn {
    padding: 8px 12px;
    background-color: #1890ff;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.copy-btn:hover {
    background-color: #40a9ff;
}