/* 认知偏差指南 - 极简风格 */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.bias-main {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: #37352f;
    background-color: #ffffff;
    font-size: 15px;
    font-weight: 400;
}

/* 主容器 - 两栏布局 */
.bias-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 10px;
    gap: 40px;
}

/* ========== 左侧目录 ========== */
.bias-sidebar {
    flex-shrink: 0;
    width: 280px;
}

.bias-nav {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.nav-title {
    font-size: 18px;
    font-weight: 600;
    color: #37352f;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e3e2e0;
}

.nav-category {
    margin-bottom: 24px;
}

.nav-category-title {
    font-size: 13px;
    font-weight: 600;
    color: #7c7c7c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 8px;
}

.nav-item {
    display: block;
    padding: 6px 0;
    color: #37352f;
    text-decoration: none;
    font-size: 14px;
    border-left: 2px solid transparent;
    padding-left: 12px;
    transition: all 0.15s ease;
}

.nav-item:hover {
    color: #00965e;
    border-left-color: #00965e;
}

.nav-item.active {
    color: #00965e;
    border-left-color: #00965e;
    font-weight: 500;
}

/* ========== 右侧内容 ========== */
.bias-content {
    flex: 1;
    min-width: 0;
    max-width: 780px;
}

/* 章节区域 */
.bias-section {
    margin-bottom: 60px;
}

.section-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e3e2e0;
}

.section-title {
    font-size: 32px;
    font-weight: 600;
    color: #37352f;
    margin-bottom: 12px;
    line-height: 1.2;
}

.section-intro {
    font-size: 16px;
    color: #7c7c7c;
    line-height: 1.6;
}

/* 偏差项目 */
.bias-item {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f3f2f0;
}

.bias-item:last-child {
    border-bottom: none;
}

.bias-title {
    font-size: 22px;
    font-weight: 600;
    color: #37352f;
    margin-bottom: 12px;
    line-height: 1.3;
}

.bias-title-en {
    font-size: 15px;
    font-weight: 400;
    color: #7c7c7c;
    margin-left: 10px;
    font-style: italic;
}

/* 偏差图片 */
.bias-image {
    margin: 20px 0;
    text-align: center;
}

.bias-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* 偏差描述 */
.bias-description {
    font-size: 16px;
    line-height: 1.7;
    color: #37352f;
    margin-bottom: 16px;
}

/* 示例 */
.bias-example {
    background: #f7f6f3;
    padding: 16px 20px;
    border-radius: 4px;
    font-size: 15px;
    line-height: 1.6;
    color: #37352f;
}

.bias-example strong {
    color: #00965e;
    font-weight: 600;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .bias-container {
        gap: 30px;
    }

    .bias-sidebar {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .bias-container {
        flex-direction: column;
        padding: 30px 15px;
    }

    .bias-sidebar {
        width: 100%;
    }

    .bias-nav {
        position: static;
        max-height: none;
    }

    .bias-content {
        max-width: 100%;
    }

    .section-title {
        font-size: 26px;
    }

    .bias-title {
        font-size: 19px;
    }

    .bias-title-en {
        display: block;
        margin-left: 0;
        margin-top: 4px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .bias-container {
        padding: 20px 15px;
    }

    .section-title {
        font-size: 22px;
    }

    .section-intro {
        font-size: 15px;
    }

    .bias-title {
        font-size: 18px;
    }

    .bias-description {
        font-size: 15px;
    }

    .bias-example {
        font-size: 14px;
        padding: 14px 16px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        left: auto;
        width: 45px;
        height: 45px;
    }
}

/* ========== 滚动条美化 ========== */
.bias-nav::-webkit-scrollbar {
    width: 4px;
}

.bias-nav::-webkit-scrollbar-track {
    background: transparent;
}

.bias-nav::-webkit-scrollbar-thumb {
    background: #d3d3d3;
    border-radius: 2px;
}

.bias-nav::-webkit-scrollbar-thumb:hover {
    background: #b3b3b3;
}

/* ========== 平滑滚动 ========== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* ========== 打印样式 ========== */

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 40px;
    /* 计算位置：容器右边缘再向右偏移，避免遮挡内容 */
    left: calc(50% + 540px);
    width: 50px;
    height: 50px;
    background: #00965e;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 150, 94, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #007a4c;
    box-shadow: 0 6px 16px rgba(0, 150, 94, 0.4);
    transform: translateY(-2px);
}

.back-to-top:active {
    transform: translateY(0);
}

@media print {
    .bias-sidebar {
        display: none;
    }

    .bias-container {
        max-width: 100%;
    }

    .bias-item {
        page-break-inside: avoid;
    }
}
