/* 全局样式 */
:root {
    --primary-color: #2c6e49; /* 佛教绿 */
    --secondary-color: #4c956c;
    --accent-color: #fefee3;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --card-bg: #fff;
    --border-color: #ddd;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --sidebar-width: 250px;
    --header-height: 70px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--light-bg);
    line-height: 1.6;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    height: var(--header-height);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 28px;
}

.logo h1 {
    font-size: 20px;
    font-weight: 600;
}

.controls {
    display: flex;
    gap: 20px;
    align-items: center;
}

.language-selector, .region-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-selector label, .region-selector label {
    font-size: 14px;
    font-weight: 500;
}

select {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

select:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

select option {
    background-color: var(--primary-color);
    color: white;
}

/* 主容器 */
.container {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height) - 100px);
}

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--card-bg);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 999;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-toggle {
    text-align: center;
    padding: 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary-color);
    transition: all 0.3s;
}

.sidebar-toggle:hover {
    background-color: var(--light-bg);
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

.sidebar.collapsed .nav-text {
    display: none;
}

.nav-menu {
    list-style: none;
    padding: 10px 0;
}

.nav-item {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.nav-item:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.nav-item.active {
    background-color: rgba(44, 110, 73, 0.1);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.nav-item i {
    font-size: 18px;
    min-width: 24px;
    text-align: center;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    transition: all 0.3s;
}

.sidebar.collapsed + .main-content {
    margin-left: 70px;
}

.section {
    display: none;
    animation: fadeIn 0.5s;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.section-header h2 {
    color: var(--primary-color);
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.section-description {
    color: #666;
    font-size: 16px;
}

/* 卡片样式 */
.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 25px;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.card h3 {
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.card h4 {
    color: var(--secondary-color);
    font-size: 18px;
    margin-bottom: 10px;
}

/* 项目概述 */
.problem-list {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.problem-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background-color: #fff9e6;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.problem-item i {
    color: #ff9800;
    font-size: 24px;
    margin-top: 5px;
}

.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.goal-item {
    text-align: center;
    padding: 20px;
    background-color: var(--light-bg);
    border-radius: 8px;
    transition: all 0.3s;
}

.goal-item:hover {
    background-color: rgba(44, 110, 73, 0.1);
    transform: translateY(-5px);
}

.goal-item i {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.goal-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* 三大原则 */
.principles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.principle-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
    border-top: 4px solid var(--primary-color);
}

.principle-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.principle-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.principle-icon i {
    font-size: 36px;
    color: white;
}

.principle-card h3 {
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 15px;
}

.principle-card p {
    color: #666;
    margin-bottom: 15px;
}

.principle-card ul {
    text-align: left;
    list-style: none;
    padding-left: 0;
}

.principle-card ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 20px;
}

.principle-card ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* 核心框架流程图 */
.flowchart {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.flow-step {
    flex: 1;
    min-width: 200px;
    background-color: var(--light-bg);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    position: relative;
    transition: all 0.3s;
}

.flow-step:hover {
    background-color: rgba(44, 110, 73, 0.1);
    transform: scale(1.05);
}

.step-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.step-icon i {
    font-size: 24px;
    color: white;
}

.flow-step h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.flow-step p {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.flow-step ul {
    text-align: left;
    list-style: none;
    font-size: 13px;
    padding-left: 0;
}

.flow-step ul li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.flow-arrow {
    color: var(--primary-color);
    font-size: 24px;
}

/* 分地区流程 */
.region-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}

.region-tab {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.region-tab:hover {
    background-color: var(--light-bg);
}

.region-tab.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.region-content {
    display: none;
    animation: fadeIn 0.5s;
}

.region-content.active {
    display: block;
}

.tradition-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.tradition-tab {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.tradition-tab:hover {
    background-color: var(--light-bg);
}

.tradition-tab.active {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.tradition-content {
    display: none;
    animation: fadeIn 0.5s;
}

.tradition-content.active {
    display: block;
}

.adaptation-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.adaptation-item {
    background-color: var(--light-bg);
    border-radius: 8px;
    padding: 20px;
}

.adaptation-item h5 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 16px;
}

.adaptation-item ul {
    list-style: none;
    padding-left: 0;
}

.adaptation-item ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 20px;
}

.adaptation-item ul li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* 术语对照表 */
.terminology-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

#terminology-search {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

#terminology-search:focus {
    outline: none;
    border-color: var(--primary-color);
}

#terminology-category {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
}

.terminology-table-container {
    overflow-x: auto;
}

.terminology-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.terminology-table th {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
}

.terminology-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.terminology-table tr:hover {
    background-color: var(--light-bg);
}

.terminology-table tr.hidden {
    display: none;
}

/* 数据隐私保护 */
.data-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.data-level {
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.data-level:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.level-1 {
    background-color: #e8f5e9;
    border-top: 4px solid #4caf50;
}

.level-2 {
    background-color: #fff3e0;
    border-top: 4px solid #ff9800;
}

.level-3 {
    background-color: #fce4ec;
    border-top: 4px solid #e91e63;
}

.level-4 {
    background-color: #f3e5f5;
    border-top: 4px solid #9c27b0;
}

.data-level h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

.data-level p {
    font-size: 14px;
    margin-bottom: 8px;
}

.pets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.pet-item {
    text-align: center;
    padding: 20px;
    background-color: var(--light-bg);
    border-radius: 8px;
    transition: all 0.3s;
}

.pet-item:hover {
    background-color: rgba(44, 110, 73, 0.1);
    transform: translateY(-5px);
}

.pet-item i {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.pet-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* 实施路线图 */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline:before {
    content: '';
    position: absolute;
    left: 100px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--primary-color);
}

.timeline-item {
    display: flex;
    margin-bottom: 40px;
    position: relative;
}

.timeline-marker {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.timeline-content {
    margin-left: 40px;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 25px;
    flex: 1;
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.timeline-content p {
    color: #666;
    margin-bottom: 15px;
}

.timeline-content ul {
    list-style: none;
    padding-left: 0;
}

.timeline-content ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 20px;
}

.timeline-content ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* 下载资源 */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.download-item {
    text-align: center;
    padding: 25px;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.download-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.download-item i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.download-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.download-item p {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.btn-download {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-download:hover {
    background-color: var(--secondary-color);
}

/* 页脚 */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer p {
    margin-bottom: 5px;
    font-size: 14px;
}

/* 信息框 */
.info-box {
    background-color: #e8f4fd;
    border-left: 4px solid #2196f3;
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
}

.info-box h4 {
    color: #1976d2;
    margin-bottom: 10px;
}

.info-box ul {
    list-style: none;
    padding-left: 0;
}

.info-box ul li {
    padding: 5px 0;
    position: relative;
    padding-left: 20px;
}

.info-box ul li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #1976d2;
}

/* SVG容器 */
.svg-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    background-color: white;
}

.svg-container svg {
    width: 100%;
    height: auto;
    max-width: 1000px;
}

/* 打印样式 */
@media print {
    .header, .sidebar, .footer {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .section {
        display: block !important;
        page-break-before: always;
    }
    
    .section:first-child {
        page-break-before: auto;
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar .nav-text {
        display: none;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 10px 0;
    }
    
    .controls {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .logo h1 {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .flowchart {
        flex-direction: column;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
    
    .principles-container {
        grid-template-columns: 1fr;
    }
    
    .goals-grid {
        grid-template-columns: 1fr;
    }
    
    .data-levels {
        grid-template-columns: 1fr;
    }
    
    .pets-grid {
        grid-template-columns: 1fr;
    }
    
    .download-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline:before {
        left: 40px;
    }
    
    .timeline-marker {
        width: 60px;
        height: 60px;
        font-size: 14px;
    }
}
/* 术语帮助页 */
.terminology-help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.help-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.help-card:hover {
    transform: translateY(-5px);
}

.help-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.help-header i {
    font-size: 24px;
    color: var(--primary-color);
    margin-right: 10px;
}

.help-header h4 {
    color: var(--primary-color);
    margin: 0;
}

.help-content p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.help-content strong {
    color: var(--secondary-color);
}

/* 下载区域 */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.download-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 30px 20px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

.download-card:hover {
    transform: translateY(-5px);
}

.download-card i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: block;
}

.download-card h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.download-card p {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}
