/* MEGA Tech 博客全局样式 - 2026-03-18 */

/* ======================
   图片大小控制 - 电脑端
   ====================== */

/* 文章中的所有图片 */
.article-content img,
.article-body img,
figure img {
    max-width: 65% !important;
    height: auto;
    display: block;
    margin: 30px auto;
}

/* YouTube视频和iframe */
iframe,
video {
    max-width: 65% !important;
    height: auto;
    display: block;
    margin: 30px auto;
}

/* 图片容器 */
figure {
    text-align: center;
    margin: 30px 0;
}

/* P-Q曲线图可以稍大一些 */
img[src*="pq-curve"] {
    max-width: 75% !important;
}

/* ======================
   表格样式 - 电脑端（居中对齐）
   ====================== */

.article-body table,
.article-content table {
    max-width: 75% !important;
    width: 75% !important;
    margin: 30px auto !important;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: table !important;
}

/* 表头 */
th {
    background: #f8f9fa;
    font-weight: bold;
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #dee2e6;
}

/* 表格单元格 */
td {
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    vertical-align: top;
}

/* 斑马条纹 */
tbody tr:nth-child(odd) {
    background: #f8f9fa;
}

/* 鼠标悬停效果 */
tbody tr:hover {
    background: #e9ecef;
}

/* ======================
   响应式设计 - 手机端
   ====================== */

/* 手机/平板竖屏 */
@media (max-width: 768px) {
    .article-content img,
    .article-body img,
    figure img,
    iframe,
    video {
        max-width: 90% !important;
        margin: 20px auto;
    }
    
    img[src*="pq-curve"] {
        max-width: 90% !important;
    }
    
    /* 表格移动端 */
    .article-body table,
    .article-content table {
        max-width: 95% !important;
        width: 95% !important;
        margin: 20px auto !important;
        font-size: 14px;
        overflow-x: auto;
    }
    
    th, td {
        padding: 8px 10px;
        font-size: 14px;
    }
}

/* 小手机 */
@media (max-width: 480px) {
    .article-content img,
    .article-body img,
    figure img,
    iframe,
    video {
        max-width: 95% !important;
        margin: 15px auto;
    }
    
    .article-body table,
    .article-content table {
        max-width: 98% !important;
        width: 98% !important;
        margin: 15px auto !important;
        font-size: 13px;
    }
    
    th, td {
        padding: 6px 8px;
        font-size: 13px;
    }
}

/* 平板横屏 */
@media (min-width: 768px) and (max-width: 1024px) {
    .article-content img,
    .article-body img,
    figure img,
    iframe,
    video {
        max-width: 75% !important;
        margin: 25px auto;
    }
    
    table {
        max-width: 80% !important;
        width: 80% !important;
    }
}

/* 超宽屏 */
@media (min-width: 1400px) {
    .article-content img,
    .article-body img,
    figure img,
    iframe,
    video {
        max-width: 55% !important;
    }
    
    table {
        max-width: 60% !important;
        width: 60% !important;
    }
}


/* 面包屑导航样式 */
.breadcrumb {
    margin: 20px 0;
    padding: 15px 0;
    font-size: 14px;
}

.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

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

.breadcrumb li:not(:last-child)::after {
    content: "»";
    margin: 0 10px;
    color: #999;
}

.breadcrumb a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #004499;
    text-decoration: underline;
}

.breadcrumb span {
    color: #666;
    font-weight: 500;
}

/* 移动端面包屑 */
@media (max-width: 768px) {
    .breadcrumb {
        font-size: 13px;
        margin: 15px 0;
        padding: 10px 0;
    }
    
    .breadcrumb li:not(:last-child)::after {
        margin: 0 6px;
    }
}

