/**
 * XU5主题 - 统一双列布局样式
 * 适用于：教程详情页、软件详情页、FAQ页面、归档页等
 * Version: 1.1.0
 * 
 * 页面宽度统一为 1200px，双列布局
 * 面包屑融入主体背景
 */

/* ============================================
   统一页面容器
   ============================================ */

.xu5-page-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin: 5px auto 15px;
    max-width: 1200px;
    overflow: visible !important;
    width: calc(100% - 30px);
}

/* ============================================
   面包屑融入主体
   ============================================ */

.xu5-page-breadcrumb {
    padding: 12px 30px 8px;
    margin-bottom: 0;
    background: transparent;
}

.xu5-page-breadcrumb .breadcrumb-nav {
    margin: 0;
    padding: 0;
}

/* ============================================
   双列布局容器
   ============================================ */

.xu5-page-container {
    max-width: none;
    margin: 0;
    padding: 15px 30px 30px;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* 主内容区域 */
.xu5-page-main {
    flex: 1;
    min-width: 0;
    overflow: hidden; /* 防止内容溢出 */
}

/* 侧边栏 - 强制固定 */
.xu5-page-sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky !important;
    top: 20px !important;
    align-self: flex-start !important;
}

/* 软件详情页侧边栏 */
.xu5-software-wrapper .xu5-page-sidebar {
    position: sticky !important;
    top: 20px !important;
}

/* ============================================
   页面头部
   ============================================ */

.xu5-page-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.xu5-page-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.xu5-page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #666;
    font-size: 14px;
}

.xu5-page-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.xu5-page-meta a {
    color: #2196f3;
    text-decoration: none;
}

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

/* ============================================
   内容卡片
   ============================================ */

.xu5-content-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.xu5-content-card h2,
.xu5-content-card h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
}

/* 内容区图片限制 - 仅限文章内容区域，不影响UI组件图标 */
.xu5-faq-content > img,
.xu5-faq-content p img,
.xu5-solution-content > img,
.xu5-solution-content p img,
.entry-content > img,
.entry-content p img,
.xu5-tutorial-content > img,
.xu5-tutorial-content p img,
.software-description > img,
.software-description p img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px auto;
    border-radius: 6px;
    box-sizing: border-box;
}

/* 内容区域溢出控制 */
.xu5-faq-content,
.xu5-solution-content,
.entry-content,
.xu5-tutorial-content,
.software-description {
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 保护UI组件中的图标不被覆盖 */
.version-icon-horizontal,
.version-icon-single,
.version-icon-placeholder,
.related-software-icon,
.xu5-icon-img,
.xu5-software-icon-large img,
.soft-icon,
.tutorial-download-icon {
    max-width: none !important;
    height: auto;
    margin: 0;
    display: inline-block;
}

/* 透明卡片（主内容区域使用） */
.xu5-content-card-transparent {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ============================================
   侧边栏卡片 - 超紧凑版
   ============================================ */

.xu5-sidebar-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.xu5-sidebar-card h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
}

/* ============================================
   相关列表 - 超紧凑版
   ============================================ */

.xu5-related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.xu5-related-list li {
    margin-bottom: 4px;
}

.xu5-related-list li:last-child {
    margin-bottom: 0;
}

.xu5-related-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.xu5-related-list a:hover {
    background: #f0f2f5;
    color: #2d8cf0;
}

.xu5-related-list .related-icon {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
}

.xu5-related-list .related-info {
    flex: 1;
    min-width: 0;
}

.xu5-related-list .related-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xu5-related-list .related-version {
    font-size: 13px;
    color: #888;
}

/* ============================================
   FAQ列表 - 超紧凑版
   ============================================ */

.xu5-faq-card,
.xu5-hot-faq-card {
    padding: 8px 10px;
}

.xu5-faq-card h3,
.xu5-hot-faq-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
    padding-bottom: 6px;
}

.xu5-faq-list,
.xu5-hot-faq-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.xu5-faq-list li,
.xu5-hot-faq-list li {
    margin-bottom: 2px;
    padding: 0;
}

.xu5-faq-list li:last-child,
.xu5-hot-faq-list li:last-child {
    margin-bottom: 0;
}

.xu5-faq-list a,
.xu5-hot-faq-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    line-height: 1.4;
    border-radius: 4px;
    transition: background 0.15s;
}

.xu5-faq-list a:hover,
.xu5-hot-faq-list a:hover {
    background: #f5f5f5;
    color: #1976d2;
}

.xu5-faq-list .faq-icon,
.xu5-hot-faq-list .faq-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #e3f2fd;
    border-radius: 4px;
    font-size: 11px;
    flex-shrink: 0;
}

.xu5-hot-faq-list .faq-icon.hot {
    background: #fff8e1;
}

.xu5-faq-list .faq-title,
.xu5-hot-faq-list .faq-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xu5-hot-faq-list .faq-views {
    font-size: 13px;
    color: #888;
    flex-shrink: 0;
}

/* ============================================
   软件列表 - 超紧凑版
   ============================================ */

.xu5-soft-card {
    padding: 8px 10px;
}

.xu5-soft-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
    padding-bottom: 6px;
}

.xu5-soft-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.xu5-soft-list li {
    margin-bottom: 2px;
    padding: 0;
}

.xu5-soft-list li:last-child {
    margin-bottom: 0;
}

.xu5-soft-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    line-height: 1.4;
    border-radius: 4px;
    transition: background 0.15s;
}

.xu5-soft-list a:hover {
    background: #f5f5f5;
    color: #1976d2;
}

.xu5-soft-list .soft-icon {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.xu5-soft-list .soft-icon-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 11px;
    flex-shrink: 0;
}

.xu5-soft-list .soft-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   教程列表 - 超紧凑版
   ============================================ */

.xu5-tutorial-card {
    padding: 8px 10px;
}

.xu5-tutorial-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
    padding-bottom: 6px;
}

.xu5-tutorial-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.xu5-tutorial-list li {
    margin-bottom: 2px;
    padding: 0;
}

.xu5-tutorial-list li:last-child {
    margin-bottom: 0;
}

.xu5-tutorial-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    line-height: 1.4;
    border-radius: 4px;
    transition: background 0.15s;
}

.xu5-tutorial-list a:hover {
    background: #f5f5f5;
    color: #2e7d32;
}

.xu5-tutorial-list .tutorial-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #e8f5e9;
    border-radius: 4px;
    font-size: 11px;
    flex-shrink: 0;
}

.xu5-tutorial-list .tutorial-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   相关软件网格
   ============================================ */

.xu5-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.xu5-related-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.xu5-related-item:hover {
    background: #e9ecef;
    border-color: #2d8cf0;
    color: #2d8cf0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45,140,240,0.15);
}

.xu5-related-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.xu5-related-item-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

/* ============================================
   上下篇导航
   ============================================ */

.xu5-post-navigation {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.xu5-nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.xu5-nav-link {
    display: block;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.xu5-nav-link:hover {
    background: #e9ecef;
    border-color: #2d8cf0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45,140,240,0.15);
}

.xu5-nav-link .nav-direction {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.xu5-nav-link .nav-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
}

.xu5-nav-link:hover .nav-title {
    color: #2d8cf0;
}

.xu5-nav-prev {
    text-align: left;
}

.xu5-nav-next {
    text-align: right;
}

/* ============================================
   空状态
   ============================================ */

.xu5-empty-state {
    color: #999;
    font-size: 14px;
    text-align: center;
    padding: 30px 20px;
}

/* ============================================
   归档页头部
   ============================================ */

.xu5-archive-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    border-radius: 12px 12px 0 0;
}

.xu5-archive-title {
    font-size: 36px;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.xu5-archive-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
}

/* ============================================
   筛选器
   ============================================ */

.xu5-filters {
    padding: 20px 30px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.xu5-filters label {
    font-weight: 600;
    color: #555;
    margin-right: 5px;
}

.xu5-filters select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.xu5-filters .button {
    padding: 8px 20px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

/* ============================================
   列表项
   ============================================ */

.xu5-list-item {
    padding: 25px;
    border-bottom: 1px solid #eee;
    transition: background 0.3s;
}

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

.xu5-list-item:hover {
    background: #fafafa;
}

.xu5-list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.xu5-list-item-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.xu5-list-item-title a {
    color: #333;
    text-decoration: none;
}

.xu5-list-item-title a:hover {
    color: #2196f3;
}

.xu5-list-item-excerpt {
    color: #666;
    line-height: 1.6;
    margin: 10px 0;
}

.xu5-list-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #999;
    font-size: 13px;
}

.xu5-list-item-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ============================================
   分页
   ============================================ */

.xu5-pagination {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: center;
}

.xu5-pagination .page-numbers {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.xu5-pagination .page-numbers:hover {
    background: #2196f3;
    border-color: #2196f3;
    color: white;
}

.xu5-pagination .page-numbers.current {
    background: #2196f3;
    border-color: #2196f3;
    color: white;
}

/* ============================================
   响应式设计 - 大屏幕优化
   ============================================ */

@media screen and (min-width: 1400px) {
    .xu5-page-wrapper {
        max-width: 1200px;
    }
}

/* ============================================
   响应式设计 - 中等屏幕
   ============================================ */

@media screen and (max-width: 1024px) {
    .xu5-page-sidebar {
        width: 280px;
    }
    
    .xu5-page-container {
        gap: 20px;
    }
}

/* ============================================
   响应式设计 - 平板
   ============================================ */

@media screen and (max-width: 768px) {
    .xu5-page-wrapper {
        margin: 5px;
        width: calc(100% - 10px);
        border-radius: 8px;
    }
    
    .xu5-page-breadcrumb {
        padding: 10px 20px 5px;
    }
    
    .xu5-page-container {
        flex-direction: column;
        gap: 20px;
        padding: 15px 20px 20px;
    }
    
    .xu5-page-sidebar {
        width: 100%;
        order: 1;
        position: static;
    }
    
    .xu5-page-title {
        font-size: 22px;
    }
    
    .xu5-related-grid {
        grid-template-columns: 1fr;
    }
    
    .xu5-nav-links {
        grid-template-columns: 1fr;
    }
    
    .xu5-archive-header {
        padding: 30px 20px;
        border-radius: 8px 8px 0 0;
    }
    
    .xu5-archive-title {
        font-size: 28px;
    }
    
    .xu5-sidebar-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .xu5-list-item {
        padding: 20px 15px;
    }
    
    .xu5-list-item-title {
        font-size: 18px;
    }
}

/* ============================================
   响应式设计 - 手机
   ============================================ */

@media screen and (max-width: 480px) {
    .xu5-page-wrapper {
        margin: 3px;
    }
    
    .xu5-page-breadcrumb {
        padding: 8px 15px 3px;
    }
    
    .xu5-page-container {
        padding: 10px 15px 15px;
    }
    
    .xu5-page-title {
        font-size: 20px;
    }
    
    .xu5-archive-header {
        padding: 25px 15px;
    }
    
    .xu5-archive-title {
        font-size: 24px;
    }
    
    .xu5-sidebar-card {
        padding: 12px;
    }
    
    .xu5-content-card {
        padding: 15px;
    }
    
    .xu5-list-item {
        padding: 15px 12px;
    }
    
    .xu5-list-item-title {
        font-size: 16px;
    }
}

