.article-detail {
max-width: 1200px;
margin: 30px auto;
padding: 0 20px;
display: flex;
gap: 30px;
}

.article-main {
flex: 1;
background: #fff;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
padding: 30px;
}

.article-header {
border-bottom: 1px solid #f0f0f0;
padding-bottom: 20px;
margin-bottom: 30px;
}

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

.article-meta {
display: flex;
align-items: center;
color: #999;
font-size: 14px;
gap: 20px;
flex-wrap: nowrap;
}

.article-meta span {
display: inline-block;
white-space: nowrap;
vertical-align: middle;
line-height: 1.5;
height: 1.5em;
box-sizing: border-box;
}

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

.article-content p {
margin-bottom: 20px;
}

.article-content img {
max-width: 100%;
height: auto;
border-radius: 4px;
margin: 20px 0;
}

/* 右侧相关文章 */
.article-sidebar {
width: 300px;
flex-shrink: 0;
}

.sidebar-section {
background: #fff;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
margin-bottom: 20px;
}

.sidebar-title {
font-size: 18px;
color: #333;
margin-bottom: 15px;
padding: 20px 20px 15px;
border-bottom: 1px solid #f0f0f0;
font-weight: 500;
}

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

.related-item {
margin-bottom: 15px;
padding-bottom: 15px;
border-bottom: 1px solid #f5f5f5;
}

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

.related-link {
display: block;
color: #666;
font-size: 14px;
line-height: 1.6;
transition: all 0.3s;
}

.related-link:hover {
color: #1E9FFF;
}

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

/* 文章导航 */
.article-nav {
display: flex;
justify-content: space-between;
margin-top: 30px;
padding-top: 30px;
border-top: 1px solid #f0f0f0;
}

.nav-item {
max-width: 45%;
}

.nav-label {
color: #999;
font-size: 13px;
margin-bottom: 5px;
}

.nav-title {
color: #666;
font-size: 14px;
transition: all 0.3s;
}

.nav-title:hover {
color: #1E9FFF;
}

/* 修改广告位样式 */
.ad-item {
background: #fff;
border-radius: 8px;
overflow: hidden;
transition: all 0.3s;
height: auto;  /* 移除固定高度，允许自适应 */
min-height: 200px;  /* 设置最小高度 */
display: flex;
flex-direction: column;
}

.ad-item:hover {
transform: translateY(-5px);
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.ad-image {
width: 100%;
height: 140px;  /* 固定图片高度 */
object-fit: cover;  /* 保持图片比例 */
display: block;
}

.ad-content {
display: flex;
flex-direction: column;
height: auto;
}

.ad-title {
font-size: 16px;
color: #333;
margin-bottom: 5px;
font-weight: 500;
}

.ad-desc {
color: #666;
font-size: 13px;
line-height: 1.6;
margin-top: 8px;
text-align: left;
max-height: none;
overflow: visible;
}

/* 视频容器样式 */
.video-container {
position: relative;
width: 100%;
margin: 20px 0;
background: #000;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 保持16:9比例 */
.video-container::before {
content: "";
display: block;
padding-top: 56.25%;  /* 16:9 比例 */
}

.article-video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
}

/* 自定义视频控制器样式 */
.article-video::-webkit-media-controls {
background: rgba(0,0,0,0.5);
}

.article-video::-webkit-media-controls-panel {
padding: 0 10px;
}

.article-video::-webkit-media-controls-play-button {
color: #fff;
}

/* IE 兼容性处理 */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
.video-container {
height: 0;
padding-bottom: 56.25%;
}

.article-video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
.video-container {
margin: 15px 0;
}
}