/* 新闻详情页样式 */
:root {
    --primary-color: #4a6cf7;
    --secondary-color: #6c757d;
    --accent-color: #ff6b6b;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --bg-dark: #1a1a2e;
    --bg-card: #232342;
    --bg-hover: #2a2a4a;
    --border-color: #3a3a5a;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.main-content {
    padding: 30px 0;
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 15px;
    margin-bottom: 25px;
    color: var(--text-muted);
    font-size: 14px;
    background-color: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.breadcrumb::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.breadcrumb-label {
    font-weight: 600;
    color: var(--text-color);
    margin-right: 10px;
    background-color: var(--bg-hover);
    padding: 5px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.breadcrumb-label i {
    color: var(--primary-color);
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 5px 8px;
    border-radius: 4px;
    position: relative;
}

.breadcrumb a:hover {
    color: var(--primary-color);
    background-color: var(--bg-hover);
}

.breadcrumb a:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    animation: breadcrumbUnderline 0.3s ease forwards;
}

@keyframes breadcrumbUnderline {
    to {
        width: 80%;
        left: 10%;
    }
}

.breadcrumb i {
    margin: 0 6px;
    font-size: 12px;
    color: var(--accent-color);
    opacity: 0.8;
}

.current-page {
    color: var(--primary-color);
    font-weight: 600;
    padding: 5px 8px;
    border-radius: 4px;
    background-color: rgba(74, 108, 247, 0.1);
}

/* 内容布局 */
.content-wrapper {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.article-container {
    flex: 1;
    min-width: 0; /* 防止flex子项溢出 */
    background-color: var(--bg-card);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

.sidebar {
    width: 320px;
    flex-shrink: 0;
}

/* 文章头部 */
.article-header {
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.article-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: var(--text-color);
    line-height: 1.3;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: var(--text-muted);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-item i {
    color: var(--primary-color);
    opacity: 0.8;
}

.meta-item a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.meta-item a:hover {
    color: var(--primary-color);
}

/* 文章特色图片 */
.article-featured-image {
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.article-featured-image:hover img {
    transform: scale(1.02);
}

/* 文章内容 */
.article-content {
    margin-bottom: 30px;
    line-height: 1.8;
    color: var(--text-color);
    font-size: 16px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}

.article-content h2 {
    font-size: 24px;
    margin: 35px 0 20px;
    color: var(--text-color);
    position: relative;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.article-content h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.article-content h3 {
    font-size: 20px;
    margin: 30px 0 15px;
    color: var(--text-color);
    position: relative;
    padding-left: 15px;
}

.article-content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 5px;
    background: var(--primary-color);
    border-radius: 3px;
}

.article-content h4 {
    font-size: 18px;
    margin: 25px 0 15px;
    color: var(--accent-color);
    display: flex;
    align-items: center;
}

.article-content h4::before {
    content: '►';
    margin-right: 8px;
    font-size: 14px;
    color: var(--primary-color);
}

.article-content p {
    margin-bottom: 20px;
}

.article-content ul, 
.article-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content strong {
    color: var(--accent-color);
    font-weight: 600;
}

.article-content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
    border-bottom: 1px dashed var(--primary-color);
    word-break: break-all;
}

.article-content a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* 强制正文内容换行，覆盖粘贴内容带来的内联样式 */
.article-content p,
.article-content div,
.article-content span,
.article-content li,
.article-content td,
.article-content th,
.article-content h2,
.article-content h3,
.article-content h4 {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

.article-content pre,
.article-content code {
    white-space: pre-wrap !important;
    word-break: break-all;
}

/* 正文内图片、视频、表格等内容的移动端自适应 */
.article-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 16px auto;
    border-radius: 8px;
    box-sizing: border-box;
}

.article-content video {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 16px auto;
    border-radius: 8px;
}

.article-content iframe {
    max-width: 100% !important;
    display: block;
    margin: 16px auto;
}

.article-content table {
    max-width: 100%;
    display: block;
    overflow-x: auto;
    border-collapse: collapse;
}

.article-content pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 文章标签 */
.article-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.tags-label {
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tags-label i {
    color: var(--primary-color);
}

.tag {
    display: inline-block;
    padding: 5px 12px;
    background-color: var(--bg-hover);
    color: var(--text-muted);
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 文章导航 */
.article-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
}

.prev-article,
.next-article {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background-color: var(--bg-hover);
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 45%;
}

.prev-article {
    justify-content: flex-start;
}

.next-article {
    justify-content: flex-end;
    text-align: right;
}

.prev-article:hover,
.next-article:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.prev-article i,
.next-article i {
    font-size: 14px;
}

.prev-article span,
.next-article span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 右侧边栏 */
.sidebar-widget {
    background-color: var(--bg-card);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    text-align: center;
}

.widget-title i {
    color: var(--primary-color);
}

/* 推荐文章 */
.recommended-article-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recommended-article-item {
    display: flex;
    gap: 12px;
}

.recommended-article-image {
    width: 80px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.recommended-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recommended-article-item:hover .recommended-article-image img {
    transform: scale(1.1);
}

.recommended-article-info {
    flex: 1;
    min-width: 0; /* 防止文本溢出 */
}

.recommended-article-title {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 5px 0;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.recommended-article-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.recommended-article-title a:hover {
    color: var(--primary-color);
}

.recommended-article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.recommended-article-meta i {
    color: var(--primary-color);
    opacity: 0.7;
    margin-right: 3px;
}

/* 相关游戏 */
.related-game-item {
    background-color: var(--bg-hover);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.related-game-item:hover {
    transform: translateY(-5px);
}

.related-game-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.related-game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-game-item:hover .related-game-image img {
    transform: scale(1.05);
}

.related-game-info {
    padding: 15px;
}

.related-game-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.related-game-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-game-title a:hover {
    color: var(--primary-color);
}

.related-game-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.original-price {
    color: var(--text-muted);
    text-decoration: line-through;
    font-size: 14px;
}

.current-price {
    color: var(--accent-color);
    font-size: 18px;
    font-weight: 600;
}

.view-detail-btn {
    display: block;
    width: 100%;
    padding: 8px 0;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-detail-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

/* 图片懒加载样式 */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease;
    background-color: var(--bg-hover);
}

.lazy-image.loaded {
    opacity: 1;
}

/* 响应式布局 */
@media (max-width: 992px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .recommended-article-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .article-title {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .breadcrumb {
        padding: 12px;
        margin-bottom: 20px;
        font-size: 12px;
    }
    
    .breadcrumb-label {
        padding: 4px 8px;
        margin-right: 6px;
        margin-bottom: 5px;
    }
    
    .article-container {
        padding: 20px;
    }
    
    .article-title {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .article-content h2 {
        font-size: 20px;
    }
    
    .article-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .prev-article,
    .next-article {
        max-width: 100%;
    }
    
    .recommended-article-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .article-container {
        padding: 15px;
    }
    
    .article-title {
        font-size: 22px;
    }
    
    .article-content {
        font-size: 15px;
    }
    
    .article-tags {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .article-navigation {
        margin-top: 20px;
    }
} 
