/* =========================================
   tech.css - 技术原理页专用样式
   ========================================= */

/* 页面头部 - 蓝紫色调，突显技术感 */
.page-header {
    text-align: center;
    padding: 6rem 10% 3rem;
    background: radial-gradient(circle at 50% 10%, rgba(129, 140, 248, 0.08) 0%, rgba(15, 23, 42, 0) 35%); 
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

.h1-icon { display: inline-block; margin-right: 0.5rem; }

/* 内容布局 */
.tech-content {
    padding: 2rem 5% 6rem;   /* 左右留白减半 */
    max-width: 1600px;       /* 增加宽度 */
    margin: 0 auto;
}

.tech-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 4rem;
}

.tech-section:last-child { border-bottom: none; }

/* 左右交替布局 - 偶数行反转 */
.tech-section:nth-child(even) {
    flex-direction: row-reverse;
}

/* 文本区域 */
.tech-text {
    flex: 1;
    min-width: 300px;
}

.tech-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
    font-weight: 700;
}

.tech-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.tech-text p strong { color: var(--text-main); }

.tech-text ul {
    list-style: none;
    padding-left: 0;
    margin-top: 1.5rem;
}

.tech-text li {
    color: var(--text-main);
    margin-bottom: 0.8rem;
    padding-left: 1.8rem;
    position: relative;
}

.tech-text li::before {
    content: '✓';
    color: var(--accent-secondary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* 视觉展示区域 (卡片) */
.tech-visual {
    flex: 1;
    min-width: 300px;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 1rem;
    border: 1px solid var(--code-border);
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.tech-visual:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.3);
}

/* 图标与代码片段 */
.icon-large {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
    color: var(--accent-primary); 
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.3));
}

.code-snippet {
    font-family: 'Fira Code', monospace;
    white-space: pre-wrap;
    text-align: left;
    padding: 1.2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.5rem;
    /* 这里使用了 tech 页特有的高亮颜色 */
    color: #e2e8f0; 
    font-size: 0.9rem;
    line-height: 1.6;
    border-left: 3px solid var(--accent-secondary);
}

.code-snippet .success { color: var(--code-success); }
.code-snippet .fail { color: var(--code-fail); }

/* 移动端适配 */
@media (max-width: 900px) {
    .tech-section, 
    .tech-section:nth-child(even) { 
        flex-direction: column; 
        padding: 3rem 0; 
        gap: 2rem;
    }
    .tech-text { width: 100%; min-width: auto; }
    .tech-visual { width: 100%; min-width: auto; }
}