/**
 * 多学科分析 - 重点学生关注板块
 * 教育类专业风格，与单科分析主界面色彩保持一致
 */

/* ===== 主容器 ===== */
#multi-subject-key-students-container {
    background: var(--card-background);
    border-radius: 16px;
    box-shadow: none;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: none;
}

#multi-subject-key-students-container:hover {
    box-shadow: none;
}

/* ===== 卡片头部 ===== */
#multi-subject-key-students-container .card-header {
    background: linear-gradient(135deg, rgba(78, 91, 240, 0.05) 0%, rgba(84, 160, 255, 0.03) 100%);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

#multi-subject-key-students-container .card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}

#multi-subject-key-students-container .card-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* ===== 过滤按钮组 ===== */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0 !important;
}

.filter-buttons .button {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: 1.5px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.filter-buttons .button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.filter-buttons .button:hover::before {
    left: 100%;
}

/* 全部学生按钮 - 主色 */
.filter-buttons .button[data-filter="all"] {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(78, 91, 240, 0.25);
}

.filter-buttons .button[data-filter="all"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(78, 91, 240, 0.35);
}

.filter-buttons .button[data-filter="all"]:active {
    transform: translateY(0);
}

/* 全面优秀按钮 - 成功色 */
.filter-buttons .button[data-filter="allRounders"] {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.1) 0%, rgba(85, 239, 196, 0.08) 100%);
    color: #00B894;
    border-color: rgba(0, 184, 148, 0.2);
}

.filter-buttons .button[data-filter="allRounders"]:hover {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.15) 0%, rgba(85, 239, 196, 0.12) 100%);
    border-color: rgba(0, 184, 148, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.15);
}

/* 单科突出按钮 - 信息色 */
.filter-buttons .button[data-filter="singleSubjectStars"] {
    background: linear-gradient(135deg, rgba(78, 91, 240, 0.1) 0%, rgba(84, 160, 255, 0.08) 100%);
    color: var(--primary-color);
    border-color: rgba(78, 91, 240, 0.2);
}

.filter-buttons .button[data-filter="singleSubjectStars"]:hover {
    background: linear-gradient(135deg, rgba(78, 91, 240, 0.15) 0%, rgba(84, 160, 255, 0.12) 100%);
    border-color: rgba(78, 91, 240, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(78, 91, 240, 0.15);
}

/* 需要帮助按钮 - 警告色 */
.filter-buttons .button[data-filter="needsHelp"] {
    background: linear-gradient(135deg, rgba(255, 118, 117, 0.1) 0%, rgba(255, 107, 107, 0.08) 100%);
    color: #FF7675;
    border-color: rgba(255, 118, 117, 0.2);
}

.filter-buttons .button[data-filter="needsHelp"]:hover {
    background: linear-gradient(135deg, rgba(255, 118, 117, 0.15) 0%, rgba(255, 107, 107, 0.12) 100%);
    border-color: rgba(255, 118, 117, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 118, 117, 0.15);
}

/* 激活状态 */
.filter-buttons .button.active {
    font-weight: 700;
    transform: scale(1.02);
}

.filter-buttons .button[data-filter="all"].active {
    box-shadow: 0 4px 16px rgba(78, 91, 240, 0.4);
}

.filter-buttons .button[data-filter="allRounders"].active {
    background: linear-gradient(135deg, #00B894 0%, #1DD1A1 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

.filter-buttons .button[data-filter="singleSubjectStars"].active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(78, 91, 240, 0.3);
}

.filter-buttons .button[data-filter="needsHelp"].active {
    background: linear-gradient(135deg, #FF7675 0%, #FF6B6B 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(255, 118, 117, 0.3);
}

/* ===== 卡片主体 ===== */
#multi-subject-key-students-container .card-body {
    padding: 24px;
    background: var(--background-color);
}

/* ===== 网格布局 ===== */
.progress-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    padding: 0;
}

/* ===== 学生分类列 ===== */
.key-student-column {
    background: var(--card-background);
    border-radius: 12px;
    padding: 20px;
    box-shadow: none;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.key-student-column::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.key-student-column:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(78, 91, 240, 0.2);
}

.key-student-column:hover::before {
    opacity: 1;
}

/* 全面优秀列 */
.excellent-students {
    border-left: 4px solid #00B894;
}

.excellent-students::before {
    background: linear-gradient(90deg, #00B894 0%, #1DD1A1 100%);
}

.excellent-students h4 {
    color: #00B894;
    border-color: rgba(0, 184, 148, 0.2);
}

/* 单科突出列 */
.potential-students {
    border-left: 4px solid var(--primary-color);
}

.potential-students::before {
    background: var(--gradient-primary);
}

.potential-students h4 {
    color: var(--primary-color);
    border-color: rgba(78, 91, 240, 0.2);
}

/* 需要帮助列 */
.attention-students {
    border-left: 4px solid #FF7675;
}

.attention-students::before {
    background: linear-gradient(90deg, #FF7675 0%, #FF6B6B 100%);
}

.attention-students h4 {
    color: #FF7675;
    border-color: rgba(255, 118, 117, 0.2);
}

/* ===== 列标题 ===== */
.key-student-column h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
}

.key-student-column h4 i {
    font-size: 18px;
    font-style: normal;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(78, 91, 240, 0.1);
    color: var(--primary-color);
}

.excellent-students h4 i {
    background: rgba(0, 184, 148, 0.1);
    color: #00B894;
}

.potential-students h4 i {
    background: rgba(78, 91, 240, 0.1);
    color: var(--primary-color);
}

.attention-students h4 i {
    background: rgba(255, 118, 117, 0.1);
    color: #FF7675;
}

.student-count {
    margin-left: auto;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--background-color);
    padding: 4px 10px;
    border-radius: 12px;
}

/* ===== 列描述 ===== */
.column-description {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 16px 0;
    padding: 12px;
    background: var(--background-color);
    border-radius: 8px;
    border-left: 3px solid var(--border-color);
}

/* ===== 学生列表 ===== */
.key-student-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== 学生项 ===== */
.key-student-item {
    background: var(--card-background);
    border-radius: 10px;
    padding: 16px;
    box-shadow: none;
    border: 1px solid var(--border-color);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.key-student-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.2s;
}

.key-student-item:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(78, 91, 240, 0.3);
}

.key-student-item:hover::before {
    opacity: 1;
}

.excellent-students .key-student-item::before {
    background: linear-gradient(180deg, #00B894 0%, #1DD1A1 100%);
}

.potential-students .key-student-item::before {
    background: var(--gradient-primary);
}

.attention-students .key-student-item::before {
    background: linear-gradient(180deg, #FF7675 0%, #FF6B6B 100%);
}

/* ===== 学生头部信息 ===== */
.key-student-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.key-student-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.key-student-id {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--background-color);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
}

/* ===== 学生详情 ===== */
.key-student-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-bottom: 12px;
    background: var(--background-color);
    border-radius: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    font-weight: 700;
    color: var(--text-primary);
}

/* ===== 学科标签 ===== */
.subject-tags {
    margin-bottom: 0;
}

.subject-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.subject-tag {
    display: inline-block;
    padding: 6px 12px;
    margin: 4px 4px 4px 0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: var(--background-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.subject-tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(78, 91, 240, 0.2);
}

/* ===== 空状态 ===== */
.key-student-column:empty::after {
    content: '暂无学生数据';
    display: block;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 40px 20px;
    font-style: italic;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .progress-analysis-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .filter-buttons {
        flex-direction: column;
    }
    
    .filter-buttons .button {
        width: 100%;
        justify-content: center;
    }
    
    #multi-subject-key-students-container .card-header {
        padding: 16px;
    }
    
    #multi-subject-key-students-container .card-body {
        padding: 16px;
    }
}

/* ===== 动画增强 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.key-student-column {
    animation: fadeInUp 0.4s ease-out;
}

.key-student-item {
    animation: fadeInUp 0.3s ease-out;
}

.key-student-item:nth-child(1) { animation-delay: 0.05s; }
.key-student-item:nth-child(2) { animation-delay: 0.1s; }
.key-student-item:nth-child(3) { animation-delay: 0.15s; }
.key-student-item:nth-child(4) { animation-delay: 0.2s; }
.key-student-item:nth-child(5) { animation-delay: 0.25s; }

