:root {
    --color-up: #10b981;
    --color-down: #ef4444;
    --color-neutral: #6b7280;
    --color-primary: #3b82f6;
    --color-secondary: #8b5cf6;
    --color-warning: #f59e0b;
}

.bg-grid {
    background-image: 
        linear-gradient(to right, rgba(55, 65, 81, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(55, 65, 81, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* 移动端开始测试按钮样式 */
@media (max-width: 767px) {
    #mobile-test-button {
        width: 120px !important;
        max-width: 120px !important;
        flex: 0 0 auto !important;
        min-width: 120px !important;
    }
    
    /* 修复：冒号转义使用单个反斜杠 */
    .md\:hidden.flex.items-center.justify-end {
        justify-content: flex-end !important;
        gap: 0.5rem !important;
    }
}

/* 文章内容样式 */
.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    line-height: 1.75;
    color: #374151;
}

.article-content ul, .article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
    color: #374151;
}

.article-content ul li {
    list-style-type: disc;
}

.article-content ol li {
    list-style-type: decimal;
}

.article-content blockquote {
    border-left: 4px solid var(--color-primary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6b7280;
}

.article-content a {
    color: var(--color-primary);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.article-content a:hover {
    color: #2563eb;
}

/* 标签样式 */
.article-tag {
    transition: all 0.2s ease;
}

.article-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* 相关文章卡片样式 */
.related-article {
    transition: all 0.3s ease;
}

.related-article:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
/* 针对内容区域的图片进行响应式控制 */
.article-content img {
    max-width: 100%; /* 图片最大宽度不超过其父容器 */
    height: auto;    /* 高度自动按比例缩放，防止变形 */
    display: block;  /* 将图片转为块级元素，避免底部间隙问题 */
}

/* 更精确的选择：确保所有可能的内容图片都被控制 */
#article-content img,
.content img,
.news_text img {
    max-width: 100%;
    height: auto;
}
/* 控制文章内容内的所有图片 */
.article-content img {
    /* 1. 核心：保证图片响应式不溢出 */
    max-width: 100%;
    height: auto;
    
    /* 2. 核心：变为块级元素并水平居中 */
    display: block;
    margin-left: auto;
    margin-right: auto;
    
    /* 3. 可选但建议：增加上下间距，使版式更清爽 */
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}