/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    transition: all 0.3s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
}

/* 头部样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: -webkit-sticky;
    position: sticky;
    position: -o-sticky;
    position: -ms-sticky;
    top: 0;
    z-index: 100;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

/* 移动端导航容器 */
.mobile-nav {
    display: none;
    width: 100%;
    margin-top: 10px;
}

.header-content {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 20px 0;
}

.logo h1 {
    font-size: 24px;
    color: #333;
    margin: 0;
}

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

.nav ul {
    list-style: none;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

.nav ul li {
    margin-left: 30px;
}

.nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.nav ul li a i {
    margin-right: 5px;
}

.nav ul li a:hover {
    color: #667eea;
}

/* 主内容区域 */
.main {
    padding: 40px 0;
}

.content-wrapper {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 30px;
    -webkit-box-lines: multiple;
    -moz-box-lines: multiple;
}

.content-wrapper > * {
    margin-right: 30px;
}

.content-wrapper > *:last-child {
    margin-right: 0;
}

.content {
    flex: 1;
    -webkit-flex: 1;
    -ms-flex: 1;
    max-width: 1000px;
    width: 100%;
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* 文章样式 */
.post {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    -webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    -moz-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 30px;
    transition: transform 0.3s, box-shadow 0.3s;
    -webkit-transition: -webkit-transform 0.3s, -webkit-box-shadow 0.3s;
    -moz-transition: -moz-transform 0.3s, -moz-box-shadow 0.3s;
    -o-transition: -o-transform 0.3s, -o-box-shadow 0.3s;
    font-size: 16px;
    line-height: 1.8;
    letter-spacing: 0.5px;
}

.post:hover {
    transform: translateY(-5px);
    -webkit-transform: translateY(-5px);
    -moz-transform: translateY(-5px);
    -ms-transform: translateY(-5px);
    -o-transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
    -webkit-box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
    -moz-box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

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

.post-title {
    font-size: 26px;
    margin-bottom: 20px;
    line-height: 1.3;
    text-align: center;
    font-weight: 700;
}

.post-title a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
    -webkit-transition: color 0.3s;
    -moz-transition: color 0.3s;
    -o-transition: color 0.3s;
    display: inline-block;
}

.post-title a:hover {
    color: #667eea;
}

.post-meta {
    font-size: 14px;
    color: #666;
    text-align: center;
    -ms-text-align: center;
    margin-bottom: 25px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    -webkit-flex-wrap: wrap;
    gap: 15px;
}

.post-meta span {
    margin-right: 15px;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    vertical-align: middle;
}

.post-meta span i {
    margin-right: 5px;
    color: #999;
}

.post-meta a {
    text-decoration: none;
    color: #666;
    transition: color 0.3s;
    -webkit-transition: color 0.3s;
    -moz-transition: color 0.3s;
    -o-transition: color 0.3s;
}

.post-meta a:hover {
    color: #667eea;
}

.post-content {
    margin-bottom: 25px;
    font-size: 16px;
    color: #333;
    line-height: 1.8;
    width: 100%;
    display: block;
    text-align: center;
    -ms-text-align: center;
}

.post-content p {
    margin-bottom: 20px;
    text-align: center;
    -ms-text-align: center;
    line-height: 1.8;
    letter-spacing: 0.5px;
    -webkit-letter-spacing: 0.5px;
    -moz-letter-spacing: 0.5px;
    -ms-letter-spacing: 0.5px;
    display: block;
    width: 100%;
    zoom: 1;
}

.post-content div {
    text-align: center;
    -ms-text-align: center;
    display: block;
    width: 100%;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 0 auto 20px;
    display: block;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    -webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.post-footer {
    text-align: right;
}

/* 分页导航样式 */
.pagination {
    margin: 40px 0;
    text-align: center;
    display: flex;
    justify-content: center;
}

.pagination-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.pagination-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--card-bg);
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    min-width: 40px;
    height: 40px;
}

.pagination-item:hover {
    border-color: var(--link-color);
    background-color: rgba(74, 144, 226, 0.05);
    color: var(--link-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pagination-item.active {
    background-color: var(--link-color);
    border-color: var(--link-color);
    color: white;
}

.pagination-item.active:hover {
    background-color: var(--link-hover);
    border-color: var(--link-hover);
}

.pagination-prev, .pagination-next {
    min-width: auto;
}

.pagination-prev i, .pagination-next i {
    margin: 0 5px;
}

/* 分享按钮样式 */
.share-section {
    margin: 40px 0;
    padding: 25px;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.share-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.share-title i {
    margin-right: 8px;
    color: var(--link-color);
}

.share-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

/* 各分享平台的颜色 */
.share-wechat:hover {
    background-color: #07c160;
    border-color: #07c160;
}

.share-qq:hover {
    background-color: #12b7f5;
    border-color: #12b7f5;
}

.share-weibo:hover {
    background-color: #e6162d;
    border-color: #e6162d;
}

.share-zhihu:hover {
    background-color: #0084ff;
    border-color: #0084ff;
}

.share-tiktok:hover {
    background-color: #000000;
    border-color: #000000;
}

.share-copy:hover {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* 分享消息提示 */
.share-message {
    display: none;
    margin-top: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.share-message.share-success {
    background-color: rgba(7, 193, 96, 0.1);
    color: #07c160;
    border: 1px solid rgba(7, 193, 96, 0.3);
}

.share-message.share-info {
    background-color: rgba(74, 144, 226, 0.1);
    color: #4a90e2;
    border: 1px solid rgba(74, 144, 226, 0.3);
}

.share-message.share-error {
    background-color: rgba(230, 22, 45, 0.1);
    color: #e6162d;
    border: 1px solid rgba(230, 22, 45, 0.3);
}

/* 微信和抖音二维码弹窗样式 */
.wechat-qrcode,
.tiktok-qrcode {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.qrcode-content {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 300px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

.qrcode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.qrcode-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.close-qrcode {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-qrcode:hover {
    background-color: #f0f0f0;
    color: #333;
}

.qrcode-image {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.qrcode-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.qrcode-tip {
    text-align: center;
}

.qrcode-tip p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 深色主题适配 */
[data-theme="dark"] .qrcode-content {
    background-color: var(--card-bg);
}

[data-theme="dark"] .qrcode-header h4 {
    color: var(--text-color);
}

[data-theme="dark"] .qrcode-tip p {
    color: var(--text-light);
}

[data-theme="dark"] .qrcode-image {
    background-color: rgba(255, 255, 255, 0.05);
}

.read-more {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    text-decoration: none;
    color: #667eea;
    font-weight: 500;
    transition: all 0.3s;
    -webkit-transition: all 0.3s;
    -moz-transition: all 0.3s;
    -o-transition: all 0.3s;
    outline: none;
}

.read-more i {
    margin-left: 5px;
    transition: transform 0.3s;
    -webkit-transition: -webkit-transform 0.3s;
    -moz-transition: -moz-transform 0.3s;
    -o-transition: -o-transform 0.3s;
}

.read-more:hover i {
    transform: translateX(3px);
    -webkit-transform: translateX(3px);
    -moz-transform: translateX(3px);
    -ms-transform: translateX(3px);
    -o-transform: translateX(3px);
}

/* 文章详情页 */
.post-detail {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

.post-detail .post-title {
    font-size: 32px;
    margin-bottom: 20px;
}

/* 页面标题 */
.page-title {
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    display: inline-block;
}

/* 归档样式 */
.archives {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 30px;
}

.archive-year {
    margin-bottom: 30px;
}

.year-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.archive-month {
    margin-bottom: 20px;
}

.month-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--link-color);
}

.archive-list {
    list-style: none;
    padding-left: 20px;
}

.archive-list li {
    margin-bottom: 10px;
}

.archive-list li a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s;
}

.archive-list li a:hover {
    color: var(--link-color);
}

.archive-date {
    font-size: 14px;
    color: #999;
    margin-left: 10px;
}

/* 关于页 */
.page-content {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

.page-content h3 {
    font-size: 22px;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
}

.page-content p {
    margin-bottom: 15px;
    font-size: 16px;
    color: #555;
}

.contact-list {
    list-style: none;
    padding-left: 0;
}

.contact-list li {
    margin-bottom: 10px;
    font-size: 16px;
}

.contact-list li i {
    margin-right: 10px;
    color: #667eea;
}

.contact-list li a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.contact-list li a:hover {
    color: #667eea;
}

/* 分类页 */
.category-description {
    font-size: 16px;
    margin-bottom: 30px;
    color: #666;
    background-color: #f0f4f8;
    padding: 20px;
    border-radius: 8px;
}

/* 侧边栏组件 */
.widget {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 20px;
}

.widget-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.widget-content {
    font-size: 14px;
    color: #555;
}

.category-list {
    list-style: none;
    padding-left: 0;
}

.category-list li {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-list li a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.category-list li a:hover {
    color: #667eea;
}

.category-list li.active a {
    color: #667eea;
    font-weight: 500;
}

.count {
    font-size: 12px;
    color: #999;
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 10px;
}

/* 页脚样式 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 30px 0;
    margin-top: 40px;
}

.footer-content {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.social-links {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    gap: 15px;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.social-links a {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
    -webkit-transition: all 0.3s;
    -moz-transition: all 0.3s;
    -o-transition: all 0.3s;
}

.social-links a:hover {
    background-color: #667eea;
    transform: translateY(-3px);
    -webkit-transform: translateY(-3px);
    -moz-transform: translateY(-3px);
    -ms-transform: translateY(-3px);
    -o-transform: translateY(-3px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    /* 移动端菜单按钮显示 */
    .mobile-menu-btn {
        display: block;
        position: absolute;
        right: 20px;
        top: 20px;
    }

    /* 桌面导航菜单隐藏 */
    .nav {
        display: none;
    }

    /* 移动端导航容器样式 */
    .mobile-nav {
        display: none;
        background-color: var(--card-bg);
        border-top: 1px solid var(--border-color);
        padding-top: 10px;
    }

    .mobile-nav ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mobile-nav ul li {
        margin-bottom: 10px;
    }

    .mobile-nav ul li a {
        display: block;
        padding: 10px 0;
        text-decoration: none;
        color: #333;
    }

    .mobile-nav ul li a:hover {
        color: #667eea;
    }

    .content-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .post {
        padding: 20px;
    }

    .post-detail {
        padding: 20px;
    }

    .post-detail .post-title {
        font-size: 24px;
    }

    .page-title {
        font-size: 24px;
    }

    .archives {
        padding: 20px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .social-links {
        margin-top: 20px;
    }
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #667eea;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    outline: none;
}

.btn:hover {
    background-color: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.btn-primary {
    background-color: #667eea;
}

.btn-primary:hover {
    background-color: #5a6fd8;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

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

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-actions {
    margin-top: 30px;
}

/* 消息提示样式 */
.alert {
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.published {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.draft {
    background-color: #fff3cd;
    color: #856404;
}

.status-badge.archived {
    background-color: #f8d7da;
    color: #721c24;
}

/* 角色标签 */
.role-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.role-badge.admin {
    background-color: #d4edda;
    color: #155724;
}

.role-badge.editor {
    background-color: #cce7ff;
    color: #004085;
}

.role-badge.user {
    background-color: #f8d7da;
    color: #721c24;
}

/* 文本对齐 */
.text-center {
    text-align: center;
}

/* 必填项标识 */
.required {
    color: #dc3545;
}

/* 无数据提示 */
.no-posts {
    text-align: center;
    padding: 40px;
    color: #999;
    background-color: #f9f9f9;
    border-radius: 8px;
}