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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: white;
    padding: 40px 20px;
    line-height: 1.6;
}

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

.header {
    text-align: center;
    color: rgb(44, 43, 43);
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 700;
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.flow-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.flow-step {
    background: #5664a1;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1em;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    text-align: center;
    min-width: 160px;
}

.flow-step-first {
    background: #a9989b;
    box-shadow: 0 4px 15px rgba(194, 189, 190, 0.4);
}

.flow-arrow {
    font-size: 2em;
    color: #667eea;
    font-weight: bold;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

/* 不同card的背景色 */
.card-flow {
    background: rgb(179, 193, 234);
}

.card-analysis {
    background: white;
}

.card-design-zone {
    background: white;
}

.card-design-resource {
    background: white;
}

.card-simulation {
    background: white;
}

.card-decision {
    background: white;
}

.card-matrix {
    background: rgb(245, 243, 243);
}

.card-title {
    font-size: 1.6em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-title .icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8em;
}

.card-title .card-toggle {
    margin-left: auto;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.card-title .card-toggle:hover {
    background: #667eea;
    color: white;
}

.card-content {
    max-height: 2000px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
}

.card.collapsed .card-content {
    display: block;
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.card.collapsed .card-toggle {
    transform: rotate(-90deg);
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.resource-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
}

.resource-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-3px);
}


.resource-card.full-width {
    grid-column: 1 / -1;
}

.resource-header {
    font-size: 1.2em;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.resource-header .badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7em;
}

.resource-section {
    margin-bottom: 12px;
}

.resource-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.resource-content {
    color: #dc3545;
    font-weight: 500;
}

.tag {
    display: inline-block;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 4px 10px;
    border-radius: 6px;
    margin: 3px;
    font-size: 0.9em;
    transition: all 0.2s;
}

.tag:hover {
    background: #e9ecef;
}

.tag.function {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.tag.cost {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.tag.efficiency {
    background: #cce5ff;
    border-color: #007bff;
    color: #004085;
}

.tag.simulation {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.tag.decision {
    background: #fd7e14;
    color: white;
    border: none;
    font-weight: 600;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.95em;
    table-layout: fixed;
}

/* 表格列宽设置 - 修改下面的 width 值即可调整各列宽度 */
table col:nth-child(1) { width: 8%; }   /* 操作引导 */
table col:nth-child(2) { width: 8%; }   /* 资源类别 */
table col:nth-child(3) { width: 16%; }  /* 资源要素 */
table col:nth-child(4) { width: 16%; }  /* 要素属性 */
table col:nth-child(5) { width: 8%; }   /* 函数 */
table col:nth-child(6) { width: 10%; }  /* 成本 */
table col:nth-child(7) { width: 12%; }  /* 效率（作业/空间） */
table col:nth-child(8) { width: 10%; }  /* 仿真 */
table col:nth-child(9) { width: 12%; }  /* 评估决策 */

table th {
    background: rgb(23, 46, 110);
    color: white;
    padding: 15px 12px;
    text-align: center;
    font-weight: 600;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
    word-wrap: break-word;
}

table tr:hover td {
    background: #f8f9fa;
}

table tr:last-child td {
    border-bottom: none;
}

table tr.highlight-row {
    background: #f0eded;
}

table tr.highlight-row:hover td {
    background: #f8f9fa;
}

.dimension-label {
    font-weight: 700;
    color: #495057;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    display: inline-block;
}

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

.output-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 20px;
    text-align: left;
    border-left: 4px solid;
}

.output-card.function { border-left-color: #ffc107; }
.output-card.cost { border-left-color: #28a745; }
.output-card.efficiency { border-left-color: #007bff; }
.output-card.simulation { border-left-color: #dc3545; }
.output-card.decision { border-left-color: #fd7e14; background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%); }
.output-card.full-width { grid-column: 1 / -1; }

.output-card h4 {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.output-card.function h4 { color: #856404; }
.output-card.cost h4 { color: #155724; }
.output-card.efficiency h4 { color: #004085; }
.output-card.simulation h4 { color: #721c24; }
.output-card.decision h4 { color: #c82333; }

.output-card p {
    text-align: left;
}

.guide-section {
    background: #edeff2;
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
}

.guide-steps {
    counter-reset: step;
}

.guide-step {
    position: relative;
    padding-left: 60px;
    margin-bottom: 25px;
}

.guide-step:last-child {
    margin-bottom: 0;
}

.guide-step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 25px;
    height: 25px;
    background: white;
    color: rgb(127, 124, 124);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    font-weight: 700;
}

.guide-step h4 {
    font-size: 1.15em;
    color: #3a444e;
    margin-bottom: 8px;
}

.guide-step p {
    color: #495057;
}

.footer {
    text-align: center;
    color: rgb(44, 43, 43);
    margin-top: 40px;
    opacity: 0.9;
}

/* 操作引导单元格 */
.tour-cell {
    text-align: center;
}

/* 操作引导按钮 */
.tour-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 4px;
    background: #667eea;
    color: white !important;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tour-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

/* 概念说明按钮 */
.concept-btn {
    margin-left: left;
    padding: 4px 12px;
    background: rgba(70, 70, 109, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    font-size: 12px;
    color: #f3f4f5;
    cursor: pointer;
    transition: all 0.2s;
}

.concept-btn:hover {
    background: #667eea;
    color: white;
}

/* 概念说明模态框 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.3s;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(80vh - 70px);
}

.concept-lead {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.concept-subitems {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.concept-subitem {
    padding: 4px 12px;
    background: #eef2ff;
    color: #4f46e5;
    border-radius: 20px;
    font-size: 13px;
}

.concept-h3 {
    color: #1e293b;
    font-size: 1.1rem;
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.concept-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 13px;
}

.concept-table th,
.concept-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #e2e8f0;
}

.concept-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #1e293b;
}

.concept-table td {
    color: #475569;
    line-height: 1.6;
}

.concept-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.concept-tag-blue { background: #dbeafe; color: #1d4ed8; }
.concept-tag-green { background: #dcfce7; color: #15803d; }
.concept-tag-orange { background: #ffedd5; color: #c2410c; }

.concept-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.concept-card {
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.concept-card-title {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.concept-card-text {
    color: #475569;
    font-size: 13px;
    line-height: 1.6;
}

.concept-section { margin-bottom: 16px; }
.concept-section:last-child { margin-bottom: 0; }

.concept-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 24px 0;
}

.concept-list {
    margin: 12px 0;
    padding-left: 20px;
    color: #475569;
    line-height: 1.8;
}

.concept-list li { margin-bottom: 6px; }

.concept-guide {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.concept-guide-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.concept-guide-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.concept-guide-content { flex: 1; }

.concept-guide-title {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}

.concept-guide-text {
    color: #475569;
    font-size: 13px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .header h1 { font-size: 1.8em; }
    .flow-steps { flex-direction: column; }
    .flow-arrow { transform: rotate(90deg); }
    .resource-grid { grid-template-columns: 1fr; }
    .output-grid { grid-template-columns: 1fr 1fr; }
    table { font-size: 0.85em; }
}
