/* ========== 全局基础样式 ========== */
/* CSS重置和基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
}

/* 链接颜色修正为青蓝色 */
a {
    color: #0088cc;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #006699;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ========== 布局组件 ========== */
/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.site-header {
    background-color: #0088cc;
    color: #fff;
    padding: 15px 0;
}

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

.logo a {
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
}

.logo svg {
    margin-right: 10px;
}

/* 主导航 */
.main-nav ul {
    display: flex;
}

.main-nav li {
    margin-left: 20px;
}

.main-nav a {
    color: #fff;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.main-nav a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #fff;
    transition: width 0.3s;
}

.main-nav a:hover:after,
.main-nav li.active a:after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    cursor: pointer;
}

/* 移动菜单 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -250px;
    width: 250px;
    height: auto;
    max-height: 80vh;
    background-color: #0088cc;
    z-index: 1000;
    padding: 15px;
    transition: right 0.3s;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-close {
    text-align: right;
    margin-bottom: 15px;
    cursor: pointer;
}

.mobile-menu-close svg {
    color: #fff;
    width: 20px;
    height: 20px;
}

.mobile-menu ul {
    margin: 0;
    padding: 0;
}

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

.mobile-menu ul li a {
    color: #fff;
    font-size: 16px;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.mobile-menu ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu ul li.active a {
    font-weight: bold;
    background-color: rgba(255, 255, 255, 0.2);
}

/* 搜索栏 */
.search-bar {
    background-color: #f0f0f0;
    padding: 15px 0;
}

.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-form input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.search-form button {
    background-color: #0088cc;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-form button:hover {
    background-color: #006699;
}

/* ========== 内容区域 ========== */
.site-content {
    padding: 30px 0;
}

/* ========== 书籍相关样式 ========== */
/* 书籍列表 */
.book-list {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.book-item {
    padding: 15px;
    margin-bottom: 30px;
}

.book-card {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 书籍网格布局 */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* 书籍封面样式 - 统一200px尺寸 */
.book-cover-link {
    display: block;
    width: 200px;
    height: 200px;
    overflow: hidden;
    border-radius: 4px;
    position: relative;
}

.book-cover-link img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book-cover-link:hover img {
    transform: scale(1.05);
}

/* book.php详情页封面容器 */
.book-cover-container img {
    width: 200px !important;
    height: 200px !important;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.book-main-content-right {
    flex: 1;
    min-width: 0;
}

.book-info-container {
    padding-left: 20px;
}

.book-detail-header {
    display: flex;
    margin-bottom: 20px;
}

.book-detail {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

/* 桌面端样式 */
@media (min-width: 769px) {
    .book-detail-layout {
        display: flex;
        gap: 30px;
        margin-bottom: 30px;
    }
    
    .book-cover-container {
        flex: 0 0 200px;
        margin-right: 30px;
    }
}

.book-cover-container {
    flex: 0 0 200px;
    margin-right: 30px;
}

/* book.php详情页封面容器 */
.book-cover-container img {
    width: 200px !important;
    height: 200px !important;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.book-main-content-right {
    flex: 1;
    min-width: 0;
}

.book-info-container {
    padding-left: 20px;
}

.book-detail-header {
    display: flex;
    margin-bottom: 20px;
}

.book-detail-cover {
    flex: 0 0 120px;
    margin-right: 20px;
}

.book-detail-cover img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.book-detail-info {
    flex: 1;
}

.book-detail-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #0088cc;
}

.book-detail-meta {
    margin-bottom: 15px;
    color: #666;
}

.book-detail-meta span {
    margin-right: 15px;
}

.book-detail-description {
    margin-bottom: 20px;
    line-height: 1.6;
}

.book-detail-status {
    display: inline-block;
    background-color: #0088cc;
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 14px;
    margin-bottom: 20px;
}

/* ========== 章节相关样式 ========== */
.chapter-list {
    display: grid;
    grid-template-columns: 1fr; /* 修改为1列显示 */
    gap: 10px;
    margin-bottom: 30px;
}

.chapter-list-title {
    font-size: 20px;
    margin-bottom: 15px;
    color: #0088cc;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* 确保章节项的样式正确 */
.chapter-item {
    display: block;
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #333;
    background: #fff; /* 默认白色背景 */
    transition: background-color 0.2s;
}

.chapter-item:last-child {
    border-bottom: 1px solid #eee;
}

.chapter-item a {
    display: block;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.chapter-item:hover {
    background-color: #f8f9fa; /* 悬停时浅灰色背景 */
}

.chapter-item .chapter-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.chapter-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chapter-name {
    flex: 1;
}

.chapter-order {
    color: #999;
    font-size: 14px;
}

/* 章节内容 */
.chapter-content {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 30px;
    line-height: 1.8;
    font-size: 18px;
}

.chapter-header {
    margin-bottom: 30px;
    text-align: center;
}

.chapter-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #0088cc;
}

.chapter-book-info {
    color: #666;
    margin-bottom: 20px;
}

.chapter-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.chapter-navigation a {
    display: inline-flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #f0f0f0;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.chapter-navigation a:hover {
    background-color: #e0e0e0;
}

.chapter-navigation svg {
    margin-right: 5px;
}

.chapter-navigation .next-chapter svg {
    margin-right: 0;
    margin-left: 5px;
}

/* 书籍详情页章节列表标题行样式 */
.book-chapter-header {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.book-chapter-header h2 {
    margin: 0;
    flex-shrink: 0;
}

.book-chapter-header .sort-controls {
    flex-shrink: 0;
}

.book-chapter-header .chapter-last-update {
    font-size: 16px;
    color: #666;
    flex: 1;
    min-width: 0;
}

/* ========== 最新章节列表样式 ========== */
.latest-chapter-list {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.latest-chapter-list h3 {
    color: #0088cc;
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 2px solid #0088cc;
    padding-bottom: 8px;
}

.latest-chapter-list ul {
    list-style: none;
    padding: 0;
}

.latest-chapter-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.latest-chapter-list li:last-child {
    border-bottom: none;
}

.latest-chapter-list a {
    color: #333;
    text-decoration: none;
    flex: 1;
    margin-right: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.latest-chapter-list a:hover {
    color: #0088cc;
}

.latest-chapter-list .chapter-time {
    color: #999;
    font-size: 12px;
    white-space: nowrap;
}

.latest-chapter-item {
    display: block;
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.latest-chapter-item:hover {
    background: #e3f2fd;
    border-color: #007bff;
    transform: translateX(2px);
}

.latest-chapter-title {
    font-size: 14px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== 分类相关样式 ========== */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.category-header h2 {
    font-size: 22px;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    font-weight: 600;
}

/* 更多链接样式 - 美化"查看全部"按钮 */
.more-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, #0088cc, #006699);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 136, 204, 0.3);
    position: relative;
    overflow: hidden;
}

.more-link:hover {
    background: linear-gradient(135deg, #006699, #004d73);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.4);
    color: white;
}

.more-link:active {
    transform: translateY(0);
}

/* 添加光泽效果 */
.more-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.more-link:hover::before {
    left: 100%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .more-link {
        align-self: flex-end;
        padding: 6px 12px;
        font-size: 13px;
    }
}

.category-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #0088cc;
    border-bottom: 2px solid #0088cc;
    padding-bottom: 10px;
}

.category-description {
    color: #666;
}

/* ========== 分页组件 ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: 8px;
    background-color: #fff;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    border: 2px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-size: 14px;
}

.pagination a:hover {
    background-color: #f8f9fa;
    border-color: #0088cc;
    color: #0088cc;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.pagination a.active,
.pagination a.page-num.active {
    background-color: #0088cc;
    color: #fff;
    border-color: #0088cc;
    box-shadow: 0 4px 8px rgba(30, 110, 50, 0.3);
    font-weight: 600;
}

.pagination .page-prev,
.pagination .page-next {
    min-width: 44px;
    padding: 0 16px;
    font-weight: 600;
}

.pagination .page-prev svg,
.pagination .page-next svg {
    width: 18px;
    height: 18px;
}

.pagination .page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    color: #666;
    font-weight: 500;
    pointer-events: none;
}

/* 页码跳转功能样式 */
.pagination .page-jump {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 16px;
    padding: 0 12px;
    height: 44px;
    background-color: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination .jump-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.pagination .jump-input {
    width: 50px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    background-color: #fff;
    transition: border-color 0.3s ease;
}

.pagination .jump-input:focus {
    outline: none;
    border-color: #0088cc;
    box-shadow: 0 0 0 2px rgba(0, 136, 204, 0.2);
}

.pagination .jump-btn {
    height: 32px;
    padding: 0 12px;
    background-color: #0088cc;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.pagination .jump-btn:hover {
    background-color: #006699;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pagination .jump-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ========== 页面标题 ========== */
.page-title {
    font-size: 28px;
    margin-bottom: 20px;
    color: #0088cc;
    border-bottom: 2px solid #0088cc;
    padding-bottom: 10px;
}

/* ========== 页脚样式 ========== */
.site-footer {
    background-color: #6c757d;
    color: #fff;
    padding: 20px 0;
    margin-top: 0;
    border-top: 2px solid #dee2e6;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
}

.footer-logo svg {
    margin-right: 10px;
}

.footer-nav ul {
    display: flex;
}

.footer-nav li {
    margin-left: 20px;
}

.footer-nav a {
    color: #fff;
}

.footer-copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

/* ========== 首页分类区块 ========== */
.home-category {
    margin-bottom: 40px;
}

.home-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.home-category-title {
    font-size: 20px;
    color: #0088cc;
    position: relative;
    padding-left: 15px;
}

.home-category-title:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: #0088cc;
    border-radius: 2px;
}

.home-category-more {
    font-size: 14px;
}

/* ========== 消息提示样式 ========== */
.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.message-info {
    background-color: #e3f2fd;
    color: #0d47a1;
    border: 1px solid #bbdefb;
}

.message-success {
    background-color: #e8f5e9;
    color: #0088cc;
    border: 1px solid #c8e6c9;
}

.message-warning {
    background-color: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffe0b2;
}

.message-error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* ========== 通用工具类 ========== */
.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.section-tag {
    display: inline-block;
    padding: 5px 10px;
    font-size: 0.9em;
    font-weight: bold;
    color: #fff;
    border-radius: 4px;
    margin-bottom: 5px;
}

.author-tag {
    background-color: #007bff;
}

.tip-tag {
    background-color: #28a745;
}

.author-other-books-section,
.author-books-tip-section {
    text-align: left;
}

.author-other-books-list {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 8px;
}

.author-other-books-list li {
    margin-bottom: 5px;
}

.author-other-books-list li a {
    text-decoration: none;
    color: #337ab7;
    font-size: 0.9em;
}

.tip-content {
    margin-top: 8px;
    font-size: 0.85em;
    color: #777;
    padding-left: 5px;
}

.tip-content svg {
    margin-right: 4px;
    vertical-align: middle;
}

/* ========== 书籍信息样式修复 ========== */
/* 图书信息 */
.book-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-title {
    font-size: 14px !important;
    margin: 0 0 8px 0 !important;
    line-height: 1.3 !important;
    text-align: left !important;  /* 添加这行确保左对齐 */
}

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

.book-title a:hover {
    color: #0088cc;
}

.book-author {
    font-size: 12px; /* 从14px减小到12px */
    color: #666;
    margin-bottom: 8px;
}

.book-meta {
    font-size: 10px; /* 从12px减小到10px */
    color: #999;
    margin-top: auto;
}

.book-update {
    font-size: 10px; /* 从12px减小到10px */
    color: #999;
}

/* ========== 导航菜单样式优化 ========== */
/* 主导航菜单字体样式 */
.main-nav a {
    font-size: 12px !important;
    font-weight: bold !important;
}

/* 移动端菜单字体样式 */
.mobile-menu ul li a {
    font-size: 12px !important;
    font-weight: bold !important;
}

.book-grid .book-title {
    font-size: 14px !important;
    margin: 0 0 8px 0 !important;
    line-height: 1.3 !important;
}

.book-grid .book-author {
    font-size: 12px !important; /* 从14px减小到12px */
    color: #666 !important;
    margin-bottom: 8px !important;
}

.book-grid .book-meta {
    font-size: 10px !important; /* 从12px减小到10px */
    color: #999 !important;
}

.book-grid .book-update {
    font-size: 10px !important; /* 从12px减小到10px */
    color: #999 !important;
}

/* 状态覆盖层 - 强制显示 */
.book-status-overlay {
    position: absolute !important;
    bottom: 8px !important;
    right: 8px !important;
    z-index: 999 !important;
    pointer-events: none;
    display: block !important;
    visibility: visible !important;
}

/* 图书状态样式 - 强制显示 */
.book-status {
    font-size: 12px !important;
    padding: 4px 8px !important;
    border-radius: 12px !important;
    display: inline-block !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    visibility: visible !important;
    opacity: 1 !important;
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 10;
    color: #fff !important;
}

.book-status.completed {
    background-color: #4CAF50 !important;
}

.book-status.ongoing {
    background-color: #FF9800 !important;
}

/* 文章内容中的图片样式 */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 10px 0;
    display: block;
}

/* 富文本编辑器中的图片样式 - 优化版本 */
.rich-editor-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 10px 0;
    display: block;
    cursor: pointer;
    /* 确保图片能正常加载显示 */
    object-fit: contain;
}

/* 编辑器中图片加载失败时的样式 */
.rich-editor-content img:not([src]),
.rich-editor-content img[src=""],
.rich-editor-content img[src*="undefined"] {
    background: #f5f5f5;
    border: 2px dashed #ddd;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.rich-editor-content img:not([src])::before,
.rich-editor-content img[src=""]::before,
.rich-editor-content img[src*="undefined"]::before {
    content: "图片加载中...";
    color: #999;
    font-size: 14px;
    position: absolute;
}

/* 确保WebP图片在编辑器中正常显示 */
.rich-editor-content img[src$=".webp"] {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 10px 0;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* 移动端图片优化 */
@media (max-width: 768px) {
    .article-content img,
    .rich-editor-content img {
        margin: 8px 0;
        border-radius: 3px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }
}

/* 图片加载状态 */
.article-content img:not([src]),
.rich-editor-content img:not([src]) {
    background: #f5f5f5;
    border: 2px dashed #ddd;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-content img:not([src])::before,
.rich-editor-content img:not([src])::before {
    color: #999;
    font-size: 14px;
}

/* WebP图片优化显示 */
.article-content img[src$=".webp"] {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 10px 0;
    display: block;
    /* WebP图片加载优化 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* 移除图片加载中的背景，让图片正常显示 */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 10px 0;
    display: block;
    /* 移除背景图片，只在真正加载失败时显示 */
}

/* 只有在图片真正加载失败时才显示占位符 */
.article-content img:not([src]),
.article-content img[src=""] {
    background-color: #f5f5f5;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="60" viewBox="0 0 100 60"><rect width="100" height="60" fill="%23f5f5f5"/><text x="50" y="35" text-anchor="middle" font-family="Arial" font-size="12" fill="%23999">图片加载失败</text></svg>');
    background-repeat: no-repeat;
    background-position: center;
    min-height: 60px;
}

/* 移动端WebP图片优化 */
@media (max-width: 768px) {
    .article-content img[src$=".webp"] {
        margin: 8px 0;
        border-radius: 3px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }
}