/* 全局重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f0f2f5;
    background-image: linear-gradient(135deg, #f0f2f5 0%, #e8eaee 100%);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #2c5aa0;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ff6600;
}

ul, li {
    list-style: none;
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 面包屑导航 */
.dangq {
    width: 100%;
    padding: 15px 0;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.dangq li {
    display: flex;
    align-items: center;
}

.dangq a {
    margin: 0 5px;
    color: #2c5aa0;
}

.dangq a:hover {
    color: #ff6600;
}

/* 内容包装器 - 使用Flexbox确保对齐 */
.content-wrapper {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-start;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* 主内容区 */
.main-content {
    flex: 1;
    min-width: 0;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    min-height: auto;
}

/* 侧边栏 */
.sidebar {
    width: 300px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #fafbfc 0%, #f8f9fa 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* 文章头部 - 优化管理员发布区域 */
.artt {
    background: linear-gradient(135deg, #2c5aa0 0%, #4a7fb8 100%);
    color: #ffffff;
    padding: 15px 25px;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 8px rgba(44, 90, 160, 0.15);
}

.artt p {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
}

.artt p::before {
    content: "";
    margin-right: 8px;
}

/* 文章标题区 */
.arzbt {
    padding: 30px 25px;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
}

.arzbt h2 {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.3;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.arzbt p {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.arzbt p::before {
    content: "";
    margin-right: 8px;
}

.arzbt ul {
    margin-top: 15px;
}

.arzbt li {
    font-size: 14px;
    color: #7f8c8d;
    display: flex;
    align-items: center;
}

.arzbt li::before {
    content: "";
    margin-right: 8px;
}

.arzbt li a {
    color: #2c5aa0;
    font-weight: 500;
    transition: color 0.3s ease;
}

.arzbt li a:hover {
    color: #ff6600;
    text-decoration: underline;
}

/* 文章内容区 */
.arznn {
    padding: 30px 25px;
    line-height: 1.8;
    color: #34495e;
    flex: 1;
    background: #ffffff;
}

.arznn p {
    margin-bottom: 20px;
    text-align: justify;
}

.arznn img {
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 文章元数据 */
.article-meta {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #7f8c8d;
}

.read-count {
    display: flex;
    align-items: center;
}

.read-count::before {
    content: "";
    margin-right: 8px;
}

.interaction-buttons {
    display: flex;
    gap: 10px;
}

.interaction-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: none;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.like-btn {
    background: #f0f4f8;
    color: #27ae60;
}

.like-btn:hover {
    background: #27ae60;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.dislike-btn {
    background: #f0f4f8;
    color: #e74c3c;
}

.dislike-btn:hover {
    background: #e74c3c;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* 相关内容 - 优化排版 */
.arxg {
    padding: 25px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.arxg p {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2c5aa0;
}

.arxg ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
}

.arxg li {
    background: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.arxg li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.arxg li a {
    display: block;
    color: #34495e;
    font-weight: 500;
    transition: color 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.arxg li a:hover {
    color: #2c5aa0;
}

/* 侧边栏模块 - 优化随机阅读样式 */
.listy {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tjnr, .nrmk3 {
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tjnr:hover, .nrmk3:hover {
    transform: translateY(-2px);
}

.tjnr p, .nrbt {
    background: linear-gradient(135deg, #2c5aa0 0%, #4a7fb8 100%);
    color: #fff;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    border-radius: 8px 8px 0 0;
}

.tjnr ul, .nrmk3 ul {
    padding: 15px 20px;
    margin: 0;
    border: none;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: none;
    background: transparent;
}

.tjnr li, .nrmk3 li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.tjnr li::before, .nrmk3 li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    color: #2c5aa0;
    font-size: 12px;
}

.tjnr li:hover, .nrmk3 li:hover {
    transform: translateX(5px);
}

.tjnr li a, .nrmk3 li a {
    display: block;
    color: #34495e;
    font-weight: 500;
    transition: color 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tjnr li a:hover, .nrmk3 li a:hover {
    color: #2c5aa0;
}

/* 搜索框 */
.search-box {
    padding: 20px;
    border-radius: 8px;
    box-shadow: none;
    transition: all 0.3s ease;
    background: transparent;
}

.search-box:hover {
    transform: translateY(-2px);
}

.search-box p {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.search-box form {
    display: flex;
    gap: 0;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px 0 0 25px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.search-box button {
    padding: 0 20px;
    background: linear-gradient(135deg, #2c5aa0 0%, #4a7fb8 100%);
    color: #fff;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.search-box button:hover {
    background: linear-gradient(135deg, #4a7fb8 0%, #2c5aa0 100%);
    transform: translateY(-1px);
}

/* 栏目页样式 */
.xlist {
    padding: 25px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.xnlist {
    display: flex;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f0f0f0;
    align-items: flex-start;
    gap: 20px;
    transition: all 0.3s ease;
}

.xnlist:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-radius: 8px;
    padding: 15px;
    margin-left: -15px;
    margin-right: -15px;
}

.xnlist:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.picxn {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.picxn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.xnlist:hover .picxn img {
    transform: scale(1.05);
}

.zwlist {
    flex: 1;
    min-width: 0;
}

.zwlist ul {
    margin: 0;
    padding: 0;
}

.zwlist li {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.zwlist li span {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.zwlist li span::before {
    content: "";
    margin-right: 6px;
}

.zwlist li a {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    transition: color 0.3s ease;
    line-height: 1.4;
}

.zwlist li a:hover {
    color: #2c5aa0;
    text-decoration: underline;
}

.zwlist p {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xlist .jogger2 {
    margin-top: 30px;
    justify-content: center;
}

/* 友情链接 */
.friend-links {
    background: #f8f9fa;
    padding: 20px;
    margin: 20px auto;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
    max-width: 1160px;
}

.friend-links a {
    display: inline-block;
    padding: 6px 15px;
    margin: 6px;
    background: #fff;
    color: #2c5aa0;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.friend-links a:hover {
    background: #2c5aa0;
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 20px;
    margin: 20px 0;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
    color: #7f8c8d;
}

.footer a {
    color: #2c5aa0;
    font-weight: 500;
}

.footer a:hover {
    color: #ff6600;
}

/* 响应式设计 */
@media screen and (max-width: 992px) {
    .content-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .arxg ul {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .dangq,
    .content-wrapper {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .arzbt h2 {
        font-size: 20px;
    }
    
    .artt, .arzbt, .arznn, .arfy, .arxg {
        padding: 20px;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .jogger2 {
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px;
        border-radius: 8px;
    }
    
    .jogger2 a {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .listy {
        padding: 15px;
    }
    
    .tjnr p, .nrbt {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .tjnr ul, .nrmk3 ul {
        padding: 12px 16px;
    }
    
    .search-box {
        padding: 15px;
    }
    
    .search-box input {
        padding: 8px 12px;
    }
    
    .search-box button {
        padding: 0 16px;
    }
    
    .friend-links {
        padding: 15px;
        margin: 20px 15px;
    }
    
    .friend-links a {
        padding: 4px 12px;
        font-size: 12px;
    }
    
    .footer {
        padding: 20px 15px;
        margin: 30px 15px 15px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content, .sidebar {
    animation: fadeIn 0.5s ease-out forwards;
}

.main-content {
    animation-delay: 0.1s;
}

.sidebar {
    animation-delay: 0.2s;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
