/**
 * SEO 关键词模块公共样式
 * 适用页面：分类首页、列表页、详情页
 */

/* ========== 全局防溢出 ========== */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* ========== 基础布局 ========== */
.seo-keyword-index,
.seo-keyword-detail {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.seo-keyword-index *,
.seo-keyword-detail * {
    box-sizing: border-box;
    max-width: 100%;
}

/* ========== 列表项样式 ========== */
.seo-list-item {
    background: #fff;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: background 0.3s;
}

.seo-list-item:hover {
    background: #f9f9f9;
}

.seo-list-item img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
    flex-shrink: 0;
}

.seo-list-info {
    flex: 1;
}

.seo-list-info h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.seo-list-info h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.seo-list-info h3 a:hover {
    color: #e74c3c;
}

.seo-list-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.seo-list-meta {
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

.seo-list-meta span {
    margin-right: 20px;
}

/* ========== 赛事直播模块 ========== */
.live-module {
    margin-bottom: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 4px;
}

.live-module-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 4px solid #e74c3c;
}

.live-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.live-item {
    flex: 0 0 calc(33.333% - 10px);
    background: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #eee;
    transition: border-color 0.3s;
}

.live-item:hover {
    border-color: #e74c3c;
}

.live-item-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-item-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.live-item-title a:hover {
    color: #e74c3c;
}

.live-item-meta {
    font-size: 12px;
    color: #999;
}

.live-item-time {
    color: #e74c3c;
    font-weight: bold;
}

.live-tags {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.live-tag {
    display: inline-block;
    padding: 3px 8px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    border-radius: 3px;
}

/* ========== 侧边栏样式 ========== */
.seo-sidebar {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.seo-sidebar h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 4px solid #e74c3c;
}

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

.seo-sidebar li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.seo-sidebar li a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.seo-sidebar li a:hover {
    color: #e74c3c;
}

/* ========== 分页样式 ========== */
.seo-pagination {
    text-align: center;
    padding: 20px 0;
}

.seo-pagination a,
.seo-pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.seo-pagination a:hover {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}

.seo-pagination .current {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}

/* ========== 详情页专用样式 ========== */
.seo-article-box {
    padding: 20px;
    background: #fff;
    border-radius: 4px;
}

.seo-article-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
}

.seo-article-meta {
    color: #999;
    font-size: 13px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.seo-article-meta span {
    margin-right: 15px;
}

.seo-article-content {
    line-height: 1.8;
    font-size: 15px;
    color: #333;
}

.seo-article-content p {
    margin-bottom: 15px;
    text-indent: 2em;
}

.seo-article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px auto;
}

/* 上一篇/下一篇 */
.seo-prev-next {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.seo-prev-next a {
    color: #e74c3c;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.seo-prev-next a:hover {
    text-decoration: underline;
}

/* 相关内容 */
.seo-related {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 4px;
}

.seo-related h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 4px solid #e74c3c;
}

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

.seo-related li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.seo-related li a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.seo-related li a:hover {
    color: #e74c3c;
}

/* ========== 响应式设计（平板端 768px 以下） ========== */
@media (max-width: 768px) {
    /* 基础布局 */
    .seo-keyword-index,
    .seo-keyword-detail {
        padding: 10px;
    }
    
    /* 强制 container 全宽，消除 Bootstrap 固定宽度 */
    .seo-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .seo-row {
        margin: 0 !important;
    }
    
    .seo-main,
    .seo-sidebar-col {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        float: none !important;
    }
    
    /* 列表项 */
    .seo-list-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }
    
    .seo-list-item img {
        margin-bottom: 10px;
        width: 100%;
        height: auto;
    }
    
    /* 赛事直播模块 */
    .live-module {
        padding: 15px 10px;
    }
    
    .live-item {
        flex: 0 0 calc(50% - 5px);
    }
    
    /* 上一篇/下一篇 */
    .seo-prev-next {
        flex-direction: column;
        gap: 10px;
    }
    
    /* 侧边栏放到内容下方，宽度 100% */
    .seo-sidebar-col {
        margin-top: 20px;
    }
}

/* ========== 响应式设计（手机端 480px 以下） ========== */
@media (max-width: 480px) {
    /* 基础布局 */
    .seo-keyword-index,
    .seo-keyword-detail {
        padding: 5px;
    }
    
    /* 详情页标题 */
    .seo-article-title {
        font-size: 18px;
        line-height: 1.5;
    }
    
    /* 详情页元信息 */
    .seo-article-meta {
        font-size: 12px;
    }
    
    .seo-article-meta span {
        display: block;
        margin-bottom: 5px;
        margin-right: 0;
    }
    
    /* 文章内容 */
    .seo-article-content {
        font-size: 14px;
        line-height: 1.7;
    }
    
    .seo-article-content p {
        text-indent: 0;
        margin-bottom: 12px;
    }
    
    /* 赛事直播模块 - 手机端单列 */
    .live-module {
        padding: 10px 5px;
    }
    
    .live-module-title {
        font-size: 16px;
    }
    
    .live-item {
        flex: 0 0 100%;
        padding: 10px;
    }
    
    .live-item-title {
        font-size: 13px;
        white-space: normal;
    }
    
    /* 列表项 */
    .seo-list-item {
        padding: 8px;
    }
    
    .seo-list-info h3 {
        font-size: 14px;
    }
    
    .seo-list-info p {
        font-size: 13px;
    }
    
    .seo-list-meta span {
        display: block;
        margin-bottom: 3px;
        margin-right: 0;
    }
    
    /* 侧边栏 */
    .seo-sidebar {
        padding: 15px 10px;
    }
    
    .seo-sidebar h3 {
        font-size: 15px;
    }
    
    .seo-sidebar li a {
        font-size: 13px;
    }
    
    /* 相关内容 */
    .seo-related {
        padding: 15px 10px;
    }
    
    .seo-related h3 {
        font-size: 15px;
    }
    
    .seo-related li a {
        font-size: 13px;
    }
    
    /* 分页 */
    .seo-pagination a,
    .seo-pagination span {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    /* 上一篇/下一篇 */
    .seo-prev-next a {
        font-size: 13px;
        word-break: break-all;
    }
    
    /* 面包屑导航 */
    nav[aria-label="面包屑导航"] div {
        font-size: 12px;
    }
}
