.benchmark-table {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    line-height: 1.6; /* 增加整体可读性 */
}

.benchmark-table thead {
    background-color: #f0f4f8;
    border-bottom: 2px solid #e2e8f0;
}

.benchmark-table th {
    padding: 15px 20px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #2d3748;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
}

.benchmark-table th:hover {
    background-color: #edf2f7 !important;
}

.benchmark-table th .sort-icon {
    margin-left: 8px;
    display: inline-block;
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
}

.benchmark-table th.sortable .sort-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 11l5-5 5 5M7 17l5 5 5-5'/%3E%3C/svg%3E");
}

.benchmark-table th.sorted-asc .sort-icon,
.benchmark-table th.sorted-desc .sort-icon {
    opacity: 1;
}

.benchmark-table th.sorted-asc .sort-icon {
    transform: rotate(180deg);
}

.benchmark-table th.sorted-desc .sort-icon {
    transform: rotate(0deg);
}

.benchmark-table th.sorted-asc,
.benchmark-table th.sorted-desc {
    background-color: #e6f2ff;
    color: #2c5282;
}

.benchmark-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #edf2f7;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.benchmark-table tbody tr {
    transition: background-color 0.3s ease;
}

.benchmark-table tbody tr:hover {
    background-color: #f3f4f6 !important;
}

.benchmark-table tbody tr.selected {
    background-color: #e6f2ff !important;
}

.benchmark-table tbody tr:nth-child(even) {
    background-color: #f7fafc;
}

.benchmark-table .sorted-column {
    background-color: #f0f5ff;
}

.highlight-link {
    color: #007bff; /* 默认文字颜色 */
    font-weight: bold; /* 加粗文本 */
    text-decoration: none; /* 去掉下划线 */
    transition: transform 0.3s ease, font-size 0.3s ease; /* 设置放大效果和字体大小过渡 */
}

.highlight-link:hover {
    transform: scale(1.2); /* 鼠标悬停时放大 */
    font-size: 1.2em; /* 也可以增加字体大小，配合放大效果 */
    color: #e64a19; /* 悬停时改变颜色 */
}

/* 响应式设计 */
.benchmark-container {
    padding: 1rem;
}

/* 桌面端表格样式 */
@media (min-width: 1024px) {
    .mobile-cards {
        display: none;
    }
}

/* 移动端卡片样式 */
@media (max-width: 1023px) {
    .benchmark-table {
        display: none;
    }

    .model-card {
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        margin-bottom: 1rem;
        padding: 1rem;
    }

    .model-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid #eee;
    }

    .model-name {
        font-size: 1.1rem;
        font-weight: bold;
        color: #2d3748;
    }

    .model-metrics {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .metric-item {
        background: #f8fafc;
        padding: 0.8rem;
        border-radius: 6px;
    }

    .metric-label {
        font-size: 0.9rem;
        color: #64748b;
        margin-bottom: 0.3rem;
    }

    .metric-value {
        font-size: 1.1rem;
        font-weight: 500;
        color: #1a202c;
    }

    .metric-details {
        display: none;
        margin-top: 1rem;
    }

    .metric-details.show {
        display: block;
    }

    .toggle-details-container {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #eee;
    }

    .toggle-details {
        background: #e2e8f0;
        border: none;
        padding: 0.5rem 1rem;
        border-radius: 4px;
        width: 100%;
        text-align: center;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

    .toggle-details:hover {
        background: #cbd5e0;
    }
}

/* 共享样式 */
.sortable {
    cursor: pointer;
    position: relative;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

.info-icon:hover {
    text-decoration: none;
}

/* 确保图标不会影响排序点击区域 */
.sort-icon {
    margin-left: 4px;
}

/* 调整表头布局 */
.sortable > div {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.filter-group {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    position: relative;
}

.left-section {
    flex: 0 0 120px;
    min-width: 0;
    padding: 8px 0;
}

.filter-label {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 36px; /* 与复选框高度对齐 */
}

.checkbox-row {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* 保留原有复选框样式 */
.checkbox-item {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    height: 36px;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.checkbox-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 修改复选框样式，确保勾号居中 */
.checkbox-item input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #1a73e8;
    border-radius: 4px;
    margin-right: 8px;
    transition: all 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* 确保后代元素的定位基于复选框 */
}

/* 当复选框被选中时，确保勾号居中 */
.checkbox-item input[type="checkbox"]:checked {
    background: #1a73e8;
}

/* 修改勾号的样式，确保它在复选框中正确显示 */
.checkbox-item input[type="checkbox"]:checked::after {
    content: "✓";
    color: white; /* 勾号颜色设置为白色 */
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* 将勾号准确居中 */
}

/* 保持加号按钮原有样式 */
.show-more {
    width: 36px;
    height: 36px;
    margin-bottom: 0.5rem;
    border: 2px dashed #ced4da;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.2s;
    flex-shrink: 0;
}

.show-more:hover {
    border-color: #1a73e8;
    color: #1a73e8;
    transform: translateY(-1px);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .filter-group {
        flex-direction: column;
        gap: 8px;
    }

    .left-section {
        width: 100%;
        flex: none;
    }

    .filter-label {
        line-height: 1.2;
    }

    .checkbox-item {
        height: auto;
        min-height: 36px;
    }
}

/* 模态框样式 */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    width: 60%;
    max-width: 800px;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.modal-header {
    text-align: center;
    margin-bottom: 15px;
}

.modal-body {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.modal-footer {
    text-align: right;
}

.section {
    margin-bottom: 15px;
}

.selection-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* 自适应列数 */
    gap: 10px;
    margin-top: 10px;
}

.selection-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
}

.selection-item:hover {
    background: #f1f1f1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.selection-item input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
}

/* 按钮样式 */
button {
    padding: 8px 16px;
    margin: 0 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
}

button:hover {
    background-color: #0056b3;
}

/* 优化模态框样式与主页面统一 */
#addBenchmarkModal .modal-content .modal-body {
    max-height: 60vh;  /* 设置最大高度为视口的60% */
    overflow-y: auto;  /* 启用垂直滚动 */
    padding: 10px;  /* 可以根据需要调整内边距 */
}

#addBenchmarkModal .modal-content .modal-header h2 {
    font-size: 1.25rem;  /* 调整标题大小 */
    margin-bottom: 10px;  /* 调整标题与内容之间的间距 */
}

#addBenchmarkModal .modal-content .section {
    margin-bottom: 1rem;  /* 减小每个部分之间的间距 */
}

#addBenchmarkModal .modal-footer {
    padding: 10px;  /* 调整底部按钮区域的内边距 */
    display: flex;
    justify-content: space-between;  /* 使按钮分布在两端 */
}

/* 搜索框样式 - 确保在所有样式之后 */
.search-box {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 16px;
    width: 100%;
    box-sizing: border-box;
}
.best-score {
    background-color: rgba(52, 152, 219, 0.1);
    font-weight: bold;
}

#mobile-benchmark-container .show-more{
    width: 100%;
}