/* 手机端样式 */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 14px;
    }

    .container {
        width: 100%; /* 容器占满屏幕宽度 */
        padding: 20px; /* 减少内边距 */
        box-shadow: none; /* 去除盒子阴影，简化视觉 */
    }

    .header h1 {
        font-size: 1.2em; /* 调整标题大小 */
    }

    .researcher-level {
        font-size: 12px; /* 减小研究员等级显示字体 */
        padding: 3px 6px;
    }

    .section {
        padding: 10px;
    }

    table {
        font-size: 12px; /* 减小表格字体 */
    }

    /* 表格添加滚动支持 */
    table {
        display: block; /* 将表格容器化 */
        overflow-x: auto; /* 启用水平滚动 */
        white-space: nowrap; /* 保证表格内容不换行 */
    }

    .logout-button-container {
        flex-direction: column; /* 按钮纵向排列 */
        gap: 5px; /* 减少按钮间距 */
        right: 10px; /* 按钮距离右侧边距 */
        top: 10px; /* 按钮距离顶部边距 */
    }

    a.logout {
        font-size: 12px; /* 调整按钮字体大小 */
        padding: 8px 10px; /* 减小按钮的内边距 */
    }

    .progress-container {
        height: 15px; /* 减小进度条高度 */
    }

    .progress-text {
        font-size: 12px; /* 调整进度条文字大小 */
    }
}

body {
    font-family: 'Courier New', Courier, monospace;
    background-color: #F5F5DC;
    margin: 0;
    padding: 20px;
    color: #000;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border: 1px solid #000;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.2);
}

.header {
    border-bottom: 2px solid #000;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.amb-logo {
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 20px;
}

.warning-box {
    background-color: #FFD700;
    border: 2px solid #000;
    padding: 10px;
    margin: 20px 0;
    text-align: center;
    font-weight: bold;
}

.section {
    margin: 20px 0;
    padding: 10px;
    border: 1px solid #ccc;
}

.section-title {
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.redacted {
    background-color: #000;
    color: #000;
    user-select: none;
}

.redacted:hover {
    color: white;
}

.project-level {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: bold;
    margin: 2px;
    border: 1px solid #000;
}

/* 威胁等级（数字）背景色 */
.numeric-0 { background-color: #E8F5E9; }
.numeric-1 { background-color: #C8E6C9; }
.numeric-2 { background-color: #FFECB3; }
.numeric-3 { background-color: #FFB74D; }
.numeric-4 { background-color: #FF7043; }
.numeric-5 { background-color: #D32F2F; color: white; }

/* 应对等级（字母）边框色 */
.letter-E, .letter-D, .letter-C, .letter-B, .letter-A, .letter-S {
    border-left: 4px solid;
}
.letter-E { border-color: #A5D6A7; }
.letter-D { border-color: #81C784; }
.letter-C { border-color: #4CAF50; }
.letter-B { border-color: #388E3C; }
.letter-A { border-color: #1B5E20; }
.letter-S { border-color: #B71C1C; }

.progress-container {
    width: 100%;
    background-color: #f0f0f0;
    border: 1px solid #000;
    position: relative;
    height: 20px;
    margin: 10px 0;
}

.progress-bar {
    height: 100%;
    background-color: #4CAF50;
    width: 0;
    transition: width 0.5s ease-in-out;
}

.progress-text {
    position: absolute;
    width: 100%;
    text-align: center;
    line-height: 20px;
    color: black;
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: difference;
}

.researcher-level {
    display: inline-block;
    padding: 5px 10px;
    background-color: #4CAF50;
    color: white;
    border-radius: 5px;
    margin: 5px 0;
}

.experience-info {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

th, td {
    border: 1px solid #000;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #e6e6e6;
}

.footer {
    margin-top: 30px;
    padding-top: 10px;
    border-top: 2px solid #000;
    font-size: 0.8em;
    text-align: center;
}

.logout-button-container, .nav-bar {
    position: fixed;
    top: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.logout-button-container {
    right: 20px;
}

.nav-bar {
    left: 20px;
}

a.logout, .back-to-profile {
    display: inline-block;
    padding: 10px 20px;
    background-color: #F5F5DC;
    color: #000;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    border: 1px solid #d3d3c0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

a.logout:hover, .back-to-profile:hover {
    background-color: #e0e0c0;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.current-level {
    background-color: rgba(255, 0, 0, 0.1);
    font-weight: bold;
}

.permission-level {
    cursor: help;
    position: relative;
}

.permission-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    transition: opacity 0.3s, visibility 0.3s;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    margin-left: 10px;
    white-space: nowrap;
}

/* 研究员等级颜色 */
.researcher-level-4 { background-color: #E8F5E9; color: #000; } /* 浅绿色 */
.researcher-level-3 { background-color: #C8E6C9; color: #000; } /* 绿色 */
.researcher-level-2 { background-color: #FFB74D; color: #000; } /* 浅橙色 */
.researcher-level-1 { background-color: #D32F2F; color: white; } /* 金红色 */
.researcher-level {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 14px;
}
