.main-content {
    display:grid;
    /* 原代码：grid-template-columns:2fr 1fr; */
    grid-template-columns:1fr 420px; /* 左侧自适应，右侧固定320px */
    gap:30px;
    /* 新增：防止网格溢出容器 */
    width: 100%;
    box-sizing: border-box;
    margin-bottom:40px;
}

.right-sidebar {
    display:flex;
    flex-direction:column;
    gap:20px;
}

.content-center {
    background-color:white;
    border-radius:8px;
    box-shadow:0 3px 10px rgba(0, 0, 0, 0.08);
    overflow:hidden;
}

.detail-header {
    background:linear-gradient(135deg, #1a365d 0%, #2d4a7c 100%);
    color:white;
    padding:30px;
}

.subcategories-nav {
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-bottom:20px;
}

.subcategory-btn {
    background:rgba(255, 255, 255, 0.1);
    color:white;
    padding:8px 16px;
    border:1px solid rgba(255, 255, 255, 0.3);
    border-radius:20px;
    font-size:14px;
    cursor:pointer;
    transition:all 0.3s;
}

.subcategory-btn:hover, .subcategory-btn.active {
    background-color:#f97316;
    border-color:#f97316;
}

.detail-title {
    font-size:28px;
    font-weight:600;
    margin-bottom:15px;
    line-height:1.3;
}

.detail-summary {
    opacity:0.9;
    font-size:16px;
    line-height:1.6;
    border-left:3px solid #0ea5e9;
    padding-left:15px;
    margin-bottom:20px;
}

.detail-meta {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:15px;
}

.detail-category {
    background:#f0f9ff;
    color:#0369a1;
    padding:5px 12px;
    border-radius:15px;
    font-weight:500;
    font-size:14px;
}

.detail-stats {
    display:flex;
    gap:15px;
    color:rgba(255, 255, 255, 0.8);
    font-size:14px;
}

.detail-body {
    padding:30px;
}

.detail-content {
    max-width:100%;
}

.detail-section {
    margin-bottom:30px;
}

.detail-section h2 {
    font-size:22px;
    color:#1a365d;
    margin:30px 0 15px;
    padding-bottom:10px;
    border-bottom:1px solid #e2e8f0;
}

.detail-section h3 {
    font-size:18px;
    color:#1a365d;
    margin:25px 0 10px;
}

.detail-section p {
    margin-bottom:15px;
    font-size:16px;
    line-height:1.8;
    color:#475569;
}

.detail-section ul, .detail-section ol {
    margin:15px 0;
    padding-left:20px;
}

.detail-section li {
    margin-bottom:8px;
}

.tech-specs {
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(300px, 1fr));
    gap:20px;
    margin:20px 0;
}

.spec-item {
    background:#f8fafc;
    padding:15px;
    border-radius:6px;
    border-left:3px solid #0ea5e9;
}

.spec-label {
    font-weight:600;
    color:#1a365d;
    margin-bottom:5px;
}

.spec-value {
    color:#475569;
}

/* 相关内容推荐样式 */
.related-content {
    margin-top:40px;
    padding-top:30px;
    border-top:1px solid #e2e8f0;
}

.related-content h3 {
    font-size:20px;
    color:#1a365d;
    margin-bottom:20px;
    padding-bottom:10px;
    border-bottom:2px solid #0ea5e9;
}

.related-grid {
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(300px, 1fr));
    gap:20px;
}

.related-card {
    background:white;
    border:1px solid #e2e8f0;
    border-radius:6px;
    padding:20px;
    transition:all 0.3s;
}

.related-card:hover {
    border-color:#0ea5e9;
    box-shadow:0 2px 8px rgba(0, 0, 0, 0.05);
}

.related-category {
    background:#f0f9ff;
    color:#0369a1;
    padding:3px 8px;
    border-radius:12px;
    font-size:11px;
    margin-bottom:5px;
}

.related-title {
    font-weight:500;
    color:#1a365d;
    margin-bottom:8px;
    line-height:1.4;
}

.related-title a {
    color:inherit;
    text-decoration:none;
}

.related-title a:hover {
    color:#0ea5e9;
}

.related-date {
    color:#94a3b8;
    font-size:12px;
}

/* 侧边栏样式 */
.sidebar-panel {
    background:white;
    border-radius:8px;
    box-shadow:0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom:20px;
    border:1px solid #e2e8f0;
}

.panel-header {
    padding:15px 20px;
    border-bottom:1px solid #e2e8f0;
    background:#f8fafc;
}

.panel-header h3 {
    font-size:16px;
    color:#1a365d;
    margin:0;
    font-weight:600;
}

.panel-body {
    padding:20px;
}

.hot-updates-list {
    list-style:none;
}

/* 热门更新项容器：限制宽度，强制子元素换行 */
.hot-update-item {
    display: flex;
    align-items: flex-start; /* 改为顶部对齐，避免文字行高影响序号位置 */
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    width: 100%; /* 强制占满父容器宽度 */
    box-sizing: border-box;
}

.hot-update-item:last-child {
    border-bottom:none;
}

/* 序号容器固定宽度，避免挤压文字区域 */
.hot-rank {
    background: #0ea5e9;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    margin-right: 12px;
    flex-shrink: 0; /* 关键：序号容器不被挤压，固定宽度 */
}

/* 确保父容器宽度100%，无溢出 */
.hot-update-content {
    flex: 1; /* 占满剩余宽度，不被序号挤压 */
    width: calc(100% - 36px); /* 减去序号宽度+间距（24px+12px），兜底约束 */
    box-sizing: border-box;
}

/* 右侧栏容器：确保不超出网格固定宽度 */
.sidebar-right {
    max-width: 100%;
    box-sizing: border-box;
}

/* 核心：超长文字强制换行，彻底解决溢出问题 */
.hot-update-title {
    font-size: 14px;
    color: #475569;
    margin-bottom: 4px;
    line-height: 1.5; /* 优化换行后行高，提升可读性 */
    width: 100%; /* 占满父容器宽度 */
}

/* 覆盖原有.hot-update-title a的样式，重点加word-break */
.hot-update-title a {
    color: inherit;
    text-decoration: none;
    /* 核心：强制拆分所有字符（包括无空格长串） */
    word-break: break-all;
    /* 兜底：兼容旧浏览器 + 确保不是nowrap */
    word-wrap: break-word;
    white-space: normal;
    /* 确保宽度约束，触发换行 */
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.hot-update-title a:hover {
    color:#0ea5e9;
}

.hot-update-meta {
    font-size:12px;
    color:#94a3b8;
}

/* 行业新闻板块样式 */
.news-list {
    list-style:none;
}

.news-item {
    padding:10px 0;
    border-bottom:1px solid #f1f5f9;
}

.news-item:last-child {
    border-bottom:none;
}

.news-category {
    background:#f0f9ff;
    color:#0369a1;
    padding:3px 8px;
    border-radius:12px;
    font-size:11px;
    margin-bottom:5px;
    display:inline-block;
}

.news-title {
    font-size:14px;
    color:#475569;
    margin-bottom:4px;
    line-height:1.4;
}

.news-title a {
    color:inherit;
    text-decoration:none;
}

.news-title a:hover {
    color:#0ea5e9;
}

.news-date {
    font-size:12px;
    color:#94a3b8;
}

.ad-banner {
    background:linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    border-left:4px solid #f97316;
    padding:20px;
    border-radius:6px;
    text-align:center;
}

.ad-banner h4 {
    color:#9a3412;
    margin-bottom:10px;
    font-size:16px;
}

.ad-banner p {
    color:#7c2d12;
    font-size:14px;
    line-height:1.5;
    margin-bottom:15px;
}

.ad-btn {
    background:#f97316;
    color:white;
    padding:8px 16px;
    border:none;
    border-radius:4px;
    text-decoration:none;
    font-size:14px;
    display:inline-block;
    transition:background 0.3s;
}

.ad-btn:hover {
    background:#ea580c;
}

@media (max-width:768px) {

    .detail-meta {
        flex-direction:column;
        align-items:flex-start;
        gap:10px;
    }

    .main-content {
        grid-template-columns:1fr;
    }

    .tech-specs {
        grid-template-columns:1fr;
    }

    .related-grid {
        grid-template-columns:1fr;
    }
}