/* 新的布局样式 */
.detail-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eaeaea;
    position: relative;
    font-weight: 600;
}

.detail-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #4a6cf7, #8c9eff);
    border-radius: 3px;
}

.score-info-row {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    padding: 1.8rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(74, 108, 247, 0.1);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    align-items: center;
    text-align: center;
}

.score-info-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(to bottom, #4a6cf7, #8c9eff);
    border-radius: 3px 0 0 3px;
}

.basic-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 0.8rem;
    background-color: rgba(74, 108, 247, 0.05);
    border-radius: 10px;
    justify-content: center;
}

.basic-info div {
    display: inline-flex;
    align-items: center;
}

.basic-info strong {
    color: #2c3e50;
    margin-right: 6px;
}

.score-data {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(74, 108, 247, 0.05);
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    position: relative;
}

.score-item strong {
    color: #2c3e50;
}

.score-item .rank-badge {
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .basic-info {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
        text-align: center;
    }
    
    .score-data {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
    }
    
    .score-item {
        justify-content: center;
    }
}

/* 更新排名和进度条显示相关样式 */
.student-info h4, .score-summary h4 {
    margin-top: 0;
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    color: #2c3e50;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 0.7rem;
}

.student-info h4 i, .score-summary h4 i {
    margin-right: 8px;
    color: #4a6cf7;
}

.subjects-detail h4 i, .chart-container h4 i {
    margin-right: 8px;
    color: #4a6cf7;
}

.rank-info {
    margin-bottom: 1.2rem !important;
}

.rank-display {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: rgba(74, 108, 247, 0.08);
    padding: 5px 10px;
    border-radius: 6px;
}

.rank-number {
    font-weight: 700;
    color: #e74c3c;
    font-size: 1.1rem;
}

.rank-separator {
    color: #7f8c8d;
}

.total-number {
    color: #7f8c8d;
}

.rank-badge {
    margin-left: 8px;
    padding: 3px 8px;
    border-radius: 10px;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

.rank-progress-container {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
}

.rank-progress-label {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 5px;
    text-align: center;
}

.rank-progress-bar {
    height: 6px;
    background-color: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    max-width: 80%;
    margin: 0 auto;
}

.rank-progress {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-in-out;
}

/* 美化科目卡片 - 使用更通用的方法确保居中 */
.subject-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
    gap: 1.5rem;
    margin-top: 1.5rem;
    justify-content: center;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/* 优化特定数量科目卡片的显示 - 备选方案 */
/* 当只有两个科目卡片时 */
.subject-cards.two-cards {
    grid-template-columns: repeat(2, minmax(220px, 300px));
    max-width: 650px;
}

/* 当有三个科目卡片时 */
.subject-cards.three-cards {
    grid-template-columns: repeat(3, minmax(220px, 280px));
    max-width: 900px;
}

/* 单科目卡片居中显示 */
.single-subject .subject-cards {
    grid-template-columns: minmax(220px, 320px);
    justify-content: center;
}

/* 单科目模式下的卡片增强样式 */
.single-subject .subject-card {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    transform: scale(1.05);
}

.single-subject .subject-card:hover {
    transform: translateY(-5px) scale(1.05);
}

.subject-card {
    background: white;
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.subject-card h5 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #2c3e50;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.subject-card h5 i {
    margin-right: 8px;
    color: #4a6cf7;
    font-size: 0.9rem;
}

.score-info {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.main-score {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.score-diff {
    font-size: 0.9rem;
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.score-diff i {
    font-size: 0.8rem;
}

.score-level {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

.score-stats {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1rem;
    background-color: rgba(248, 249, 250, 0.5);
    padding: 12px;
    border-radius: 8px;
}

.score-stats p {
    display: flex;
    justify-content: space-between;
    margin: 0;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.stat-label {
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-label i {
    color: #4a6cf7;
    font-size: 0.85rem;
}

.stat-value {
    font-weight: 600;
    color: #2c3e50;
}

.rank-progress-mini {
    margin-top: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rank-progress-bar-mini {
    flex: 1;
    height: 5px;
    background-color: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
}

.rank-progress-mini-inner {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-in-out;
}

.rank-percentage {
    font-size: 0.8rem;
    color: #7f8c8d;
    min-width: 36px;
    text-align: right;
}

/* 指标卡片样式 */
.indicators-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2.5rem;
}

.top-row, .bottom-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.8rem;
    justify-content: space-between;
}

.indicator-card {
    flex: 1;
    min-width: 200px;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    align-items: center;
    text-align: center;
}

.indicator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.indicator-icon {
    margin-bottom: 1rem;
    color: #fff;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.indicator-name {
    font-size: 1rem;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 0.5rem;
    text-align: center;
}

.indicator-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin: 0 auto;
}

.indicator-count {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* 指标卡片颜色变体 */
.indicator-highest {
    background: linear-gradient(135deg, rgba(246, 229, 141, 0.1) 0%, rgba(255, 190, 0, 0.1) 100%);
    border-left: 4px solid #ffbe00;
}

.indicator-highest .indicator-icon {
    background-color: #ffbe00;
}

.indicator-average {
    background: linear-gradient(135deg, rgba(145, 213, 255, 0.1) 0%, rgba(29, 161, 242, 0.1) 100%);
    border-left: 4px solid #1da1f2;
}

.indicator-average .indicator-icon {
    background-color: #1da1f2;
}

.indicator-lowest {
    background: linear-gradient(135deg, rgba(255, 177, 153, 0.1) 0%, rgba(241, 95, 95, 0.1) 100%);
    border-left: 4px solid #f15f5f;
}

.indicator-lowest .indicator-icon {
    background-color: #f15f5f;
}

.indicator-excellent {
    background: linear-gradient(135deg, rgba(130, 215, 178, 0.1) 0%, rgba(39, 174, 96, 0.1) 100%);
    border-left: 4px solid #27ae60;
}

.indicator-excellent .indicator-icon {
    background-color: #27ae60;
}

.indicator-good {
    background: linear-gradient(135deg, rgba(160, 217, 250, 0.1) 0%, rgba(74, 108, 247, 0.1) 100%);
    border-left: 4px solid #4a6cf7;
}

.indicator-good .indicator-icon {
    background-color: #4a6cf7;
}

.indicator-pass {
    background: linear-gradient(135deg, rgba(178, 190, 205, 0.1) 0%, rgba(109, 125, 153, 0.1) 100%);
    border-left: 4px solid #6d7d99;
}

.indicator-pass .indicator-icon {
    background-color: #6d7d99;
}

.indicator-fail {
    background: linear-gradient(135deg, rgba(253, 167, 223, 0.1) 0%, rgba(241, 95, 95, 0.1) 100%);
    border-left: 4px solid #f15f5f;
}

.indicator-fail .indicator-icon {
    background-color: #f15f5f;
}

/* 响应式设计调整 */
@media (max-width: 768px) {
    .top-row, .bottom-row {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .indicator-card {
        min-width: auto;
        margin-bottom: 0.5rem;
    }
    
    .indicator-value {
        font-size: 2.2rem;
    }
}

/* 科目标题样式 */
.subject-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    background: linear-gradient(135deg, rgba(74, 108, 247, 0.08) 0%, rgba(138, 168, 248, 0.12) 100%);
    padding: 1rem 1.5rem;
    margin: 0 0 1.5rem 0;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.subject-title i {
    margin-right: 10px;
    color: #4a6cf7;
    font-size: 1.1rem;
}

.subject-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #4a6cf7, #8c9eff);
    border-radius: 4px 0 0 4px;
}

.subject-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 4px;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(74, 108, 247, 0.5), rgba(255, 255, 255, 0));
}

/* 科目标题动画效果 */
@keyframes titleGlow {
    0% {
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
    }
    50% {
        box-shadow: 0 3px 12px rgba(74, 108, 247, 0.15);
    }
    100% {
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
    }
}

.subject-title:hover {
    animation: titleGlow 2s infinite;
}

/* 基础分析容器样式 */
.basic-analysis-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.basic-analysis-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eaeaea;
    position: relative;
}

.basic-analysis-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #4a6cf7, #8c9eff);
    border-radius: 3px;
}

.basic-stat-container {
    margin-bottom: 2.5rem;
    width: 100%;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .subject-title {
        font-size: 1.1rem;
        padding: 0.8rem 1rem;
    }
    
    .subject-title i {
        font-size: 0.9rem;
    }
}

/* 指标卡片样式修改，添加鼠标指针样式表示可点击 */
.indicator-card.clickable {
    cursor: pointer;
    position: relative;
}

.indicator-card.clickable::after {
    content: '点击查看详情';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.5);
    background-color: rgba(255, 255, 255, 0.7);
    padding: 3px 8px;
    border-radius: 4px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* 弹窗样式 */
.student-list-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: auto;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 80%;
    max-width: 700px;
    position: relative;
    animation: slideDown 0.4s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.modal-header h3 .modal-icon {
    margin-right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.close-modal {
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #7f8c8d;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #e74c3c;
}

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

.student-list-table th, 
.student-list-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.student-list-table th {
    background-color: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
}

.student-list-table tr:hover {
    background-color: #f5f9ff;
}

.student-list-table .student-score {
    font-weight: 600;
    text-align: center;
}

.student-list-table .student-rank {
    text-align: center;
    color: #7f8c8d;
}

.empty-list {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
}

/* 弹窗动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 响应式弹窗 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }
    
    .student-list-table th, 
    .student-list-table td {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
}

/* 单科目模式下的主分数和等级增强 */
.single-subject .main-score {
    font-size: 3rem;
}

.single-subject .score-level {
    font-size: 0.85rem;
    padding: 3px 10px;
}

.single-subject .score-stats {
    padding: 15px;
    margin-top: 10px;
    border: 1px solid rgba(74, 108, 247, 0.1);
    background-color: rgba(248, 249, 250, 0.8);
}

.single-subject .rank-progress-mini {
    margin-top: 1.2rem;
}

/* 单科目模式下的图表增强 */
.single-subject #barChartContainer {
    max-width: 600px;
    margin: 0 auto;
}

/* 确保单科目卡片在移动设备上也能很好地展示 */
@media (max-width: 768px) {
    .single-subject .subject-card {
        transform: none;
        padding: 1.2rem;
    }
    
    .single-subject .subject-card:hover {
        transform: translateY(-5px);
    }
    
    .single-subject .main-score {
        font-size: 2.5rem;
    }
}

/* 优化三个科目卡片的显示样式 */
.three-cards .subject-card {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.three-cards .subject-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

/* 为三个科目卡片设置不同的边框颜色 */
.three-cards .subject-card:nth-child(1) {
    border-left: 3px solid #3498db;
}

.three-cards .subject-card:nth-child(2) {
    border-left: 3px solid #e74c3c;
}

.three-cards .subject-card:nth-child(3) {
    border-left: 3px solid #27ae60;
}

@media (max-width: 768px) {
    .three-cards {
        grid-template-columns: 1fr;
        max-width: 320px;
    }
}

/* 饼图下方成绩统计信息展示区域样式 */
.chart-stats-container {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

.chart-stats-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 15px;
}

.chart-stats-row {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-between;
    margin-bottom: 5px;
}

.stats-item {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    padding: 12px 15px;
    flex: 1;
    min-width: 120px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.stats-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stats-item.excellent {
    border-left-color: #4CAF50;
}

.stats-item.good {
    border-left-color: #2196F3;
}

.stats-item.pass {
    border-left-color: #FF9800;
}

.stats-item.fail {
    border-left-color: #F44336;
}

.stats-item.total {
    border-left-color: #9C27B0;
}

.stats-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.stats-value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.stats-percentage {
    font-size: 15px;
    color: #777;
    margin-left: 8px;
}

.score-threshold-info {
    margin-top: 15px;
    padding: 12px;
    background-color: rgba(248, 249, 250, 0.5);
    border-radius: 8px;
    font-size: 14px;
    color: #666;
    border-left: 4px solid #9C27B0;
}

/* 响应式设计调整 */
@media screen and (max-width: 768px) {
    .chart-stats-content {
        flex-direction: column;
    }
    
    .stats-item {
        margin-bottom: 10px;
    }
} 