body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
}

.import-section {
    margin-bottom: 20px;
    /* display: flex; */
    gap: 10px;
}

.filter-section {
    margin-bottom: 20px;
}

.filter-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.select-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    min-width: 150px;
}

input {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    min-width: 50px;
}

button {
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

.table-container {
    overflow-x: auto;
}

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

th, td {
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    padding: 6px;
    background-color: #f2f2f2;
    font-weight: bold;
}

tr:hover {
    background-color: #f5f5f5;
}

.analysis-result {
    margin-top: 15px;
    padding: 15px;
    background-color: #e8f4f8;
    border-radius: 4px;
    display: none;
}

.analysis-result.show {
    display: block;
}

.analysis-result.warning {
    background-color: lemonchiffon;
}

td > span {
    padding: 6px;
    display: block;
}

.highlighted {
    background-color: lightcyan;
}

.winner {
    background-color: #ffe262;
    color: rgb(255, 149, 0);
}

.middle-score {
    background-color: lightpink;
    color: rgb(247, 0, 37);
}

.high-score {
    background-color: lightcoral;
    color: rgb(255, 255, 255);
}

.disadvantage1 {
    color: darkorange;
}

.disadvantage2 {
    color: deepskyblue;
}

.disadvantage3 {
    color: deeppink;
}

input.disadvantage1 {
    border: 1px solid darkorange;
}

input.disadvantage2 {
    border: 1px solid deepskyblue;
}

input.disadvantage3 {
    border: 1px solid deeppink;
}

/* 容器基础样式 */
.collapsible-container {
    border: 1px solid #ccc;
    margin: 20px;
    overflow: hidden;
    /* 防止外容器因内容溢出而改变大小（主要针对max-height的过渡） */
    border-radius: 5px;
    position: relative;
}

/* 头部样式 */
.collapsible-header {
    background-color: #f1f1f1;
    padding: 10px 15px;
    cursor: pointer;
    /* 鼠标悬停时显示手形图标 */
    user-select: none;
    /* 防止选中头部文本 */
    display: flex;
    /* 使标题和箭头对齐 */
    justify-content: space-between;
    /* 标题和箭头分列两侧 */
    align-items: center;
    /* 垂直居中 */
    font-weight: bold;
}

/* 头部箭头样式 */
.collapsible-header .arrow {
    display: inline-block;
    margin-left: 10px;
    transition: transform 0.3s ease;
    /* 箭头旋转过渡 */
}

/* 内容区域样式 */
.collapsible-content {
    padding: 0 15px;
    /* 默认无内边距，展开后才显示 */
    overflow: hidden;
    /* 隐藏超出固定高度的内容 */
    /* 使用 max-height 进行过渡，比直接过渡 height 更可靠 */
    max-height: 0;
    /* 初始状态（折叠时）最大高度为0 */
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    /* 高度和内边距过渡 */
    background-color: #fff;
}

/* 折叠状态样式（通过JS添加到容器） */
.collapsible-container.collapsed .collapsible-content {
    /* ---- 固定高度设置在这里 ---- */
    max-height: 500px;
    height: 400px;
    /* 设置折叠时的固定高度 */
    /* --------------------------- */
    padding: 10px 15px;
    /* 折叠时显示内容时，添加内边距 */
    /* overflow: hidden; /* 确保折叠时内容被隐藏，虽然默认就有，但在这里再强调一下 */
}

/* 折叠状态下的箭头旋转 */
.collapsible-container.collapsed .collapsible-header .arrow {
    transform: rotate(180deg);
    /* 箭头向下 */
}

/* 展开状态下的箭头旋转 */
.collapsible-container:not(.collapsed) .collapsible-header .arrow {
    transform: rotate(0deg);
    /* 箭头向上 (或保持原样) */
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 10px;
    }

    .import-section,
    .filter-section,
    .table-container {
        width: 100%;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .select-group {
        margin-bottom: 10px;
    }
}
