/* wzxqing.css - 自定义样式表 */

/* 隐藏导航栏 */
.main-nav {
    display: none !important;
}

/* 通用样式优化 */
html, body {
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    color: #333;
    background-color: #f5f7fa;
    padding: 0;
    margin: 0;
    height: auto;
    min-height: 100%;
    overflow-y: auto;
    position: relative;
}

/* 管理员文章和公告样式 */
.admin-post {
    border: 1px solid #2196F3 !important;
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.15) !important;
}

.admin-badge {
    display: inline-block;
    background-color: #2196F3;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 14px;
    margin-right: 10px;
    vertical-align: middle;
    font-weight: normal;
}

.announcement-badge {
    display: inline-block;
    background-color: #f44336;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 14px;
    margin-right: 10px;
    vertical-align: middle;
    font-weight: normal;
}

/* 页面布局优化 */
.container {
    max-width: 1200px;
    padding: 20px;
}

/* 按钮和交互元素美化 */
.btn {
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 8px 16px;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    border: none;
}

/* 文章详情页优化 */
.blog-detail {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-bottom: 30px;
    background: #fff;
    overflow: hidden;
    border: none;
}

.blog-detail-header {
    background-color: #fafafa;
    padding: 25px 30px;
    border-bottom: 1px solid #f0f0f0;
}

.blog-detail-title {
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
    margin-bottom: 20px;
    font-size: 30px;
}

.blog-detail-meta {
    background-color: #f9f9f9;
    padding: 10px 20px;
    border-radius: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.blog-detail-meta span {
    display: inline-flex;
    align-items: center;
    color: #555;
}

.blog-detail-meta i {
    margin-right: 5px;
    color: #3498db;
}

.blog-detail-content {
    padding: 30px;
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.blog-detail-content img {
    max-width: 100%;
    height: auto;
    margin: 1.5em auto;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    display: block;
}

.blog-detail-content p {
    margin-bottom: 1.5em;
}

.blog-detail-content h2,
.blog-detail-content h3,
.blog-detail-content h4 {
    margin-top: 1.8em;
    margin-bottom: 1em;
    font-weight: 600;
    color: #2c3e50;
    border-left: 4px solid #3498db;
    padding-left: 10px;
}

.blog-detail-content blockquote {
    border-left: 4px solid #3498db;
    padding: 10px 20px;
    background: #f8f9fa;
    margin: 20px 0;
    font-style: italic;
    color: #555;
}

.blog-detail-content a {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px dashed #3498db;
}

.blog-detail-content a:hover {
    color: #2980b9;
    border-bottom: 1px solid #2980b9;
}

.blog-detail-footer {
    background-color: #fafafa;
    padding: 20px 30px;
    border-top: 1px solid #f0f0f0;
}

/* 侧边栏优化 */
.sidebar .widget {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.sidebar .widget:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.sidebar .widget h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

/* 作者信息小部件 */
.author-info {
    text-align: center;
}

.author-bio {
    padding: 10px 0;
}

.author-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.view-author {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 15px;
    background-color: #f5f5f5;
    border-radius: 20px;
    color: #3498db;
    text-decoration: none;
    transition: all 0.2s;
}

.view-author:hover {
    background-color: #3498db;
    color: white;
}

/* 相关文章小部件 */
.related-posts ul {
    padding-left: 0;
    list-style-type: none;
}

.related-posts li {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    flex-direction: column;
}

.related-posts li:last-child {
    border-bottom: none;
}

.related-posts a {
    color: #333;
    text-decoration: none;
    margin-bottom: 5px;
    transition: color 0.2s;
}

.related-posts a:hover {
    color: #3498db;
}

.post-date {
    color: #888;
    font-size: 0.85em;
}

/* 搜索部件 */
.search form {
    display: flex;
    margin-top: 10px;
}

.search input[type="text"] {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
    transition: all 0.3s;
}

.search input[type="text"]:focus {
    border-color: #3498db;
}

.search button {
    padding: 8px 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: all 0.3s;
}

.search button:hover {
    background: #2980b9;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .blog-detail {
        padding: 15px;
        border-radius: 5px;
    }
    
    .blog-detail-header,
    .blog-detail-content,
    .blog-detail-footer {
        padding: 15px;
    }
    
    .blog-detail-title {
        font-size: 22px;
        margin-bottom: 15px;
    }
    
    .blog-detail-meta {
        padding: 8px 12px;
        font-size: 12px;
        gap: 10px;
    }
    
    .sidebar .widget {
        padding: 15px;
        margin-bottom: 15px;
    }
}

/* 简洁博客页面样式 */
.blog-simple-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 0 15px;
    box-sizing: border-box;
    position: relative;
    overflow: visible;
}

.blog-simple-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.blog-simple-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.blog-simple-meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    color: #333;
    font-size: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    background-color: #f9f9f9;
    padding: 12px 15px;
    border-radius: 6px;
}

.blog-simple-author, .blog-simple-date, .blog-simple-views, .blog-simple-category {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
}

.blog-simple-author:before {
    content: "👤 ";
    margin-right: 5px;
}

.blog-simple-category:before {
    content: "📁 ";
    margin-right: 5px;
}

.blog-simple-date:before {
    content: "📅 ";
    margin-right: 5px;
}

.blog-simple-views:before {
    content: "👁️ ";
    margin-right: 5px;
}

.blog-simple-title {
    margin: 0;
    font-size: 24px;
    line-height: 1.4;
    color: #222;
    font-weight: bold;
}

.blog-simple-content {
    padding: 25px;
    line-height: 1.8;
    font-size: 16px;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.blog-simple-content img {
    max-width: 100%;
    height: auto;
    margin: 15px auto;
    border-radius: 8px;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.blog-simple-content img:hover {
    transform: scale(1.02);
}

.blog-simple-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.blog-simple-content h2,
.blog-simple-content h3,
.blog-simple-content h4 {
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 600;
    color: #2c3e50;
    border-left: 4px solid #3498db;
    padding-left: 10px;
    line-height: 1.4;
}

.blog-simple-content h2 {
    font-size: 22px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.blog-simple-content h3 {
    font-size: 20px;
}

.blog-simple-content h4 {
    font-size: 18px;
}

.blog-simple-content ul,
.blog-simple-content ol {
    padding-left: 30px;
    margin-bottom: 20px;
}

.blog-simple-content li {
    margin-bottom: 8px;
}

.blog-simple-content blockquote {
    border-left: 4px solid #3498db;
    background: #f8f9fa;
    padding: 15px;
    margin: 20px 0;
    color: #555;
    font-style: italic;
}

.blog-simple-content pre {
    background: #f5f7fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    overflow-x: auto;
    margin: 15px 0;
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
}

.blog-simple-content code {
    background: #f5f7fa;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
    color: #e74c3c;
}

.blog-simple-content pre code {
    background: none;
    color: #333;
    padding: 0;
}

.blog-simple-content a {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px dashed #3498db;
    transition: all 0.2s ease;
}

.blog-simple-content a:hover {
    color: #2980b9;
    border-bottom: 1px solid #2980b9;
}

.blog-simple-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.blog-simple-content table, 
.blog-simple-content th, 
.blog-simple-content td {
    border: 1px solid #ddd;
}

.blog-simple-content th, 
.blog-simple-content td {
    padding: 10px;
    text-align: left;
}

.blog-simple-content th {
    background-color: #f5f7fa;
    font-weight: 600;
}

.blog-simple-content tr:nth-child(even) {
    background-color: #fafafa;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .blog-simple-container {
        margin: 15px auto;
        padding: 0 10px;
    }
    
    .blog-simple-header,
    .blog-simple-content {
        padding: 15px;
    }
    
    .blog-simple-title {
        font-size: 20px;
    }
    
    .blog-simple-meta {
        gap: 0;
        font-size: 15px;
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        background-color: #f5f7fa;
        border-radius: 8px;
        margin-bottom: 15px;
    }

    .blog-simple-author, 
    .blog-simple-category, 
    .blog-simple-date, 
    .blog-simple-views {
        margin-bottom: 8px;
        padding: 5px 0;
        width: 100%;
        border-bottom: 1px dashed #e0e0e0;
        display: flex;
        align-items: center;
    }
    
    .blog-simple-author:before {
        content: "👤 ";
        margin-right: 5px;
    }
    
    .blog-simple-category:before {
        content: "📁 ";
        margin-right: 5px;
    }
    
    .blog-simple-date:before {
        content: "📅 ";
        margin-right: 5px;
    }
    
    .blog-simple-views:before {
        content: "👁️ ";
        margin-right: 5px;
    }
    
    .blog-simple-views {
        border-bottom: none;
    }
    
    .blog-simple-content {
        padding: 15px;
        font-size: 15px;
    }
    
    .blog-simple-content h2 {
        font-size: 20px;
    }
    
    .blog-simple-content h3 {
        font-size: 18px;
    }
    
    .blog-simple-content h4 {
        font-size: 16px;
    }
    
    .blog-simple-content pre {
        padding: 10px;
        font-size: 14px;
    }
    
    .blog-simple-content blockquote {
        padding: 10px;
        margin: 15px 0;
    }
    
    .blog-simple-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* 图片预览模态框在移动端的优化 */
    .image-preview-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
    
    .image-preview-content {
        max-width: 95%;
    }
    
    .comment-form-wrapper {
        flex-direction: column;
    }
    
    .comment-avatar {
        width: 40px;
        height: 40px;
        margin-bottom: 10px;
    }
    
    .comment-form-content {
        width: 100%;
    }
    
    .comment-toolbar {
        flex-wrap: wrap;
    }
    
    .comments-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .comment-item {
        padding: 10px;
    }
    
    .comment-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }
    
    .comment-actions {
        margin-top: 8px;
    }
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* 图标样式 */
.iconfont {
    font-family: sans-serif;
    font-size: 16px;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 使用Unicode字符替代字体图标 */
.icon-tupian:before { content: "🖼️"; }
.icon-emoji:before { content: "😊"; }
.icon-at:before { content: "@"; }
.icon-fasong:before { content: "✉️"; }
.icon-dianzan:before { content: "👍"; }
.icon-huifu:before { content: "↩️"; }
.icon-down:before { content: "▼"; }

/* 图片预览模态框样式 */
.image-preview-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.image-preview-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    border-radius: 8px;
}

.image-preview-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 30px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1002;
    background-color: rgba(0, 0, 0, 0.5);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 35px;
}

.image-preview-close:hover {
    color: #bbb;
    background-color: rgba(0, 0, 0, 0.7);
}

/* 给博客内容中的图片添加可点击样式 */
.blog-simple-content img {
    cursor: pointer;
    transition: opacity 0.3s;
}

.blog-simple-content img:hover {
    opacity: 0.8;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .comment-form-wrapper {
        flex-direction: column;
    }
    
    .comment-avatar {
        width: 40px;
        height: 40px;
        margin-bottom: 10px;
    }
    
    .comment-form-content {
        width: 100%;
    }
    
    .comment-toolbar {
        flex-wrap: wrap;
    }
    
    .comments-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .comment-item {
        padding: 10px;
    }
    
    .comment-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }
    
    .comment-actions {
        margin-top: 8px;
    }
}

.blog-simple-author a,
.blog-simple-category a {
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.blog-simple-author a:hover,
.blog-simple-category a:hover {
    color: #3498db;
}

.blog-simple-author a::after,
.blog-simple-category a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #3498db;
    transition: width 0.3s ease;
}

.blog-simple-author a:hover::after,
.blog-simple-category a:hover::after {
    width: 100%;
} 