/*
主色 #4CAF50 (绿) 到 #388E3C (深绿)
辅色 #FFC107 (琥珀/黄)
文本/背景色 #333333 / #FFFFFF / #F1F8E9 / #E8F5E9
*/

/* ========== 基础样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #F1F8E9; /* 极浅绿色背景 */
    color: #333333; /* 文本色 */
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ========== 头部样式 ========== */
header {
    /* 主色绿渐变: #4CAF50 到 #388E3C */
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    color: #FFFFFF; /* 头部文本色 */
    padding: 40px 20px;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* ========== 内容区域样式 ========== */
section {
    background: #FFFFFF; /* 内容区域背景 */
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

h2 {
    color: #388E3C; /* 深绿色 */
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #E8F5E9; /* 浅绿色边框 */
}

h3 {
    color: #FFC107; /* 辅色：琥珀/黄 */
    margin: 15px 0 10px;
}

/* ========== 列表样式 ========== */
ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

li {
    margin-bottom: 8px;
}

/* ========== 高亮区域样式 ========== */
.highlight {
    background-color: #F1F8E9; /* 极浅绿色背景 */
    padding: 15px;
    border-left: 4px solid #4CAF50; /* 主绿色 */
    margin: 15px 0;
    border-radius: 0 5px 5px 0;
}

/* ========== 网格布局样式 ========== */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.spec-card {
    background: #FFFFFF; /* 白色背景 */
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #FFC107; /* 辅色：琥珀/黄 */
}

.spec-title {
    font-weight: bold;
    color: #FFC107; /* 辅色：琥珀/黄 */
    margin-bottom: 5px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.feature-card {
    background: #FFFFFF; /* 白色背景 */
    padding: 20px;
    border-radius: 8px;
    border-top: 4px solid #388E3C; /* 深绿色 */
}

.feature-title {
    font-weight: bold;
    color: #388E3C; /* 深绿色 */
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.feature-title i {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* ========== 引用样式 ========== */
.references {
    background: #F1F8E9; /* 极浅绿色背景 */
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.reference-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #E8F5E9; /* 浅绿色线条 */
}

.reference-item:last-child {
    border-bottom: none;
}

.reference-title {
    font-weight: bold;
    color: #388E3C; /* 深绿色 */
    margin-bottom: 5px;
}

.reference-link {
    color: #FFC107; /* 辅色：琥珀/黄 */
    text-decoration: none;
}

.reference-link:hover {
    text-decoration: underline;
}

/* ========== 页脚样式 ========== */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #666666; /* 深灰色 */
    font-size: 0.9rem;
}

/* ========== 表格样式 ========== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95rem;
}

th, td {
    border: 1px solid #E8F5E9; /* 浅绿色边框 */
    padding: 12px 10px;
    text-align: center;
}

th {
    /* 主色绿渐变: #4CAF50 到 #388E3C */
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    color: #FFFFFF; /* 表头文本色 */
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #F1F8E9; /* 极浅绿色条纹 */
}

tr:hover {
    background-color: #E8F5E9; /* 浅绿色悬停 */
}

.table-caption {
    font-weight: bold;
    color: #388E3C; /* 深绿色 */
    margin: 20px 0 10px;
    font-size: 1.1rem;
}

/* ========== 代码块样式 ========== */
pre {
    /* 保持深色代码块以保证代码可读性 */
    background: #2d2d2d; 
    color: #f8f8f2;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9rem;
    margin: 15px 0;
    line-height: 1.4;
}

code {
    font-family: 'Consolas', 'Monaco', monospace;
}

.code-title {
    color: #388E3C; /* 深绿色 */
    margin: 20px 0 8px;
    font-size: 1.05rem;
}

/* ========== 专用样式 (内联样式) ========== */
.role-section {
    background-color: #F1F8E9; /* 极浅绿色背景 */
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    border-left: 4px solid #4CAF50; /* 主绿色 */
}

.role-title {
    color: #FFC107; /* 辅色：琥珀/黄 */
    font-size: 1.4rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.role-title i {
    margin-right: 10px;
    font-size: 1.3rem;
}

.requirement-list {
    margin-left: 20px;
    margin-bottom: 15px;
}

.requirement-item {
    margin-bottom: 10px;
    padding-left: 10px;
}

.highlight-box {
    background-color: #F1F8E9; /* 极浅绿色背景 */
    border: 1px solid #E8F5E9; /* 浅绿色边框 */
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.restriction-box {
    /* 保持警告色不变，以保持对比和警示效果 */
    background-color: #FFF5F5; /* 浅红色（警告色） */
    border: 1px solid #FFCCCC; /* 浅红色边框 */
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.occupation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.occupation-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #FFC107; /* 辅色：琥珀/黄 */
}

.occupation-name {
    font-weight: bold;
    color: #FFC107; /* 辅色：琥珀/黄 */
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.occupation-code {
    color: #388E3C; /* 深绿色 */
    font-family: 'Consolas', monospace;
    background-color: #F1F8E9; /* 极浅绿色背景 */
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}

.summary-card {
    /* 浅绿渐变背景 */
    background: linear-gradient(135deg, #E8F5E9, #F1F8E9);
    padding: 25px;
    border-radius: 10px;
    margin: 30px 0;
    border: 2px solid #4CAF50; /* 主绿色边框 */
}

.section-divider {
    height: 2px;
    /* 绿色渐变 */
    background: linear-gradient(to right, #4CAF50, #388E3C);
    margin: 30px 0;
    border-radius: 1px;
}


.container-auto-height {
    padding: 20px;                 /* 保留原有内边距（可根据需要调整） */
    height: auto !important;       /* 高度完全由内容决定 */
    min-height: unset !important;  /* 移除任何最小高度限制 */
    display: block;
    overflow: hidden;              /* 防止子元素溢出撑高 */
}

/* 重置内部常见元素的默认外边距，避免意外撑高容器 */
.container-auto-height h1,
.container-auto-height h2,
.container-auto-height h3,
.container-auto-height h4,
.container-auto-height h5,
.container-auto-height h6,
.container-auto-height p {
    margin: 0 0 10px 0;            /* 只保留底部间距，可根据需要调整为 0 */
}

.container-auto-height p:last-child,
.container-auto-height h1:last-child,
.container-auto-height h2:last-child,
.container-auto-height h3:last-child {
    margin-bottom: 0;              /* 最后一个元素无底部外边距 */
}

/* 可选：完全无内边距版本（高度 = 纯文字高度） */
.container-tight-text {
    padding: 0 !important;
    margin: 0 auto;
    max-width: 1200px;
    line-height: 1.6;
    text-align: center;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .specs-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }

    .occupation-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }

    .role-title {
        font-size: 1.2rem;
    }
}