* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 数据统计仪表板样式 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-sub {
    font-size: 12px;
    color: #999;
}

.dashboard-lists {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.dashboard-list {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.dashboard-list h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.list-container {
    max-height: 300px;
    overflow-y: auto;
}

.list-item {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.list-item-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.list-item-content {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.list-item-time {
    font-size: 12px;
    color: #999;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    overflow-x: hidden;
    width: 100%;
}

.header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
}

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

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover {
    color: #3498db;
}

.main {
    padding: 2rem 0;
}

.main .container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    max-width: 100%;
    overflow-x: hidden;
    width: 100%;
    min-height: 0; /* 防止grid items溢出 */
    align-items: start; /* 确保顶部对齐 */
}

.sidebar {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    height: fit-content;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 20px;
    align-self: start;
}

.sidebar > div {
    margin-bottom: 2rem;
}

.sidebar > div:first-child {
    margin-top: 0;
}

.sidebar > div:last-child {
    margin-bottom: 0;
}

.sidebar h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

/* 搜索框样式 */
.search-box {
    margin: 0 0 2rem 0;
}

.search-box form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.search-btn {
    width: 100%;
    padding: 0.5rem 1rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #2980b9;
}

.search-result-info {
    padding: 1rem;
    background: #f0f8ff;
    border-left: 4px solid #3498db;
    margin-bottom: 1rem;
    font-size: 14px;
    color: #666;
}

.category-filter ul {
    list-style: none;
}

.category-filter li {
    margin-bottom: 0.5rem;
}

.category-filter a {
    display: block;
    padding: 0.5rem 1rem;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.category-filter a:hover,
.category-filter a.active {
    background: #3498db;
    color: #fff;
}

.stats {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.content {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    min-width: 0; /* 允许内容收缩 */
    box-sizing: border-box;
    align-self: start;
}

.article-list {
    min-height: 400px;
}

.article-item {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.article-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #d0d0d0;
}

.article-item:last-child {
    margin-bottom: 0;
}

.article-title {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s;
}

.article-item:hover .article-title {
    color: #3498db;
}

.article-meta {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #f0f0f0;
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.article-meta span:first-child {
    //background: #e3f2fd;
    //color: #1976d2;
}

.article-excerpt {
    color: #555;
    line-height: 1.7;
    font-size: 0.95rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.pagination {
    margin-top: 2rem;
    text-align: center;
}

.pagination-container {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.pagination-info {
    color: #666;
    font-size: 0.9rem;
    text-align: center;
    padding: 0.5rem;
    margin-bottom: 1rem;
}

.pagination button {
    background: #fff;
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    color: #666;
    font-size: 0.9rem;
}

.pagination button:hover {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.pagination button.active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.pagination button:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    border-color: #e0e0e0;
}

.pagination button:disabled:hover {
    background: #f5f5f5;
    color: #999;
    border-color: #e0e0e0;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.article-detail h1 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.article-detail .meta {
    color: #666;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 1rem;
}

.article-detail .content {
    line-height: 1.8;
    font-size: 1.1rem;
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
}

/* Quill编辑器格式化样式支持（.content类） */
/* 字体大小 */
.article-detail .content .ql-size-small {
    font-size: 0.75em;
}

.article-detail .content .ql-size-large {
    font-size: 1.5em;
}

.article-detail .content .ql-size-huge {
    font-size: 2.5em;
}

/* 代码块样式 */
.article-detail .content code,
.article-detail .content .hljs {
    background: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.article-detail .content pre {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1rem 0;
}

.article-detail .content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

/* 列表样式 */
.article-detail .content ul,
.article-detail .content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.article-detail .content li {
    margin-bottom: 0.5rem;
}

/* 引用块 */
.article-detail .content blockquote {
    margin: 1rem 0;
    padding-left: 1rem;
    border-left: 4px solid #ccc;
    color: #666;
}

/* 加粗、斜体、下划线 */
.article-detail .content strong,
.article-detail .content b {
    font-weight: 600;
}

.article-detail .content em,
.article-detail .content i {
    font-style: italic;
}

.article-detail .content u {
    text-decoration: underline;
}

.article-detail .content s {
    text-decoration: line-through;
}

/* 标题样式 */
.article-detail .content h1 {
    font-size: 2em;
    margin: 1.5rem 0 1rem 0;
}

.article-detail .content h2 {
    font-size: 1.5em;
    margin: 1.3rem 0 0.8rem 0;
}

.article-detail .content h3 {
    font-size: 1.17em;
    margin: 1rem 0 0.7rem 0;
}

.article-detail .content h4 {
    font-size: 1em;
    margin: 1rem 0 0.7rem 0;
}

.article-detail .content h5 {
    font-size: 0.83em;
    margin: 1rem 0 0.75rem 0;
}

.article-detail .content h6 {
    font-size: 0.67em;
    margin: 1rem 0 0.75rem 0;
}

.comments-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.comment-form {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input {
    width: 48%;
    margin-right: 4%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:last-child {
    margin-right: 0;
}

.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
}

.comment-form button {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.comment-form button:hover {
    background: #2980b9;
}

.comment-item {
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-avatar {
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: #f5f5f5;
}

.comment-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.comment-author {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.comment-date {
    color: #666;
    font-size: 0.9rem;
}

.comment-content {
    color: #555;
    line-height: 1.6;
}

.loading {
    text-align: center;
    color: #666;
    padding: 2rem;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    border-left: 4px solid #f44336;
}

.success {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    border-left: 4px solid #4caf50;
}

@media (max-width: 768px) {
    .main .container {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 100vw;
        overflow-x: hidden;
    }
}

/* 更严格的小屏幕适配 */
@media (max-width: 1024px) {
    .main .container {
        grid-template-columns: 200px 1fr;
        gap: 1.5rem;
    }
    
    .sidebar {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
        max-width: 100vw;
    }
    
    .main .container {
        gap: 0.5rem;
    }
    
    .content {
        padding: 1rem;
    }
    
    .modal-content {
        margin: 2% auto;
        width: 95%;
        padding: 1rem;
    }
    
    .form-group input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .latest-articles,
    .related-info,
    .article-nav {
        margin-top: 1rem;
        padding-top: 1rem;
    }
    
    .settings-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* 移动设备表格优化 */
    .data-table {
        font-size: 0.8rem;
    }
    
    .data-table td,
    .data-table th {
        padding: 0.5rem 0.25rem;
    }
    
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .action-buttons button {
        font-size: 0.7rem;
        padding: 0.3rem 0.5rem;
    }
    
    /* 移动端隐藏一些不重要的列 */
    #articlesTable th:nth-child(6),
    #articlesTable td:nth-child(6) { /* 阅读量 */
        display: none;
    }
    
    #commentsTable th:nth-child(4),
    #commentsTable td:nth-child(4) { /* QQ号 */
        display: none;
    }
    
    #commentsTable th:nth-child(5),
    #commentsTable td:nth-child(5) { /* 邮箱 */
        display: none;
    }
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* 批量操作样式 */
.batch-actions {
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 4px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.batch-actions .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.batch-btn {
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.batch-btn:hover {
    background: #f0f0f0;
    border-color: #999;
}

.selected-count {
    margin-left: auto;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.article-checkbox,
.comment-checkbox {
    cursor: pointer;
}

.admin-header {
    background: #2c3e50;
    color: #fff;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.admin-nav {
    margin-bottom: 2rem;
}

.admin-nav button {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    margin-right: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.admin-nav button:hover {
    background: #2980b9;
}

.admin-nav button.active {
    background: #2c3e50;
}

.admin-section {
    display: none;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.admin-section.active {
    display: block;
}

.admin-section h2 {
    color: #2c3e50;
    padding: 0;
    margin: 0 0 2rem 0;
    font-size: 1.4rem;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.table-container {
    background: #fff;
    border-radius: 8px;
    overflow-x: auto;
    margin-top: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 数据表格样式优化 */
.data-table {
    width: 100%;
    min-width: 1100px;  /* 增加最小宽度 */
    border-collapse: collapse;
}

/* 评论表格需要更宽 */
#commentsTable {
    min-width: 1100px;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background: #f5f5f5;
    font-weight: 600;
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: #f9f9f9;
}

/* 动作按钮单元格 */
.action-buttons {
    white-space: nowrap;
    min-width: 200px;
}

.action-buttons button {
    margin-right: 3px;
    margin-bottom: 3px;
}

/* 评论表格的操作按钮特殊处理 */
#commentsTable .action-buttons {
    min-width: 205px;
}

#commentsTable .action-buttons button {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
}

/* 表格中的复选框 */
.data-table input[type="checkbox"] {
    cursor: pointer;
    margin: 0;
}

.article-form .form-group {
    margin-bottom: 1.5rem;
}

.article-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.article-form input[type="text"],
.article-form select,
.article-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.article-form textarea {
    min-height: 300px;
    resize: vertical;
}

.article-form button {
    background: #27ae60;
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.article-form button:hover {
    background: #229954;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    border: 1px solid #ddd;
    padding: 0.75rem;
    text-align: left;
}

.data-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.data-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.data-table tbody tr:hover {
    background: #e3f2fd;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.btn-edit,
.btn-edit-comment,
.btn-delete,
.btn-approve,
.btn-reject {
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-edit,
.btn-edit-comment {
    background: #f0ad4e;
    color: #fff;
}

.btn-edit:hover,
.btn-edit-comment:hover {
    background: #ec971f;
}

.btn-delete {
    background: #d9534f;
    color: #fff;
}

.btn-delete:hover {
    background: #c9302c;
}

.btn-approve {
    background: #5cb85c;
    color: #fff;
}

.btn-approve:hover {
    background: #449d44;
}

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

.btn-reject:hover {
    background: #545b62;
}

.status-published,
.status-draft,
.status-approved,
.status-pending,
.status-rejected {
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    display: inline-block;
    text-align: center;
    min-width: 60px;
}

.status-published,
.status-approved {
    color: #fff;
    background: #5cb85c;
}

.status-draft,
.status-pending {
    color: #fff;
    background: #f0ad4e;
}

.status-rejected {
    color: #fff;
    background: #d9534f;
}

.comment-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #ddd;
    vertical-align: middle;
}

.avatar-cell {
    text-align: center;
    padding: 0.75rem;
}

.data-table th,
.data-table td {
    border: 1px solid #ddd;
    padding: 0.75rem;
    text-align: left;
    font-size: 0.9rem;
}

.data-table th {
    background: #f5f5f5;
    color: #333;
    font-weight: 600;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: #fff;
    border: 1px solid #ddd;
    table-layout: fixed;
}

.data-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.data-table tbody tr:hover {
    background: #e3f2fd;
}

/* 文章管理表格列宽设置 */
#articlesTable th:nth-child(1) { width: 30px; }   /* 复选框 */
#articlesTable th:nth-child(2) { width: 35px; }   /* ID */
#articlesTable th:nth-child(3) { width: 23%; }    /* 标题 */
#articlesTable th:nth-child(4) { width: 60px; }  /* 作者 */
#articlesTable th:nth-child(5) { width: 60px; }  /* 分类 */
#articlesTable th:nth-child(6) { width: 60px; }   /* 状态 */
#articlesTable th:nth-child(7) { width: 60px; }   /* 阅读量 */
#articlesTable th:nth-child(8) { width: 110px; }  /* 发布时间 */
#articlesTable th:nth-child(9) { width: 130px; }  /* 操作 */

/* 评论管理表格列宽设置 */
#commentsTable th:nth-child(1) { width: 30px; }   /* 复选框 */
#commentsTable th:nth-child(2) { width: 35px; }   /* ID */
#commentsTable th:nth-child(3) { width: 14%; }    /* 文章标题 */
#commentsTable th:nth-child(4) { width: 75px; }  /* 评论者 */
#commentsTable th:nth-child(5) { width: 80px; }  /* QQ号 */
#commentsTable th:nth-child(6) { width: 12%; }    /* 邮箱 */
#commentsTable th:nth-child(7) { width: 50px; }   /* 头像 */
#commentsTable th:nth-child(8) { width: 15%; }    /* 评论内容 */
#commentsTable th:nth-child(9) { width: 70px; }   /* 状态 */
#commentsTable th:nth-child(10) { width: 120px; }  /* 时间 */
#commentsTable th:nth-child(11) { width: 180px; } /* 操作 - 增加宽度 */

/* 分类管理表格列宽 */
#categoriesTable th:nth-child(1) { width: 50px; }   /* ID */
#categoriesTable th:nth-child(2) { width: 20%; }    /* 分类名称 */
#categoriesTable th:nth-child(3) { width: 80px; }   /* 层级 */
#categoriesTable th:nth-child(4) { width: 25%; }    /* 分类描述 */
#categoriesTable th:nth-child(5) { width: 70px; }   /* 排序 */
#categoriesTable th:nth-child(6) { width: 120px; }  /* 创建时间 */
#categoriesTable th:nth-child(7) { width: 80px; }   /* 文章数量 */
#categoriesTable th:nth-child(8) { width: 150px; }  /* 操作 */

/* 管理员管理表格列宽 */
#adminsTable th:nth-child(1) { width: 50px; }       /* ID */
#adminsTable th:nth-child(2) { width: 120px; }      /* 用户名 */
#adminsTable th:nth-child(3) { width: 180px; }      /* 邮箱 */
#adminsTable th:nth-child(4) { width: 120px; }      /* 创建时间 */
#adminsTable th:nth-child(5) { width: 120px; }      /* 最后登录 */
#adminsTable th:nth-child(6) { width: 100px; }      /* 登录失败次数 */
#adminsTable th:nth-child(7) { width: 80px; }       /* 账户状态 */
#adminsTable th:nth-child(8) { width: 200px; }      /* 操作 */

/* IP拉黑表格列宽 */
#ipBlacklistTable th:nth-child(1) { width: 40px; }  /* 复选框 */
#ipBlacklistTable th:nth-child(2) { width: 50px; }  /* ID */
#ipBlacklistTable th:nth-child(3) { width: 130px; } /* IP地址 */
#ipBlacklistTable th:nth-child(4) { width: 80px; }  /* 拉黑类型 */
#ipBlacklistTable th:nth-child(5) { width: 20%; }   /* 拉黑原因 */
#ipBlacklistTable th:nth-child(6) { width: 80px; }  /* 拦截次数 */
#ipBlacklistTable th:nth-child(7) { width: 120px; } /* 创建时间 */
#ipBlacklistTable th:nth-child(8) { width: 120px; } /* 过期时间 */
#ipBlacklistTable th:nth-child(9) { width: 70px; }  /* 状态 */
#ipBlacklistTable th:nth-child(10) { width: 180px; }/* 操作 */

/* 友情链接表格列宽 */
#friendLinksTable th:nth-child(1) { width: 50px; }  /* ID */
#friendLinksTable th:nth-child(2) { width: 80px; }  /* Logo */
#friendLinksTable th:nth-child(3) { width: 15%; }   /* 名称 */
#friendLinksTable th:nth-child(4) { width: 25%; }   /* 链接地址 */
#friendLinksTable th:nth-child(5) { width: 20%; }   /* 描述 */
#friendLinksTable th:nth-child(6) { width: 70px; }  /* 排序 */
#friendLinksTable th:nth-child(7) { width: 120px; } /* 创建时间 */
#friendLinksTable th:nth-child(8) { width: 150px; } /* 操作 */

/* 文本溢出处理 */
.data-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0.75rem 0.5rem;
}

.data-table .content-cell,
.data-table .title-cell {
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-buttons {
    white-space: nowrap;
}

.article-detail-page {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 400px;
}

.breadcrumb {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    color: #666;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.article-detail h1 {
    font-size: 2.2rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.article-detail .meta {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: #666;
}

.article-detail .content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 3rem;
}

.no-comments {
    text-align: center;
    color: #666;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 4px;
    font-style: italic;
}

.btn-back {
    display: inline-block;
    background: #3498db;
    color: #fff;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 1rem;
    transition: background 0.3s;
}

.btn-back:hover {
    background: #2980b9;
}

.article-nav {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    height: fit-content;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.article-nav h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.1rem;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: block;
    padding: 0.6rem 0.4rem;
    color: #3498db;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
}

.nav-link:hover {
    background: #3498db;
    color: #fff;
}

.latest-articles {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.latest-articles h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.1rem;
}

.latest-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.latest-item {
    display: block;
    padding: 0.5rem 1rem;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.latest-item:hover {
    background: #3498db;
    color: #fff;
}

.latest-item.current {
    background: #3498db;
    color: #fff;
}

.latest-item-title {
    font-weight: normal;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.latest-item-meta {
    font-size: 0.8rem;
    opacity: 0.8;
    display: flex;
    justify-content: space-between;
}

.related-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.related-info h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.1rem;
}

.article-stats {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.stat-label {
    color: #666;
}

.stat-value {
    color: #333;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.preview-item {
    position: relative;
    border: 2px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem;
    background: #f9f9f9;
}

.preview-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.preview-label {
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

/* 评论字符计数器样式 */
.char-counter {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
    text-align: right;
}

.char-counter span {
    font-weight: 600;
}

/* 评论表单增强样式 */
.comment-form textarea {
    transition: border-color 0.3s ease;
}

.comment-form textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.comment-form button[type="submit"] {
    transition: background-color 0.3s ease;
}

.comment-form button[type="submit"]:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.form-hint {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* 时间输入框样式 */
input[type="datetime-local"] {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
    background: #fff;
    color: #333;
}

input[type="datetime-local"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* 时间字段的特殊提示样式 */
.time-field .form-hint {
    color: #e67e22;
    font-weight: 500;
    background: #fef9e7;
    padding: 0.5rem;
    border-radius: 4px;
    border-left: 3px solid #f39c12;
    margin-top: 0.5rem;
}

/* 数字输入框样式 */
input[type="number"] {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
    background: #fff;
    color: #333;
}

input[type="number"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* 阅读量字段样式 */
input[type="number"][name="views"] {
    max-width: 200px;
}

input[type="number"][name="views"]::-webkit-outer-spin-button,
input[type="number"][name="views"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"][name="views"] {
    -moz-appearance: textfield;
}

/* 用户信息和登出按钮样式 */
.user-info {
    color: #666;
    margin-right: 1rem;
    font-size: 0.9rem;
}

.logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background: #c0392b;
}

/* 登录页面特殊样式已在login.html中内联定义 */

/* AdSense管理页面样式 */
.adsense-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.adsense-form-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.adsense-form {
    max-width: none;
}

.adsense-form .form-group {
    margin-bottom: 1.5rem;
}

.adsense-form textarea {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.75rem;
    resize: vertical;
    min-height: 120px;
}

.adsense-form textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.adsense-info {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    height: fit-content;
}

.adsense-help {
    list-style: none;
    padding: 0;
    margin: 0;
}

.adsense-help li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.adsense-help li:last-child {
    border-bottom: none;
}

.adsense-preview {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #28a745;
}

.adsense-preview h4 {
    margin: 0 0 0.5rem 0;
    color: #28a745;
}

.adsense-preview a {
    color: #007bff;
    text-decoration: none;
}

.adsense-preview a:hover {
    text-decoration: underline;
}

.rss-preview {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fff3cd;
    border-radius: 4px;
    border-left: 4px solid #ff6600;
}

.rss-preview h4 {
    margin: 0 0 0.5rem 0;
    color: #ff6600;
}

.rss-preview a {
    color: #ff6600;
    text-decoration: none;
    font-weight: bold;
}

.rss-preview a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .adsense-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .adsense-form-section,
    .adsense-info {
        padding: 1rem;
    }
}

/* 前端AdSense广告位样式 */
.adsense-sidebar {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.adsense-article-top,
.adsense-article-bottom {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.adsense-article-top {
    margin-bottom: 2rem;
}

.adsense-article-bottom {
    margin-top: 2rem;
}

/* 当广告位为空时的样式 */
.adsense-sidebar:empty,
.adsense-article-top:empty,
.adsense-article-bottom:empty {
    display: none;
}

/* 确保AdSense代码正常显示 */
.adsense-sidebar ins,
.adsense-article-top ins,
.adsense-article-bottom ins {
    background: transparent !important;
}

/* 移动端广告位调整 */
@media (max-width: 768px) {
    .adsense-sidebar {
        min-height: 200px;
        margin: 0.5rem 0;
        padding: 0.5rem;
    }
    
    .adsense-article-top,
    .adsense-article-bottom {
        min-height: 150px;
        margin: 1rem 0;
        padding: 0.5rem;
    }
}

/* RSS订阅样式 */
.rss-link {
    color: #ff6600 !important;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s;
}

.rss-link:hover {
    color: #ff4400 !important;
    text-decoration: underline;
}

.rss-subscribe {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    text-align: center;
}

.rss-subscribe h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
}

.rss-subscribe p {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.rss-button {
    display: inline-block;
    background: linear-gradient(135deg, #ff6600, #ff4400);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(255, 102, 0, 0.3);
}

.rss-button:hover {
    background: linear-gradient(135deg, #ff4400, #ff2200);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 102, 0, 0.4);
    color: white;
    text-decoration: none;
}

.rss-info {
    margin-top: 0.75rem;
}

.rss-info small {
    color: #999;
    font-size: 0.8rem;
}

/* 移动端RSS样式调整 */
@media (max-width: 768px) {
    .rss-subscribe {
        padding: 1rem;
        margin: 0.5rem 0;
    }
    
    .rss-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}

/* SEO管理页面样式 */
.seo-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.seo-form-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.seo-form {
    max-width: none;
}

.seo-form .form-group {
    margin-bottom: 1.5rem;
}

.seo-form h4 {
    margin: 2rem 0 1rem 0;
    color: #495057;
    font-size: 1.1rem;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 0.5rem;
}

.seo-form textarea {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.75rem;
    resize: vertical;
    min-height: 100px;
}

.seo-form textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.seo-info {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    height: fit-content;
}

.seo-tools {
    margin-bottom: 2rem;
}

.tool-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border-left: 4px solid #007bff;
}

.tool-item h4 {
    margin: 0 0 0.5rem 0;
    color: #007bff;
    font-size: 1rem;
}

.tool-item p {
    margin: 0.5rem 0;
}

.tool-item a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.tool-item a:hover {
    text-decoration: underline;
}

.tool-item small {
    color: #6c757d;
    font-size: 0.85rem;
}

.seo-help {
    list-style: none;
    padding: 0;
    margin: 0;
}

.seo-help li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.seo-help li:last-child {
    border-bottom: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .seo-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .seo-form-section,
    .seo-info {
        padding: 1rem;
    }
    
    .tool-item {
        padding: 0.75rem;
    }
}

/* 分类层级样式 */
.category-level-0 {
    background-color: #f8f9fa;
    font-weight: bold;
}

.category-level-1 {
    background-color: #ffffff;
    border-left: 3px solid #007bff;
}

.level-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    text-align: center;
    min-width: 60px;
    display: inline-block;
}

.level-0 {
    background-color: #007bff;
    color: white;
}

.level-1 {
    background-color: #28a745;
    color: white;
}

/* 分类表格特殊样式 */
#categoriesTable .category-level-1 td:nth-child(2) {
    padding-left: 1.5rem;
    color: #6c757d;
}

#categoriesTable .category-level-0 td:nth-child(2) {
    color: #495057;
    font-weight: 600;
}

/* 首页折叠式分类样式 */
.category-item {
    margin-bottom: 0.25rem;
}

.category-item.has-children {
    margin-bottom: 0.5rem;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.category-link {
    flex: 1;
    text-decoration: none;
    color: #333;
    padding: 0.25rem 0;
    display: block;
    transition: color 0.3s;
}

.category-link:hover {
    color: #007bff;
    text-decoration: none;
}

.category-toggle {
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    color: #666;
    font-size: 0.9rem;
    user-select: none;
    transition: color 0.3s;
}

.category-toggle:hover {
    color: #007bff;
}

.subcategory-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0 1rem;
    border-left: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.subcategory-item {
    margin: 0;
    padding-left: 1rem;
    position: relative;
}

.subcategory-item::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 50%;
    width: 12px;
    height: 1px;
    background-color: #e9ecef;
}

.subcategory-item .category-link {
    font-size: 0.9rem;
    color: #666;
    padding: 0.25rem 0;
}

.subcategory-item .category-link:hover {
    //color: #007bff;
}

.category-item.active > .category-header > .category-link {
  //  color: #007bff;
    font-weight: 600;
}

.subcategory-item.active .category-link {
  //  color: #000;
}

.category-item.expanded > .category-header {
    margin-bottom: 0.5rem;
}

.category-item.expanded .category-toggle {
    //color: #007bff;
}

/* 移动端分类样式调整 */
@media (max-width: 768px) {
    .category-header {
        padding: 0.75rem 0;
    }
    
    .category-link {
        font-size: 0.9rem;
    }
    
    .subcategory-list {
        margin-left: 0.5rem;
    }
    
    .subcategory-item {
        padding-left: 0.75rem;
    }
    
    .subcategory-item .category-link {
        font-size: 0.85rem;
    }
}

/* 标签功能样式 */
.tag-suggestions {
    position: relative;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tag-suggestion {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.tag-suggestion:hover {
    background-color: #f8f9fa;
}

.tag-suggestion:last-child {
    border-bottom: none;
}

.selected-tags {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.85rem;
    border: 1px solid #ced4da;
}

.tag-item.popular {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.tag-item .tag-remove {
    margin-left: 0.5rem;
    cursor: pointer;
    color: #6c757d;
    font-weight: bold;
}

.tag-item .tag-remove:hover {
    color: #dc3545;
}

/* 文章标签显示样式 */
.article-tags {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.article-tag {
    display: inline-block;
    background: #f8f9fa;
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    text-decoration: none;
    border: 1px solid #e9ecef;
    transition: all 0.3s;
}

.article-tag:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
    text-decoration: none;
}

/* 热门标签云样式 */
.tag-cloud {
    margin: 1rem 0;
}

.tag-cloud .tag-item {
    margin: 0.25rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.tag-cloud .tag-item:hover {
    transform: translateY(-2px);
}

/* 标签使用频率样式 */
.tag-frequency-1 { font-size: 0.8rem; opacity: 0.7; }
.tag-frequency-2 { font-size: 0.9rem; opacity: 0.8; }
.tag-frequency-3 { font-size: 1rem; opacity: 0.9; }
.tag-frequency-4 { font-size: 1.1rem; opacity: 1; }
.tag-frequency-5 { font-size: 1.2rem; opacity: 1; font-weight: bold; }

/* 移动端标签样式调整 */
@media (max-width: 768px) {
    .tag-suggestions {
        max-height: 150px;
    }
    
    .selected-tags {
        gap: 0.25rem;
    }
    
    .tag-item {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }
    
    .article-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
}

.article-image {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.editor-toolbar {
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.toolbar-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.toolbar-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.editor-toolbar + textarea {
    border-radius: 0 0 4px 4px;
    border-top: none;
}

.image-placeholder {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.9rem;
    margin: 0 2px;
    border: 1px dashed #1976d2;
}

.toolbar-help {
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
    margin-left: auto;
}

.editor-dropping {
    border: 2px dashed #3498db !important;
    background-color: #e3f2fd !important;
}

.comment-context {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.comment-context h4 {
    margin-bottom: 1rem;
    color: #495057;
    font-size: 1.1rem;
}

.comment-context-content {
    background: #fff;
    border-radius: 4px;
    padding: 1rem;
    border-left: 4px solid #007bff;
    max-height: 300px;
    overflow-y: auto;
}

.context-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #6c757d;
}

.context-content img {
    max-width: 100%;
    height: auto;
    margin: 0.5rem 0;
}

/* Quill编辑器格式化样式支持（.context-content类） */
/* 字体大小 */
.context-content .ql-size-small {
    font-size: 0.75em;
}

.context-content .ql-size-large {
    font-size: 1.5em;
}

.context-content .ql-size-huge {
    font-size: 2.5em;
}

/* 代码块样式 */
.context-content code,
.context-content .hljs {
    background: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.context-content pre {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1rem 0;
}

.context-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

/* 列表样式 */
.context-content ul,
.context-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.context-content li {
    margin-bottom: 0.5rem;
}

/* 引用块 */
.context-content blockquote {
    margin: 1rem 0;
    padding-left: 1rem;
    border-left: 4px solid #ccc;
    color: #666;
}

/* 加粗、斜体、下划线 */
.context-content strong,
.context-content b {
    font-weight: 600;
}

.context-content em,
.context-content i {
    font-style: italic;
}

.context-content u {
    text-decoration: underline;
}

.context-content s {
    text-decoration: line-through;
}

/* 标题样式 */
.context-content h1 {
    font-size: 1.8em;
    margin: 1rem 0 0.8rem 0;
}

.context-content h2 {
    font-size: 1.4em;
    margin: 0.8rem 0 0.6rem 0;
}

.context-content h3 {
    font-size: 1.1em;
    margin: 0.7rem 0 0.5rem 0;
}

.context-content h4,
.context-content h5,
.context-content h6 {
    font-size: 1em;
    margin: 0.5rem 0 0.3rem 0;
}

.hidden-content {

}

.hidden-content::before {

}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}

.btn-primary {
    background: #27ae60;
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background: #229954;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: #545b62;
}

.settings-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.settings-form-section {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.settings-form-section h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.settings-form .form-group {
    margin-bottom: 1.5rem;
}

.settings-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.settings-form input[type="text"],
.settings-form input[type="number"],
.settings-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.settings-form input:focus,
.settings-form textarea:focus {
    outline: none;
    border-color: #3498db;
}

.settings-form button {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.settings-form button:hover {
    background: #2980b9;
}

.settings-info {
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.settings-info h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.settings-help {
    list-style: none;
    padding: 0;
}

.settings-help li {
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: #fff;
    border-radius: 4px;
    line-height: 1.5;
    border: 1px solid #eee;
}

.settings-help li strong {
    color: #3498db;
    display: block;
    margin-bottom: 0.3rem;
}

@media (max-width: 768px) {
    .settings-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ==================== 完整响应式设计 ==================== */

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

/* 移动设备优化 (最大768px) */
@media (max-width: 768px) {
    /* 容器调整 */
    .container {
        padding: 0 15px;
    }
    
    /* 主布局改为单列 */
    .main .container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* 侧边栏改为横向显示 */
    .sidebar {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        padding: 1rem;
    }
    
    .sidebar > div {
        flex: 1;
        min-width: 200px;
        margin-bottom: 0;
    }
    
    /* 文章列表 */
    .article-item {
        padding: 1rem;
    }
    
    .article-title {
        font-size: 1.2rem;
    }
    
    /* 评论表单 */
    .comment-form {
        padding: 1rem;
    }
    
    .comment-form .form-row {
        flex-direction: column;
    }
    
    .comment-form .form-group {
        width: 100%;
    }
    
    /* 后台管理 */
    .admin-container {
        padding: 1rem;
    }
    
    .admin-nav {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .nav-btn {
        flex: 1;
        min-width: 120px;
        font-size: 14px;
        padding: 0.5rem;
    }
    
    /* 统计卡片 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    /* 表格容器 */
    .table-container {
        margin-top: 0.5rem;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    /* 批量操作 */
    .batch-actions {
        padding: 0.5rem;
        font-size: 12px;
    }
    
    .batch-btn {
        padding: 0.4rem 0.6rem;
        font-size: 12px;
    }
}

/* 专门的平板模式优化 (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    /* 容器调整 */
    .container {
        max-width: 900px;
        padding: 0 20px;
    }

    /* 主布局优化 - 保持两列但调整比例 */
    .main .container {
        grid-template-columns: 1fr 280px;
        gap: 1.5rem;
    }

    /* 统计卡片 - 平板模式显示3列 */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        margin-bottom: 25px;
    }

    .stat-card {
        padding: 18px;
    }

    .stat-value {
        font-size: 28px;
    }

    /* 仪表板列表优化 */
    .dashboard-lists {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .dashboard-list {
        padding: 18px;
    }

    /* 文章列表优化 */
    .article-item {
        padding: 1.2rem;
        margin-bottom: 1rem;
    }

    .article-title {
        font-size: 1.3rem;
        line-height: 1.4;
    }

    .article-meta {
        font-size: 0.9rem;
        margin: 0.8rem 0;
    }

    .article-excerpt {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* 侧边栏优化 */
    .sidebar {
        padding: 1.2rem;
    }

    .sidebar > div {
        margin-bottom: 1.5rem;
    }

    .sidebar h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    /* 分类列表优化 */
    .category-list li {
        padding: 0.7rem 0;
        font-size: 0.95rem;
    }

    /* 后台管理优化 */
    .admin-nav {
        justify-content: center;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .nav-btn {
        min-width: 140px;
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }

    /* 表格优化 */
    .data-table {
        font-size: 13px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }

    /* 表单优化 */
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.8rem;
        font-size: 0.95rem;
    }

    /* 按钮优化 */
    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.95rem;
    }

    /* 模态框优化 */
    .modal-content {
        width: 85%;
        max-width: 600px;
        margin: 5% auto;
    }

    /* 分页器优化 */
    .pagination {
        gap: 0.5rem;
    }

    .pagination .page-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    /* 评论系统优化 */
    .comment-form {
        padding: 1.2rem;
    }

    .comment-item {
        padding: 1rem;
    }

    /* 友情链接优化 */
    .friend-links-container {
        gap: 1.2rem;
    }

    .friend-link-item {
        padding: 0.8rem 1.2rem;
        min-width: 200px;
    }
}

/* 大屏平板模式优化 (1025px - 1200px) */
@media (min-width: 1025px) and (max-width: 1200px) {
    .container {
        max-width: 1100px;
    }

    /* 统计卡片显示4列 */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }

    /* 仪表板列表恢复两列 */
    .dashboard-lists {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* 主布局保持经典两列 */
    .main .container {
        grid-template-columns: 1fr 300px;
        gap: 2rem;
    }
}

/* 友情链接样式 */
.friend-links-section {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 2rem 0;
    margin-top: 2rem;
}

.friend-links-title {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.friend-link-item {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-width: 180px;
}

.friend-link-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #007bff;
    text-decoration: none;
    color: #007bff;
}

.friend-link-logo {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    margin-right: 0.75rem;
    object-fit: cover;
    flex-shrink: 0;
}

.friend-link-info {
    flex: 1;
    min-width: 0;
}

.friend-link-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-link-description {
    font-size: 0.8rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 后台管理友情链接样式 */
.friend-links-form-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.friend-link-form {
    max-width: 600px;
}

.friend-link-logo {
    max-width: 32px;
    max-height: 32px;
    border-radius: 4px;
}

.logo-cell {
    text-align: center;
    width: 60px;
}

.name-cell, .url-cell, .description-cell {
    max-width: 150px;
    word-break: break-all;
}

.url-cell a {
    color: #007bff;
    text-decoration: none;
}

.url-cell a:hover {
    text-decoration: underline;
}

/* RSS管理按钮样式 */
.btn-small {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-right: 0.5rem;
    transition: background-color 0.3s ease;
}

.btn-small:hover {
    background: #0056b3;
}

.btn-small:last-child {
    margin-right: 0;
}

/* 隐藏内容样式 */
.hidden-content {
    margin: 1rem 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.hidden-content-header {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 300;
}

.hidden-content-body {
    padding: 0.75rem;
    line-height: 1.5;
}

/* 锁定状态的隐藏内容 */
.hidden-content.locked .hidden-content-header {
    background: #f5f5f5;
    color: #666;
    border-bottom: 1px solid #ddd;
}

.hidden-content.locked .hidden-content-body {
    background: #fafafa;
    color: #888;
    text-align: center;
    font-style: italic;
}

/* 解锁状态的隐藏内容 */
.hidden-content.unlocked .hidden-content-header {
    background: #e8f5e8;
    color: #2e7d32;
    border-bottom: 1px solid #c8e6c9;
}

.hidden-content.unlocked .hidden-content-body {
    background: #f9f9f9;
    color: #333;
}

/* 手机设备 (480px) */
@media (max-width: 480px) {
    /* 基础布局优化 */
    .container {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    /* 头部优化 */
    .header {
        padding: 0.75rem 0;
        position: sticky;
        top: 0;
        background: white;
        z-index: 100;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .admin-header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .logo {
        font-size: 1.1rem;
        font-weight: 700;
    }
    
    .nav {
        display: flex;
        gap: 0.5rem;
    }
    
    .nav a {
        font-size: 13px;
        padding: 0.4rem 0.6rem;
        border-radius: 4px;
        background: #f8f9fa;
        color: #495057;
        text-decoration: none;
        transition: all 0.2s ease;
    }
    
    .nav a:hover {
        background: #007bff;
        color: white;
    }
    
    /* 主要内容区域优化 */
    .main {
        padding: 1rem 0;
    }
    
    .main .container {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    /* 侧边栏优化 */
    .sidebar {
        order: -1; /* 侧边栏移到顶部 */
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .sidebar > div {
        width: 100%;
        margin-bottom: 1rem;
        background: white;
        border-radius: 8px;
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    /* 搜索框优化 */
    .search-box h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
        color: #333;
    }
    
    .search-input {
        width: 100%;
        padding: 0.75rem;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 14px;
    }
    
    .search-btn {
        width: 100%;
        margin-top: 0.5rem;
        padding: 0.75rem;
        background: #007bff;
        color: white;
        border: none;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 500;
    }
    
    /* 分类筛选优化 */
    .category-filter h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
        color: #333;
    }
    
    .category-filter ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin: 0;
        padding: 0;
        list-style: none;
    }
    
    .category-filter a {
        padding: 0.5rem 0.75rem;
        font-size: 13px;
        background: #f8f9fa;
        color: #495057;
        text-decoration: none;
        border-radius: 20px;
        transition: all 0.2s ease;
        border: 1px solid #e9ecef;
    }
    
    .category-filter a:hover,
    .category-filter a.active {
        background: #007bff;
        color: white;
        border-color: #007bff;
    }
    
    /* 内容区域优化 */
    .content {
        width: 100%;
        order: 1;
    }
    
    /* 文章列表优化 */
    .article-item {
        padding: 1.25rem;
        margin-bottom: 1rem;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        border: 1px solid #e9ecef;
    }
    
    .article-title {
        font-size: 1.1rem;
        line-height: 1.4;
        margin-bottom: 0.75rem;
        color: #333;
        font-weight: 600;
    }
    
    .article-excerpt {
        font-size: 14px;
        line-height: 1.5;
        color: #666;
        margin-bottom: 0.75rem;
    }
    
    /* 文章元数据优化 */
    .article-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        font-size: 12px;
        color: #888;
    }
    
    .article-meta span {
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }
    
    .article-meta .category {
        background: #e3f2fd;
        color: #1976d2;
        padding: 0.25rem 0.5rem;
        border-radius: 12px;
        font-weight: 500;
    }
    
    .article-meta .views {
        color: #28a745;
        font-weight: 500;
    }
    
    /* 文章详情页面优化 */
    .article-detail-page .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .article-detail-page .sidebar {
        order: 1;
        margin-top: 2rem;
    }
    
    .article-detail-page .content {
        order: 0;
        width: 100%;
    }
    
    .article-detail {
        background: white;
        border-radius: 8px;
        padding: 1.5rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        margin-bottom: 1rem;
    }
    
    .article-detail h1 {
        font-size: 1.4rem;
        line-height: 1.4;
        margin-bottom: 1rem;
        color: #333;
        font-weight: 700;
    }
    
    .article-detail-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        font-size: 13px;
        color: #666;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid #eee;
    }
    
    .article-detail-meta span {
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }
    
    .article-content {
        font-size: 15px;
        line-height: 1.7;
        color: #333;
    }

    .article-content img {
        max-width: 100%;
        height: auto;
        border-radius: 6px;
        margin: 1rem 0;
    }

    .article-content p {
        margin-bottom: 1rem;
    }

    .article-content h2,
    .article-content h3,
    .article-content h4 {
        margin: 1.5rem 0 1rem 0;
        color: #333;
    }

    /* Quill编辑器格式化样式支持 */
    /* 字体大小 */
    .article-content .ql-size-small {
        font-size: 0.75em;
    }

    .article-content .ql-size-large {
        font-size: 1.5em;
    }

    .article-content .ql-size-huge {
        font-size: 2.5em;
    }

    /* 字体颜色 */
    .article-content .ql-color-#000000,
    .article-content [style*="color:"] {
        /* 保留内联样式 */
    }

    /* 代码块样式 */
    .article-content code,
    .article-content .hljs {
        background: #f5f5f5;
        padding: 2px 4px;
        border-radius: 3px;
        font-family: 'Courier New', monospace;
    }

    .article-content pre {
        background: #f5f5f5;
        padding: 1rem;
        border-radius: 4px;
        overflow-x: auto;
        margin: 1rem 0;
    }

    .article-content pre code {
        background: none;
        padding: 0;
        border-radius: 0;
    }

    /* 列表样式 */
    .article-content ul,
    .article-content ol {
        margin-left: 1.5rem;
        margin-bottom: 1rem;
    }

    .article-content li {
        margin-bottom: 0.5rem;
    }

    /* 引用块 */
    .article-content blockquote {
        margin: 1rem 0;
        padding-left: 1rem;
        border-left: 4px solid #ccc;
        color: #666;
    }

    /* 加粗、斜体、下划线 */
    .article-content strong,
    .article-content b {
        font-weight: 600;
    }

    .article-content em,
    .article-content i {
        font-style: italic;
    }

    .article-content u {
        text-decoration: underline;
    }

    .article-content s {
        text-decoration: line-through;
    }

    /* 标题样式 */
    .article-content h1 {
        font-size: 2em;
        margin: 1.5rem 0 1rem 0;
    }

    .article-content h5 {
        font-size: 0.83em;
        margin: 1rem 0 0.75rem 0;
    }

    .article-content h6 {
        font-size: 0.67em;
        margin: 1rem 0 0.75rem 0;
    }
    
    /* 评论区优化 */
    .comments-section {
        background: white;
        border-radius: 8px;
        padding: 1.5rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        margin-top: 1rem;
    }
    
    .comments-section h3 {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
        color: #333;
        font-weight: 600;
    }
    
    .comment-form {
        margin-bottom: 2rem;
        padding: 1rem;
        background: #f8f9fa;
        border-radius: 6px;
    }
    
    .comment-form .form-group {
        margin-bottom: 1rem;
    }
    
    .comment-form .form-group:last-of-type {
        margin-bottom: 1.5rem;
    }
    
    .comment-form input,
    .comment-form textarea {
        width: 100%;
        padding: 0.75rem;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 14px;
        font-family: inherit;
    }
    
    .comment-form input:focus,
    .comment-form textarea:focus {
        outline: none;
        border-color: #007bff;
        box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
    }
    
    .comment-form button {
        width: 100%;
        padding: 0.75rem;
        background: #007bff;
        color: white;
        border: none;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
    }
    
    .comment-item {
        padding: 1rem;
        margin-bottom: 1rem;
        background: #f8f9fa;
        border-radius: 6px;
        border-left: 3px solid #007bff;
    }
    
    .comment-header {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .comment-avatar {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        object-fit: cover;
    }
    
    .comment-author {
        font-weight: 600;
        color: #333;
        font-size: 14px;
    }
    
    .comment-date {
        font-size: 12px;
        color: #888;
        margin-left: auto;
    }
    
    .comment-content {
        font-size: 14px;
        line-height: 1.5;
        color: #555;
        margin-left: 3rem;
    }
    
    /* 后台管理界面优化 */
    .admin-container {
        flex-direction: column;
        gap: 0;
    }
    
    /* 后台导航改为汉堡菜单 */
    .mobile-menu-btn {
        display: block;
        position: fixed;
        top: 1rem;
        right: 1rem;
        z-index: 1001;
        background: #007bff;
        color: white;
        border: none;
        padding: 0.75rem;
        border-radius: 8px;
        font-size: 18px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        cursor: pointer;
    }
    
    .admin-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
        padding: 4rem 1rem 1rem 1rem;
    }
    
    .admin-nav.mobile-active {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 0.75rem;
    }
    
    .nav-btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
        padding: 1rem;
        background: white;
        color: #333;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 500;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .nav-btn:hover,
    .nav-btn.active {
        background: #007bff;
        color: white;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }
    
    /* 后台内容区域 */
    .admin-section {
        padding: 1rem;
        margin: 0;
    }
    
    .admin-section h2 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
        color: #333;
        font-weight: 600;
    }
    
    /* 统计卡片优化 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .stat-card {
        padding: 1rem;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        text-align: center;
    }
    
    .stat-title {
        font-size: 12px;
        color: #666;
        margin-bottom: 0.5rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
        font-weight: 700;
        color: #007bff;
        margin-bottom: 0.25rem;
    }
    
    .stat-sub {
        font-size: 11px;
        color: #888;
    }
    
    .dashboard-lists {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .dashboard-list {
        background: white;
        border-radius: 8px;
        padding: 1.5rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .dashboard-list h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
        color: #333;
        font-weight: 600;
    }
    
    /* 表格优化 */
    .table-container {
        overflow-x: auto;
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        margin: 1rem 0;
    }
    
    .data-table {
        width: 100%;
        min-width: 600px;
        border-collapse: collapse;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
        text-align: left;
        border-bottom: 1px solid #eee;
        font-size: 13px;
    }
    
    .data-table th {
        background: #f8f9fa;
        font-weight: 600;
        color: #495057;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .data-table tr:hover {
        background: #f8f9fa;
    }
    
    /* 隐藏次要列 */
    #articlesTable th:nth-child(4),
    #articlesTable td:nth-child(4),
    #articlesTable th:nth-child(5),
    #articlesTable td:nth-child(5),
    #articlesTable th:nth-child(7),
    #articlesTable td:nth-child(7) {
        display: none;
    }
    
    #commentsTable th:nth-child(5),
    #commentsTable td:nth-child(5),
    #commentsTable th:nth-child(6),
    #commentsTable td:nth-child(6),
    #commentsTable th:nth-child(7),
    #commentsTable td:nth-child(7) {
        display: none;
    }
    
    #categoriesTable th:nth-child(4),
    #categoriesTable td:nth-child(4),
    #categoriesTable th:nth-child(6),
    #categoriesTable td:nth-child(6) {
        display: none;
    }
    
    #friendLinksTable th:nth-child(5),
    #friendLinksTable td:nth-child(5),
    #friendLinksTable th:nth-child(7),
    #friendLinksTable td:nth-child(7) {
        display: none;
    }
    
    /* 操作按钮优化 */
    .action-buttons {
        min-width: auto;
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .action-buttons button {
        padding: 0.4rem 0.6rem;
        font-size: 11px;
        border-radius: 4px;
        border: none;
        cursor: pointer;
        font-weight: 500;
    }
    
    .btn-edit {
        background: #28a745;
        color: white;
    }
    
    .btn-delete {
        background: #dc3545;
        color: white;
    }
    
    .btn-approve {
        background: #007bff;
        color: white;
    }
    
    .btn-reject {
        background: #6c757d;
        color: white;
    }
    
    /* 表单优化 */
    .article-form,
    .category-form,
    .friend-link-form,
    .comment-form,
    .seo-form,
    .adsense-form,
    .settings-form {
        background: white;
        border-radius: 8px;
        padding: 1.5rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        margin-bottom: 2rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .form-group label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 600;
        color: #333;
        font-size: 14px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 0.75rem;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 14px;
        font-family: inherit;
        transition: border-color 0.2s ease;
    }
    
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        outline: none;
        border-color: #007bff;
        box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
    }
    
    .form-hint {
        display: block;
        margin-top: 0.25rem;
        font-size: 12px;
        color: #666;
        line-height: 1.4;
    }
    
    /* 批量操作优化 */
    .batch-actions {
        background: white;
        border-radius: 8px;
        padding: 1rem;
        margin-bottom: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        align-items: center;
    }
    
    .batch-btn {
        padding: 0.5rem 1rem;
        border: none;
        border-radius: 6px;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .selected-count {
        font-size: 13px;
        color: #666;
        margin-left: auto;
    }
    
    /* 模态框优化 */
    .modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1rem;
    }
    
    .modal-content {
        width: 100%;
        max-width: 500px;
        max-height: 90vh;
        overflow-y: auto;
        background: white;
        border-radius: 8px;
        padding: 1.5rem;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        position: relative;
    }
    
    .close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        font-size: 24px;
        cursor: pointer;
        color: #999;
        background: none;
        border: none;
        padding: 0;
        line-height: 1;
    }
    
    /* 分页优化 */
    .pagination-container {
        background: white;
        border-radius: 8px;
        padding: 1rem;
        margin-top: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        text-align: center;
    }
    
    .pagination {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .pagination button {
        padding: 0.5rem 0.75rem;
        font-size: 13px;
        border: 1px solid #ddd;
        background: white;
        color: #495057;
        border-radius: 4px;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .pagination button:hover {
        background: #007bff;
        color: white;
        border-color: #007bff;
    }
    
    .pagination button.active {
        background: #007bff;
        color: white;
        border-color: #007bff;
    }
    /* 友情链接移动端优化 */
    .friend-links-section {
        padding: 1.5rem 0;
        margin-top: 1.5rem;
    }

    .friend-links-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .friend-links-container {
        gap: 0.75rem;
        padding: 0 1rem;
    }

    .friend-link-item {
        min-width: 160px;
        padding: 0.75rem;
        flex-direction: column;
        text-align: center;
    }

    .friend-link-logo {
        margin-right: 0;
        margin-bottom: 0.5rem;
        width: 28px;
        height: 28px;
    }

    .friend-link-name {
        font-size: 0.85rem;
        white-space: normal;
        text-align: center;
    }

    .friend-link-description {
        font-size: 0.75rem;
        white-space: normal;
        text-align: center;
        line-height: 1.3;
    }
    
    /* 编辑器优化 */
    .editor-toolbar {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .toolbar-btn {
        font-size: 12px;
        padding: 0.5rem 0.75rem;
    }
    
    #articleContent,
    #editArticleContent {
        min-height: 200px;
        font-size: 14px;
        line-height: 1.5;
    }
}

/* IP拉黑管理样式 */
.ip-blacklist-form-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 2rem;
}

.ip-blacklist-form {
    max-width: none;
}

.ip-blacklist-form .form-group {
    margin-bottom: 1.5rem;
}

.ip-blacklist-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.ip-blacklist-form input,
.ip-blacklist-form select,
.ip-blacklist-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.ip-blacklist-form input:focus,
.ip-blacklist-form select:focus,
.ip-blacklist-form textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.ip-blacklist-form button {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.ip-blacklist-form button:hover {
    background: #c0392b;
}

.ip-stats-section {
    margin-bottom: 2rem;
}

.ip-search-section {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 2rem;
}

.ip-search-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.ip-search-form .search-input {
    flex: 1;
    min-width: 200px;
}

.btn-warning {
    background: #f39c12;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.btn-warning:hover {
    background: #e67e22;
}

.ip-search-result {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
}

.ip-search-found {
    background: #ffebee;
    border-left: 4px solid #f44336;
    color: #c62828;
}

.ip-search-found h4 {
    margin: 0 0 1rem 0;
    color: #d32f2f;
}

.ip-search-found p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.ip-search-not-found {
    background: #e8f5e8;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
}

.ip-search-not-found h4 {
    margin: 0 0 1rem 0;
    color: #388e3c;
}

.ip-search-not-found p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

/* IP表格特殊样式 */
.ip-cell {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #2c3e50;
}

.reason-cell {
    max-width: 200px;
    word-wrap: break-word;
}

.type-comment {
    background: #fff3cd;
    color: #856404;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    display: inline-block;
    min-width: 60px;
    text-align: center;
}

.type-access {
    background: #f8d7da;
    color: #721c24;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    display: inline-block;
    min-width: 60px;
    text-align: center;
}

.type-both {
    background: #d1ecf1;
    color: #0c5460;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    display: inline-block;
    min-width: 60px;
    text-align: center;
}

.status-active {
    background: #d4edda;
    color: #155724;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    display: inline-block;
    min-width: 50px;
    text-align: center;
}

.status-expired {
    background: #f8d7da;
    color: #721c24;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    display: inline-block;
    min-width: 50px;
    text-align: center;
}

/* IP黑名单表格优化 */
#ipBlacklistTable {
    min-width: 1100px;
}

#ipBlacklistTable .action-buttons {
    min-width: 130px;
}

.ip-checkbox {
    cursor: pointer;
}

/* 移动端IP拉黑管理优化 */
@media (max-width: 768px) {
    .ip-blacklist-form-section,
    .ip-search-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .ip-search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ip-search-form .search-input {
        min-width: auto;
        margin-bottom: 0.5rem;
    }
    
    .ip-search-form button {
        width: 100%;
    }
    
    /* 隐藏IP表格的次要列 */
    #ipBlacklistTable th:nth-child(5),
    #ipBlacklistTable td:nth-child(5),
    #ipBlacklistTable th:nth-child(7),
    #ipBlacklistTable td:nth-child(7),
    #ipBlacklistTable th:nth-child(8),
    #ipBlacklistTable td:nth-child(8) {
        display: none;
    }
}

@media (max-width: 480px) {
    .ip-blacklist-form button {
        width: 100%;
        padding: 0.75rem;
    }
    
    .ip-search-result {
        padding: 0.75rem;
    }
    
    .ip-search-found p,
    .ip-search-not-found p {
        font-size: 0.8rem;
    }
    
    /* 进一步隐藏IP表格列 */
    #ipBlacklistTable th:nth-child(6),
    #ipBlacklistTable td:nth-child(6) {
        display: none;
    }
}

/* 超小屏幕 (360px) */
@media (max-width: 360px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .logo {
        font-size: 1rem;
    }
    
    .nav a {
        font-size: 12px;
        padding: 0.3rem 0.5rem;
    }
    
    .article-title {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .article-detail h1 {
        font-size: 1.2rem;
        line-height: 1.3;
    }
    
    .article-item {
        padding: 1rem;
    }
    
    .comment-item {
        padding: 0.75rem;
    }
    
    .comment-content {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    /* 统计卡片单列 */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    /* 批量操作垂直 */
    .batch-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .batch-btn {
        width: 100%;
        padding: 0.75rem;
    }
    
    .selected-count {
        margin-left: 0;
        margin-top: 0.5rem;
        text-align: center;
        order: -1;
    }
    
    /* 表格最小化 */
    .data-table {
        min-width: 500px;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.25rem;
        font-size: 11px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .action-buttons button {
        width: 100%;
        padding: 0.4rem;
        font-size: 10px;
    }
    
    /* 表单优化 */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.6rem;
        font-size: 14px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    .form-hint {
        font-size: 11px;
    }
    
    /* 模态框 */
    .modal-content {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .modal-content h2 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    /* 分页 */
    .pagination button {
        padding: 0.4rem 0.6rem;
        font-size: 12px;
    }
    
    /* 友情链接超小屏 */
    .friend-link-item {
        min-width: 140px;
        padding: 0.6rem;
    }
    
    .friend-link-logo {
        width: 24px;
        height: 24px;
    }
    
    .friend-link-name {
        font-size: 0.8rem;
    }
    
    .friend-link-description {
        font-size: 0.7rem;
    }
    
    /* 导航按钮 */
    .nav-btn {
        padding: 0.75rem;
        font-size: 14px;
    }
    
    /* 搜索框 */
    .search-input,
    .search-btn {
        padding: 0.6rem;
        font-size: 13px;
    }
    
    /* 分类筛选 */
    .category-filter a {
        padding: 0.4rem 0.6rem;
        font-size: 12px;
    }
}

/* iPad专门优化 */
@media only screen
and (min-device-width: 768px)
and (max-device-width: 1024px)
and (-webkit-min-device-pixel-ratio: 1) {

    /* 触摸友好的按钮 */
    .btn, .nav-btn, .page-btn {
        min-height: 44px;
        min-width: 44px;
    }

    /* 更大的点击区域 */
    .article-item {
        cursor: pointer;
        transition: background-color 0.2s ease;
    }

    .article-item:hover {
        background-color: #f8f9fa;
    }

    /* 分类列表触摸优化 */
    .category-list a {
        padding: 0.8rem 0;
        display: block;
    }

    /* 表格触摸滚动 */
    .table-container {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
    }

    /* 输入框优化 */
    .form-group input,
    .form-group textarea {
        font-size: 16px; /* 防止iOS自动缩放 */
    }
}

/* Quill富文本编辑器样式 */
.quill-editor {
    min-height: 400px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.quill-editor .ql-editor {
    min-height: 360px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

.quill-editor .ql-toolbar {
    border-bottom: 1px solid #e1e1e1;
    background: #f8f9fa;
    border-radius: 4px 4px 0 0;
}

.quill-editor .ql-container {
    border-radius: 0 0 4px 4px;
    font-family: inherit;
}

/* 隐藏内容块样式 */
.hide-content-block {
    margin: 10px 0;
    border: 2px dashed #ffc107;
    border-radius: 8px;
    background: #fff9c4;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hide-content-block:hover {
    background: #fff176;
    border-color: #ff9800;
}

.hide-content-editor {
    padding: 15px;
}

.hide-content-label {
    font-weight: bold;
    color: #ff6f00;
    font-size: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hide-content-text {
    color: #333;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.7);
    padding: 8px;
    border-radius: 4px;
    border-left: 3px solid #ffc107;
}

/* 代码块样式增强 */
.quill-editor .ql-syntax {
    background: #f8f8f8;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    padding: 12px;
    margin: 8px 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.4;
    overflow-x: auto;
}

/* Highlight.js代码高亮样式补充 */
.hljs {
    background: #f8f8f8 !important;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-section,
.hljs-link {
    color: #0000ff;
}

.hljs-string {
    color: #008000;
}

.hljs-comment {
    color: #808080;
    font-style: italic;
}

.hljs-number {
    color: #ff0000;
}

/* 编辑器工具栏优化 */
.editor-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.toolbar-btn {
    padding: 6px 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.toolbar-btn:hover {
    background: #0056b3;
}

.toolbar-help {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .quill-editor {
        min-height: 300px;
    }

    .quill-editor .ql-editor {
        min-height: 260px;
        font-size: 16px; /* 防止iOS缩放 */
    }

    .editor-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-btn {
        margin-bottom: 5px;
    }
}

/* 编辑器加载状态 */
.editor-loading {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 4px;
    color: #6c757d;
}

/* 文章详情页隐藏内容样式 */
.hidden-content {

    overflow: hidden;
}

.hidden-content-mask {
    padding: 10px 6px;
    text-align: center;
    background: rgba(231, 76, 60, 0.1);
}

.hidden-icon {
    font-size: 12px;
    margin-bottom: 5px;
}

.hidden-text {
    font-size: 15px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 8px;
}

.hidden-hint {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 解锁后的内容样式 */
.revealed-content {
    padding: 10px;
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
    border: 2px solid #4caf50;
    border-radius: 5px;
    position: relative;
}

.revealed-label {
    font-size: 12px;
    font-weight: bold;
    color: #2e7d32;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.revealed-text {
    color: #333;
    font-size: 15px;
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #4caf50;
}

.hidden-content.revealed {
    border-color: #4caf50;
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
}

/* 响应式调整 */
@media (max-width: 608px) {
    .hidden-content-mask {
        padding: 10px 7px;
    }

    .hidden-icon {
        font-size: 9px;
    }

    .hidden-text {
        font-size: 8px;
    }

    .revealed-text {
        font-size: 10px;
        padding: 8px;
    }
}

/* 修复文章内容显示问题 - 保持用户选择的对齐方式 */
.article-content {
    line-height: 1.8;
    color: #333;
    font-size: 16px;
    word-wrap: break-word;
    margin-bottom: 2rem;
    text-align: left; /* 默认左对齐，但会被具体的对齐样式覆盖 */
}

/* 图片对齐的最终解决方案 */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 1rem auto; /* 默认居中，会被具体对齐覆盖 */
    display: block;
}

/* 当父元素是左对齐时，图片左对齐 */
.article-content .ql-align-left img,
.article-content *[style*="text-align: left"] img,
.article-content p:not([class]):not([style*="text-align"]) img {
    margin-left: 0;
    margin-right: auto;
}

/* 当父元素是居中对齐时，图片居中 */
.article-content .ql-align-center img,
.article-content *[style*="text-align: center"] img {
    margin-left: auto;
    margin-right: auto;
}

/* 当父元素是右对齐时，图片右对齐 */
.article-content .ql-align-right img,
.article-content *[style*="text-align: right"] img {
    margin-left: auto;
    margin-right: 0;
}

/* 图片自身带有对齐样式时的处理 */
.article-content img.ql-align-left,
.article-content img[style*="text-align: left"],
.article-content img[style*="margin-right: auto"] {
    margin-left: 0 !important;
    margin-right: auto !important;
}

.article-content img.ql-align-center,
.article-content img[style*="text-align: center"],
.article-content img[style*="margin-left: auto; margin-right: auto"] {
    margin-left: auto !important;
    margin-right: auto !important;
}

.article-content img.ql-align-right,
.article-content img[style*="text-align: right"],
.article-content img[style*="margin-left: auto"]:not([style*="margin-right: auto"]) {
    margin-left: auto !important;
    margin-right: 0 !important;
}

/* 修复段落间距但保持对齐选择 */
.article-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* 修复标题样式但保持对齐选择 */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin: 1.5rem 0 1rem 0;
    color: #333;
    font-weight: 600;
}

/* 修复列表样式 */
.article-content ul,
.article-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* 修复引用块样式 */
.article-content blockquote {
    border-left: 4px solid #ddd;
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    background: #f9f9f9;
    color: #666;
    font-style: italic;
}

/* 修复代码块样式 */
.article-content pre,
.article-content code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.article-content pre {
    background: #f8f8f8;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto; /* 允许长代码水平滚动 */
    max-width: 100%;
    box-sizing: border-box;
    text-align: left;
    white-space: pre; /* 保持代码格式 */
    word-wrap: normal; /* 不强制换行 */
}

.article-content code {
    background: #f1f1f1;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

/* 通用对齐类支持 - 适用于所有元素包括图片 */
.article-content .ql-align-center,
.article-content *[style*="text-align: center"] {
    text-align: center !important;
}

.article-content .ql-align-right,
.article-content *[style*="text-align: right"] {
    text-align: right !important;
}

.article-content .ql-align-justify,
.article-content *[style*="text-align: justify"] {
    text-align: justify !important;
}

.article-content .ql-align-left,
.article-content *[style*="text-align: left"] {
    text-align: left !important;
}

/* 支持内联样式的对齐 - 使用更精确的选择器 */
.article-content p[style*="text-align: center"],
.article-content div[style*="text-align: center"],
.article-content h1[style*="text-align: center"],
.article-content h2[style*="text-align: center"],
.article-content h3[style*="text-align: center"],
.article-content h4[style*="text-align: center"],
.article-content h5[style*="text-align: center"],
.article-content h6[style*="text-align: center"] {
    text-align: center !important;
}

.article-content p[style*="text-align: right"],
.article-content div[style*="text-align: right"],
.article-content h1[style*="text-align: right"],
.article-content h2[style*="text-align: right"],
.article-content h3[style*="text-align: right"],
.article-content h4[style*="text-align: right"],
.article-content h5[style*="text-align: right"],
.article-content h6[style*="text-align: right"] {
    text-align: right !important;
}

.article-content p[style*="text-align: justify"],
.article-content div[style*="text-align: justify"],
.article-content h1[style*="text-align: justify"],
.article-content h2[style*="text-align: justify"],
.article-content h3[style*="text-align: justify"],
.article-content h4[style*="text-align: justify"],
.article-content h5[style*="text-align: justify"],
.article-content h6[style*="text-align: justify"] {
    text-align: justify !important;
}

.article-content p[style*="text-align: left"],
.article-content div[style*="text-align: left"],
.article-content h1[style*="text-align: left"],
.article-content h2[style*="text-align: left"],
.article-content h3[style*="text-align: left"],
.article-content h4[style*="text-align: left"],
.article-content h5[style*="text-align: left"],
.article-content h6[style*="text-align: left"] {
    text-align: left !important;
}

/* 默认情况下，内容应该是左对齐的 */
.article-content p:not([style*="text-align"]):not([class*="ql-align"]),
.article-content div:not([style*="text-align"]):not([class*="ql-align"]) {
    text-align: left;
}
