/* 基础样式 */
body {
    margin: 0;
    padding-top: 100px; /* 为固定的header留出空间 */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.main-content {
    flex: 1;
    padding: 20px 40px;
}

.sidebar {
    width: 280px;
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    border-left: 1px solid #dee2e6;
}

/* 标题样式 */
.document-title {
    text-align: center;
    margin-bottom: 2em;
}

.section-title {
    color: #2c3e50;
    font-size: 1.6em;
    margin: 1.5em 0 1em;
    padding: 10px;
    background: #f8f9fa;
    border-left: 4px solid #3498db;
}

.sub-section {
    margin: 1em 0;
    padding-left: 1em;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f5f5f5;
}

/* 导航样式 */
.nav-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 1em;
}

.nav-list {
    list-style: none;
    padding: 0;
}

.nav-item {
    margin-bottom: 0.5em;
}

.nav-link {
    color: #666;
    text-decoration: none;
    display: block;
    padding: 5px 0;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #3498db;
}

/* 数据项样式 */
.data-item {
    margin: 0.5em 0;
}

.data-label {
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 10px;
    }

    .sidebar {
        width: 100%;
        position: static;
        height: auto;
        border-left: none;
        margin-bottom: 20px;
    }

    .main-content {
        padding: 10px;
    }

    .document-title {
        font-size: 1.5em;
    }
}

/* 添加以下样式 */
html {
    scroll-behavior: smooth; /* 启用平滑滚动 */
}

/* 为每个section添加一些上边距，避免标题被顶部遮挡 */
.sds-section {
    padding-top: 20px;
    scroll-margin-top: 20px; /* 确保滚动到位置时有适当的边距 */
}

/* 添加新的样式 */
.safety-list {
    padding-left: 20px;
    margin: 10px 0;
}

.safety-list li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.properties-table {
    width: 100%;
    border-collapse: collapse;
}

.properties-table td {
    padding: 10px;
    border: 1px solid #ddd;
}

.property-label {
    font-weight: bold;
    background-color: #f5f5f5;
    width: 40%;
}

.protection-details p {
    margin: 10px 0;
}

.exposure-limits {
    width: 100%;
    margin: 15px 0;
}

.exposure-limits th {
    background-color: #f5f5f5;
    font-weight: bold;
    text-align: center;
}

/* 为毒理学资料部分添加特殊样式 */
.toxicology-data .data-item {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.toxicology-data .data-item:last-child {
    border-bottom: none;
}

/* 为生态学资料添加样式 */
#section12 .data-item {
    background-color: #f9f9f9;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
}

#section12 .data-label {
    color: #2c3e50;
    font-weight: 600;
}

/* 为稳定性和反应活性部分添加样式 */
#section10 .data-item {
    margin: 12px 0;
    padding: 8px;
    border-left: 3px solid #3498db;
    background-color: #f8f9fa;
}

/* 运输信息样式 */
.transport-precautions {
    list-style-type: none;
    padding-left: 0;
}

.transport-precautions li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.transport-precautions li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #3498db;
}

/* 法规信息样式 */
.regulation-item {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.regulation-item h4 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 10px;
}

/* 缩略语样式 */
.abbreviations p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.abbreviations strong {
    color: #2c3e50;
}

/* 免责声明样式 */
#section16 .data-item:nth-last-child(2) {
    background-color: #fff8f8;
    padding: 15px;
    border-left: 4px solid #e74c3c;
    margin: 15px 0;
}

/* 添加注意事项相关样式 */
.notice-section {
    background-color: #f8f9fa;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.notice-title {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.notice-list {
    margin: 0;
    padding-left: 20px;
}

.notice-list li {
    margin-bottom: 12px;
    line-height: 1.6;
    color: #495057;
}

.section-divider {
    margin: 30px 0;
    border: 0;
    border-top: 1px solid #dee2e6;
}

/* 下载按钮样式 */
.download-button {
    width: 100%;
    padding: 10px;
    margin-top: 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.download-button:hover {
    background-color: #2980b9;
}

/* 支付弹窗样式 */
.payment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.payment-modal.show {
    display: flex;
}

.payment-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    max-width: 300px;
    width: 90%;
}

.payment-qrcode {
    width: 200px;
    height: 200px;
    margin: 20px auto;
    background-color: #f5f5f5;
}

.payment-content h3 {
    margin-bottom: 15px;
    color: #333;
}

.payment-content p {
    margin: 10px 0;
    color: #666;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #fff;
}

/* 左侧固定服务介绍栏样式 */
.floating-services {
    position: fixed;
    left: 20px;
    top: calc(50% + 60px);
    transform: translateY(-50%);
    width: 280px;
    z-index: 100;
    display: none;
}

.floating-service-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

a.floating-service-card {
    display: block;
    text-decoration: none;
    color: inherit;
    /* 继承父级颜色，防止a标签变蓝 */
    cursor: pointer;
}

.floating-service-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.floating-service-card h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.floating-service-card i {
    color: #3498db;
}

.floating-service-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.floating-service-card .price {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* 新增微信卡片样式 */
.floating-service-card.wechat-card {
    text-align: center;
    margin-top: 20px;
}

.floating-service-card.wechat-card h3 {
    justify-content: center;
    color: #07C160;
}

.floating-service-card.wechat-card img {
    width: 180px;
    height: 180px;
    margin: 10px auto;
    display: block;
}

.floating-service-card.wechat-card p {
    text-align: center;
    color: #666;
    margin: 10px 0;
}


/* 参考文献专业版式样式 */
.sds-reference-list {
    margin: 10px 0 15px 25px;
    padding-left: 0;
    line-height: 1.8;
}

.sds-reference-list li {
    margin-bottom: 8px;
    color: #333;
}

.sds-reference-list .ref-link {
    color: #1e6bb8;
    text-decoration: none;
    font-weight: 500;
}

.sds-reference-list .ref-link:hover {
    text-decoration: underline;
    color: #0c4b8e;
}

.sds-reference-list .ref-url {
    color: #7f8c8d;
    font-size: 0.88em;
    word-break: break-all;
    margin-left: 6px;
}

.sds-reference-list .ref-title {
    color: #2c3e50;
    font-weight: 500;
}
