/* ============================================
   合并样式表：基础全局样式 + 帝国CMS布局 + 图片网格/分页/友情链接
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ========== 头部样式 ========== */
header {
    background-color: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 26px;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
    margin-right: 20px;
    flex-shrink: 0;
}

.logo i {
    color: #e74c3c;
    margin-right: 8px;
    font-size: 28px;
}

.logo span {
    color: #e74c3c;
}

/* 帝国CMS搜索框样式 */
.empire-search {
    display: flex;
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
}

.empire-search input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-right: none;
    outline: none;
    font-size: 14px;
    border-radius: 4px 0 0 4px;
}

.empire-search button {
    padding: 10px 20px;
    background-color: #e74c3c;
    color: white;
    border: 1px solid #e74c3c;
    cursor: pointer;
    font-size: 14px;
    border-radius: 0 4px 4px 0;
    transition: background-color 0.3s;
}

.empire-search button:hover {
    background-color: #c0392b;
}

.user-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* 帝国CMS登录框样式优化 */
.empire-login-container {
    display: flex;
    align-items: center;
}

.empire-login-container a {
    margin-left: 15px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-size: 14px;
}

.empire-login-container a i {
    margin-right: 5px;
}

.empire-login-container a:hover {
    color: #e74c3c;
}

/* ========== 导航菜单 ========== */
nav {
    background: linear-gradient(90deg, #2c3e50, #34495e);
}

.nav-menu {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 14px 22px;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-menu a:hover {
    background-color: rgba(231, 76, 60, 0.9);
}

/* ========== 内容区域通用样式 ========== */
.content-area {
    padding: 30px 0;
}

.breadcrumb {
    margin-bottom: 20px;
    font-size: 14px;
    color: #777;
}

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

.breadcrumb a:hover {
    color: #e74c3c;
}

.breadcrumb span {
    margin: 0 8px;
}

/* 内容主体样式（文章/下载页专用） */
.content-section {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.page-title {
    font-size: 28px;
    margin-bottom: 15px;
    color: #2c3e50;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.page-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    font-size: 14px;
    color: #777;
}

.page-info span {
    display: flex;
    align-items: center;
}

.page-info i {
    margin-right: 5px;
    color: #e74c3c;
}

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

.page-info a:hover {
    text-decoration: underline;
}

/* 通用章节标题 (基础样式，用于内容页) */
.section-title {
    font-size: 20px;
    margin: 25px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e74c3c;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    color: #e74c3c;
}

.content-text {
    line-height: 1.8;
    margin-bottom: 20px;
}

/* 图片自适应 */
.content-text img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px 0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 表格自适应 */
.content-text table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    overflow-x: auto;
    display: block;
}

.content-text table td,
.content-text table th {
    border: 1px solid #ddd;
    padding: 8px;
    word-break: break-word;
}

.divider {
    height: 1px;
    background-color: #eee;
    margin: 25px 0;
}

/* ========== 下载按钮样式 ========== */
.download-section {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
    text-align: center;
    border: 2px dashed #e0e0e0;
}

.download-button {
    display: inline-flex;
    align-items: center;
    padding: 14px 28px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    position: relative;
    overflow: hidden;
}

.download-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(231, 76, 60, 0.4);
    background: linear-gradient(135deg, #c0392b, #a93226);
}

.download-button i {
    margin-right: 10px;
    font-size: 18px;
}

.download-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(30deg);
    transition: all 0.5s;
}

.download-button:hover::after {
    left: 100%;
}

.notice {
    background-color: #fff9e6;
    border-radius: 8px;
    padding: 20px;
    margin-top: 25px;
    border-left: 4px solid #f1c40f;
}

.notice h3 {
    margin-bottom: 10px;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.notice h3 i {
    margin-right: 10px;
    color: #f1c40f;
}

.notice p {
    line-height: 1.6;
    color: #555;
}

/* ========== 图片网格布局 (新增) ========== */
.image-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

.image-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.image-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.image-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* 默认图片占位样式 */
.default-image {
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #777;
    text-align: center;
}

.default-image i {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 10px;
}

.default-image span {
    font-size: 12px;
    max-width: 80%;
    word-wrap: break-word;
    line-height: 1.4;
}

.image-info {
    padding: 12px;
}

.image-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-meta {
    display: flex;
    justify-content: space-between;
    color: #777;
    font-size: 12px;
}

.image-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.image-actions button {
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
}

.image-actions button i {
    margin-right: 4px;
}

.image-actions button:hover {
    color: #e74c3c;
}

/* ========== 分页样式 ========== */
.pagination {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.pagination a {
    padding: 10px 16px;
    margin: 0 5px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.pagination a:hover,
.pagination a.active {
    background-color: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

/* ========== 底部样式 ========== */
footer {
    background: linear-gradient(90deg, #2c3e50, #34495e);
    color: #ecf0f1;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: #e74c3c;
    font-size: 18px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: #e74c3c;
}

.footer-section p,
.footer-section a {
    color: #bdc3c7;
    margin-bottom: 12px;
    display: block;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #e74c3c;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #3a506b;
    border-radius: 50%;
    color: white;
    transition: all 0.3s;
}

.social-links a:hover {
    background-color: #e74c3c;
    transform: translateY(-3px);
}

/* 友情链接区域 */
.friend-links {
    margin: 0 0 30px;
    padding: 0 0 25px;
    border-bottom: 1px solid #3a506b;
}

.friend-links h3 {
    color: #e74c3c;
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.friend-links h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: #e74c3c;
}

.friend-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.friend-link {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 8px 15px;
    border-radius: 4px;
    border: 1px solid #3a506b;
    transition: all 0.3s;
}

.friend-link:hover {
    background-color: rgba(231, 76, 60, 0.1);
    border-color: #e74c3c;
    transform: translateY(-2px);
}

.friend-link a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.friend-link a i {
    margin-right: 8px;
    color: #e74c3c;
    font-size: 12px;
}

.friend-link a:hover {
    color: #fff;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #3a506b;
    color: #95a5a6;
    font-size: 14px;
}

/* ========== 响应式设计（整合两套媒体查询） ========== */

/* 中等屏幕 (≤1200px) */
@media (max-width: 1200px) {
    .image-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 平板横屏 (≤992px) */
@media (max-width: 992px) {
    .header-top {
        flex-direction: column;
        text-align: center;
    }
    
    .logo {
        margin-bottom: 15px;
        margin-right: 0;
    }
    
    .empire-search {
        width: 100%;
        max-width: 100%;
        margin: 0 0 15px 0;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .image-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .page-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .user-actions {
        justify-content: center;
        width: 100%;
    }
}

/* 手机竖屏 (≤768px) */
@media (max-width: 768px) {
    .content-section {
        padding: 20px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .nav-menu a {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    /* 移动端隐藏导航栏和登录框 */
    nav, .user-actions {
        display: none;
    }
    
    /* 移动端搜索框调整 */
    .empire-search {
        margin: 10px 0;
    }
    
    /* 下载按钮全宽 */
    .download-button {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }
    
    /* 网格2列 */
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 友情链接居中 */
    .friend-links-container {
        justify-content: center;
    }
}

/* 小屏手机 (≤480px) */
@media (max-width: 480px) {
    .empire-login-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .empire-login-container a {
        margin-left: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-menu li {
        width: 100%;
        text-align: center;
    }
    
    .logo {
        font-size: 22px;
    }
    
    .logo i {
        font-size: 24px;
    }
    
    .content-section {
        padding: 15px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    /* 网格单列 */
    .image-grid {
        grid-template-columns: 1fr;
    }
    
    /* 友情链接全宽 */
    .friend-link {
        width: 100%;
        text-align: center;
    }
}