/* assets/css/style.css */
:root {
    --primary-color: #1a73e8;
    --secondary-color: #34a853;
    --accent-color: #fbde05;
    --danger-color: #ea4335;
    --dark-color: #23232b;
    --light-color: #f8f9fa;
    --text-color: #2d3a4b;
    --text-light: #5f6368;
    --border-color: #e0e0e0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

/* 基础样式 */
body {
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, 'Microsoft YaHei', sans-serif;
    background: #f5f7fa;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden; /* 防止整个页面出现水平滚动 */
}

/* 头部样式 */
.header {
    background: #fff;
    padding: 16px 0 0 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header .top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    margin-top: 28px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 72px;
    width: auto;
    object-fit: contain;
}

.header .search-box {
    flex: 1;
    margin: 0 40px;
    display: flex;
    align-items: center;
    position: relative;
    max-width: 450px;
}

.header .search-box form {
    display: flex;
    width: 100%;
    position: relative;
}

.header .search-box input {
    width: 100%;
    padding: 10px 45px 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    outline: none;
    transition: var(--transition);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.header .search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.header .search-box button {
    background: none;
    border: none;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-light);
    font-size: 18px;
    transition: var(--transition);
    padding: 5px;
    z-index: 2;
}

.header .search-box button:hover {
    color: var(--primary-color);
}

.header .user-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 15px;
}

.header .user-bar a {
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: var(--transition);
}

.header .user-bar a:hover {
    color: var(--primary-color);
    background: rgba(26, 115, 232, 0.1);
}

.header .risk-tip {
    text-align: right;
    color: var(--text-light);
    font-size: 12px;
    margin: 8px 32px 0 0;
    padding-bottom: 12px;
}

/* 导航栏 - 修改后的样式 */
.navbar {
    background: #ae2222;
    color: #fff;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 32px;
}

.navbar .nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 12px 20px;
    font-size: 19px;
    display: block;
    position: relative;
    font-weight: normal; /* 默认不加粗 */
}

/* 悬停效果 - 加粗且变黄色 */
.navbar .nav a:hover {
     color: var(--accent-color);
}

/* 点击后/活动状态 - 加粗且变黄色 */
.navbar .nav a.active {
    font-weight: bold;
 }

.navbar .nav a.active:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 3px;
    background: var(--accent-color);
}
 
 /* 主体内容 */
.main {
    max-width: 1220px;
    margin: 22px auto;
    display: flex;
    gap: 22px;
    min-height: 600px;
}

.left-col {
    flex: 0 0 76%;
    max-width: 76%;
}
 
.right-col {
    flex: 0 0 17%;
    max-width: 17%;
    height: fit-content;
}

/* 文章列表 */
.article-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

 
.article-thumb {
    width: 140px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
}

.article-info {
    flex: 1;
}


.article-summary {
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 12px;
    line-height: 1.6;
}

.article-meta {
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
}

.article-meta .tag {
    background: rgba(26, 115, 232, 0.1);
    color: var(--primary-color);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 0;
    margin-right: 0;
    min-width: 0;
    white-space: nowrap;
}

.article-meta .icon {
    margin-right: 4px;
    color: var(--text-light);
}

.sticky {
    color: var(--danger-color);
    font-weight: bold;
    margin-left: 8px;
}

/* 右侧栏 */
.right-col {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.topic-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.topic-title:before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 2px;
    margin-right: 10px;
}

.topic-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.topic-item {
    font-size: 15px;
    color: var(--text-color);
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
    transition: var(--transition);
}

.topic-item:hover {
    color: var(--primary-color);
}

.topic-item .topic-name {
    font-weight: 500;
}

.topic-item .topic-num {
    color: var(--text-light);
    font-size: 13px;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
}

/* 详情页特定样式 - 重点修复区域 */
.article-detail {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 32px 40px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
}

.article-detail .detail-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.4;
    word-break: break-word;
}

.article-detail .detail-meta {
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.article-detail .detail-tag {
    background: rgba(26, 115, 232, 0.1);
    color: var(--primary-color);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 13px;
    font-weight: 500;
}

/* 修复内容区滚动条问题的关键样式 */
.detail-content {
    overflow: hidden; /* 改为hidden防止滚动条 */
    word-break: break-word;
    width: 100%;
    box-sizing: border-box;
}

.detail-content p,
.detail-content div,
.detail-content span {
    max-width: 100%;
}

.detail-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px auto;
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.detail-content table {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse;
    margin: 15px auto;
    display: block;
    overflow-x: auto;
}

.detail-content iframe,
.detail-content video {
    max-width: 100%;
    display: block;
    margin: 15px auto;
}

.detail-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
    background: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
}

.article-detail .detail-support {
    background: rgba(234, 67, 53, 0.1);
    color: var(--danger-color);
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 6px;
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    cursor: pointer;
}

.article-detail .detail-support:hover {
    background: rgba(234, 67, 53, 0.2);
}

/* 评论区域 */
.comment-list {
    margin: 20px 0 0 0;
    padding: 0;
    list-style: none;
}

.comment-item {
    background: #f7f7f7;
    margin-bottom: 16px;
    border-radius: 8px;
    padding: 16px 20px;
    transition: var(--transition);
}

.comment-item:hover {
    background: #f0f0f0;
}

.comment-meta {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 12px;
    font-size: 15px;
    transition: var(--transition);
    resize: vertical;
    box-sizing: border-box;
}

.comment-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
    outline: none;
}

.comment-form button {
    margin-top: 12px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
}

.comment-form button:hover {
    background: #0d5bc2;
    transform: translateY(-1px);
}

/* 页脚 */
.footer {
    background: var(--dark-color);
    color: #fff;
    text-align: center;
    padding: 32px 0;
    font-size: 14px;
    margin-top: 60px;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin: 0 10px;
    transition: var(--transition);
}

.footer a:hover {
    color: #fff;
}

.footer-links {
    margin-bottom: 16px;
}

.copyright {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 32px 0;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination a {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.pagination a:hover {
    background: rgba(26, 115, 232, 0.1);
    border-color: var(--primary-color);
}

.pagination a.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 900px) {
    .main { 
        flex-direction: column; 
        gap: 24px; 
        padding: 0 16px;
    }
    
    .right-col { 
        margin-top: 0;
        position: static;
    }
    
    .header .top-bar {
        padding: 0 16px;
    }
    
    .header .search-box {
        margin: 0 20px;
    }
    
    .navbar .nav {
        padding: 0 16px;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .navbar .nav a {
        padding: 16px 12px;
        font-size: 15px;
    }
  
    .article-thumb {
        width: 100%;
        height: 180px;
        margin-bottom: 12px;
    }
    
    .article-detail {
        padding: 24px;
    }
}

@media (max-width: 600px) {
    .header .user-bar a {
        padding: 8px;
        font-size: 14px;
    }
    
    .article-detail {
        padding: 20px;
    }
    
    .article-detail .detail-title {
        font-size: 24px;
    }
    
    .detail-content img {
        width: 100%;
        height: auto;
    }
    
    .detail-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

				
 