/* 基础设置 */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --border-radius: 6px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: var(--transition);
}

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

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

ul, ol {
    list-style-position: inside;
    margin-bottom: 1rem;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 60px 0;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

header .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 导航栏样式 */
nav {
    background-color: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    overflow-x: auto;
    padding: 0 10px;
}

nav ul li {
    margin: 0;
    white-space: nowrap;
}

nav ul li a {
    display: block;
    padding: 15px 15px;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--secondary-color);
    border-bottom: 3px solid var(--secondary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 15px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    margin-bottom: 5px;
    border-radius: 2px;
    transition: var(--transition);
}

/* 主要内容区域 */
main {
    padding: 20px 0 40px;
}

.section {
    padding: 60px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.section-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
    display: inline-block;
}

.section-intro {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.subsection-title {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin: 1.5rem 0 1rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
    align-items: start;
}

.text-content {
    line-height: 1.7;
}

.text-content p {
    margin-bottom: 1rem;
}

.image-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.image-content figure {
    text-align: center;
}

.section-image {
    box-shadow: var(--box-shadow);
    max-height: 400px;
    object-fit: contain;
}

figcaption {
    margin-top: 10px;
    font-style: italic;
    color: #666;
}

/* 术语表样式 */
.term-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.term-item {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--box-shadow);
}

.term-item h4 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* 项目目标列表样式 */
.goal-list {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px 20px 20px 40px;
    box-shadow: var(--box-shadow);
    list-style-position: outside;
}

.goal-list li {
    margin-bottom: 0.8rem;
}

.goal-list li:last-child {
    margin-bottom: 0;
}

/* 属性卡片样式 */
.attributes-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.attribute-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.attribute-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.attribute-card h4 {
    color: var(--secondary-color);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.attribute-card p {
    margin-bottom: 0.8rem;
}

.attribute-card ul {
    padding-left: 20px;
    list-style-position: outside;
}

/* 操作符表格样式 */
.operators-table-container {
    margin: 2rem 0;
    overflow-x: auto;
}

.operators-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.operators-table th, 
.operators-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.operators-table thead {
    background-color: var(--primary-color);
    color: white;
}

.operators-table tbody tr:hover {
    background-color: #f8f9fa;
}

.operator {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--accent-color);
}

.operator-priority {
    margin-top: 1rem;
    font-style: italic;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: var(--border-radius);
}

/* 代码示例样式 */
.code-examples {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 2rem;
}

.code-example {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.code-example:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.code-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.loinc-code {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.code-body {
    padding: 15px;
}

.code-name {
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.code-attributes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.code-attributes .attribute {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.code-attributes .attribute span:first-child {
    font-weight: bold;
    color: #666;
}

/* 时间线样式 */
.timeline {
    margin-top: 2rem;
}

.timeline-phase {
    margin-bottom: 2rem;
}

.phase-title {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.timeline-event {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 20px;
    margin-bottom: 1.5rem;
    position: relative;
}

.timeline-event:before {
    content: '';
    position: absolute;
    left: 40px;
    top: 30px;
    height: calc(100% + 1.5rem);
    width: 2px;
    background-color: var(--secondary-color);
}

.timeline-event:last-child:before {
    display: none;
}

.event-year {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 5px;
    border-radius: var(--border-radius);
    font-weight: bold;
    position: relative;
    z-index: 1;
}

.event-content {
    background-color: white;
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.event-content h4 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* 应用场景卡片样式 */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 2rem;
}

.application-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.application-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.application-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.application-card ul {
    padding-left: 20px;
    list-style-position: outside;
}

.image-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

/* 挑战与解决方案样式 */
.challenges-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.challenge-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.challenge-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.challenge-card h3 {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    margin: 0;
}

.challenge-content {
    padding: 15px;
}

.challenge-desc, 
.solution-desc {
    margin-bottom: 15px;
}

.challenge-desc h4,
.solution-desc h4 {
    color: var(--dark-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.solution-desc {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: var(--border-radius);
}

.solution-desc ul {
    padding-left: 20px;
    list-style-position: outside;
}

/* 参考图表样式 */
.figures-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 2rem;
}

.figure-item {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.figure-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.figure-item figure {
    margin: 0;
}

.figure-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 0;
}

.figure-item figcaption {
    padding: 15px;
    margin-top: 0;
    font-style: normal;
}

.figure-item figcaption h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.figure-item figcaption p {
    color: #555;
    margin: 0;
}

/* 页脚样式 */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 30px 0;
    text-align: center;
}

footer p {
    margin-bottom: 0.5rem;
}

footer p:last-child {
    margin-bottom: 0;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .content-grid,
    .figures-grid {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 40px 0;
    }
}

@media (max-width: 768px) {
    nav .container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-toggle {
        display: flex;
        align-self: flex-end;
        position: absolute;
        top: 10px;
        right: 20px;
    }
    
    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        padding: 0;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    nav ul li a {
        padding: 10px 15px;
        border-bottom: 1px solid #eee;
    }
    
    .timeline-event {
        grid-template-columns: 60px 1fr;
        gap: 15px;
    }
    
    .timeline-event:before {
        left: 30px;
    }
    
    header {
        padding: 40px 0;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .attributes-container,
    .term-list,
    .code-examples,
    .applications-grid,
    .challenges-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .subsection-title {
        font-size: 1.3rem;
    }
    
    .timeline-event {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .timeline-event:before {
        display: none;
    }
    
    .event-year {
        width: 100px;
    }
}