/* ============================================
   有丝分裂、减数分裂与受精 - 中文教育页面
   移动端优先设计
   ============================================ */

/* CSS变量 */
:root {
    --primary-color: #2c5aa0;
    --primary-dark: #1e3d6f;
    --primary-light: #4a7ac2;
    --accent-color: #27ae60;
    --text-primary: #2c3e50;
    --text-secondary: #5d6d7e;
    --text-light: #95a5a6;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-mitosis: #e8f4f8;
    --bg-meiosis: #fef9e7;
    --bg-fertilization: #f5eef8;
    --border-color: #e1e8ed;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s ease;
    --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 重置样式 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
}

/* 容器 */
.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 2rem;
    }
}

/* ============================================
   页面标题
   ============================================ */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2.5rem 0;
    text-align: center;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
}

@media (min-width: 640px) {
    .page-header {
        padding: 3.5rem 0;
    }

    .page-title {
        font-size: 2.25rem;
    }
}

/* ============================================
   内容区块
   ============================================ */
.content-section {
    padding: 2.5rem 0;
}

.content-section:nth-child(even) {
    background: var(--bg-secondary);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

@media (min-width: 640px) {
    .content-section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.75rem;
    }
}

/* ============================================
   介绍区块
   ============================================ */
.intro-section {
    background: var(--bg-secondary);
}

.intro-content {
    max-width: 700px;
    margin: 0 auto;
}

.lead-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-weight: 400;
}

.intro-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.intro-figure {
    margin: 2rem 0 0;
    text-align: center;
}

.intro-figure img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.intro-figure figcaption {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.75rem;
}

/* ============================================
   过程文章区块
   ============================================ */
.process-article {
    max-width: 700px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 1.5rem;
}

.article-header h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.article-content p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.article-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.process-figure {
    margin: 2rem 0;
    text-align: center;
}

.process-figure img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.process-figure figcaption {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.75rem;
    font-style: italic;
}

/* 各区块特色背景 */
.mitosis-section {
    background: var(--bg-mitosis);
}

.mitosis-section .article-header h2 {
    color: #2980b9;
    border-color: #2980b9;
}

.meiosis-section {
    background: var(--bg-meiosis);
}

.meiosis-section .article-header h2 {
    color: #d68910;
    border-color: #d68910;
}

.fertilization-section {
    background: var(--bg-fertilization);
}

.fertilization-section .article-header h2 {
    color: #8e44ad;
    border-color: #8e44ad;
}

/* ============================================
   信息框
   ============================================ */
.info-box {
    padding: 1.25rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}

.info-box.warning {
    background: #fff3cd;
    border-left: 4px solid #f0ad4e;
}

.info-box h4 {
    font-size: 1rem;
    color: #856404;
    margin-bottom: 0.5rem;
}

.info-box p {
    color: #856404;
    margin: 0;
    font-size: 0.9375rem;
}

.info-box a {
    color: #856404;
    text-decoration: underline;
}

/* ============================================
   对比表格
   ============================================ */
.comparison-section {
    background: var(--bg-secondary);
}

.comparison-grid {
    display: grid;
    gap: 1.25rem;
}

.comparison-card {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.comparison-card h3 {
    font-size: 1.125rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.comparison-card ul {
    list-style: none;
    padding: 0;
}

.comparison-card li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

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

@media (min-width: 768px) {
    .comparison-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   加载优化
   ============================================ */
img[loading="lazy"] {
    opacity: 1;
    transition: opacity 0.3s;
}

/* ============================================
   打印样式
   ============================================ */
@media print {
    .page-header {
        background: white;
        color: black;
        padding: 1rem 0;
    }

    .content-section {
        padding: 1rem 0;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* ============================================
   响应式字体调整
   ============================================ */
@media (max-width: 360px) {
    html {
        font-size: 15px;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .article-header h2 {
        font-size: 1.25rem;
    }
}
