/* 详细页面样式 */

.main-content {
    background-color: #f8f9fa;
    min-height: 100vh;
    padding-bottom: 80px;
}

/* 页面头部 */
.detail-header {
    background: linear-gradient(135deg, #5B9BD5 0%, #7FB3E6 100%);
    padding: 20px 16px;
}

/* 页面头部内容布局 */
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
    position: relative;
}

.back-btn {
    background: transparent;
    border: none;
    color: #fff;
    padding: 8px;
    margin-left: -8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.back-btn svg {
    width: 24px;
    height: 24px;
}

.header-content .page-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    margin: 0;
    padding: 0;
}

.header-actions {
    width: 40px; /* 与返回按钮对称 */
    z-index: 10;
}

/* 统计卡片 */
.stats-summary {
    padding: 16px;
    margin-top: -30px;
    position: relative;
    z-index: 110;
}

.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.total-gpa .stat-icon {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #fff;
}

.total-rank .stat-icon {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #fff;
}

.total-papers .stat-icon {
    background: linear-gradient(135deg, #2196F3 0%, #0b7dda 100%);
    color: #fff;
}

.total-patents .stat-icon {
    background: linear-gradient(135deg, #9C27B0 0%, #7b1fa2 100%);
    color: #fff;
}

.total-software .stat-icon {
    background: linear-gradient(135deg, #FF9800 0%, #f57c00 100%);
    color: #fff;
}

.total-competitions .stat-icon {
    background: linear-gradient(135deg, #E91E63 0%, #c2185b 100%);
    color: #fff;
}

.total-english .stat-icon {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #fff;
}

.item-icon.english {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #fff;
}

.total-projects .stat-icon {
    background: linear-gradient(135deg, #2196F3 0%, #0b7dda 100%);
    color: #fff;
}

.item-icon.project {
    background: linear-gradient(135deg, #2196F3 0%, #0b7dda 100%);
    color: #fff;
}

.stat-content {
    flex: 1;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: #8E8E93;
    margin-bottom: 4px;
}

.stat-value-wrapper {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 600;
    color: #1C1C1E;
}

.stat-unit {
    font-size: 14px;
    color: #8E8E93;
    font-weight: 500;
}

.stat-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.stat-badge.excellent {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #fff;
}

.stat-progress {
    flex: 1;
    height: 8px;
    background: #F2F2F7;
    border-radius: 4px;
    overflow: hidden;
    margin-left: 12px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #5B9BD5 0%, #7FB3E6 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* 状态显示 */
.loading-state, .empty-state, .error-state,
.loading, .empty, .error {
    padding: 60px 20px;
    text-align: center;
    color: #8e8e93;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f2f2f7;
    border-top: 3px solid #5b9bd5;
    border-radius: 50%;
    margin-bottom: 16px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.add-btn-empty {
    margin-top: 16px;
    padding: 8px 24px;
    background: #5B9BD5;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
}

/* 列表区域 */
.detail-list {
    padding: 0 16px;
    margin-top: 12px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1c1c1e;
    margin-bottom: 12px;
    padding-left: 4px;
}

/* 学年分组 */
.year-section {
    margin-bottom: 24px;
}

.year-title {
    font-size: 16px;
    font-weight: 600;
    color: #1C1C1E;
    margin: 0 0 12px 0;
    padding-left: 12px;
    border-left: 4px solid #5B9BD5;
}

.semester-list {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.semester-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #F2F2F7;
}

.semester-item:last-child {
    border-bottom: none;
}

.semester-info {
    flex: 1;
}

.semester-name {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: #1C1C1E;
    margin-bottom: 4px;
}

.semester-date {
    font-size: 13px;
    color: #8E8E93;
}

.semester-gpa {
    text-align: right;
}

.gpa-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #1C1C1E;
    margin-bottom: 4px;
}

.gpa-level {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 8px;
}

.gpa-level.excellent {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.gpa-level.good {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.semester-rank {
    text-align: right;
}

.rank-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #1C1C1E;
    margin-bottom: 4px;
}

.rank-percent {
    font-size: 12px;
    font-weight: 500;
    color: #5B9BD5;
}

/* 成果列表 */
.achievement-list {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    min-height: 100px;
    display: flex;
    flex-direction: column;
}

/* 当列表内只有状态显示时，移除背景和阴影以保持整洁 */
.achievement-list:has(.loading-state),
.achievement-list:has(.empty-state),
.achievement-list:has(.error-state) {
    background: transparent;
    box-shadow: none;
}

.achievement-item {
    display: flex;
    gap: 16px;
    padding: 18px 16px;
    border-bottom: 1px solid #f2f2f7;
    transition: background-color 0.2s ease;
}

.achievement-item.clickable:active {
    background-color: #f2f2f7;
}

.achievement-item:last-child {
    border-bottom: none;
}

.item-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}

.item-icon.paper {
    background: linear-gradient(135deg, #2196F3 0%, #0b7dda 100%);
    color: #fff;
}

.item-icon.patent {
    background: linear-gradient(135deg, #9C27B0 0%, #7b1fa2 100%);
    color: #fff;
}

.item-icon.software {
    background: linear-gradient(135deg, #FF9800 0%, #f57c00 100%);
    color: #fff;
}

.item-icon.award {
    background: linear-gradient(135deg, #E91E63 0%, #c2185b 100%);
    color: #fff;
}

.item-icon svg {
    width: 24px;
    height: 24px;
}

.item-content {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-size: 15px;
    font-weight: 500;
    color: #1C1C1E;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.item-journal,
.item-type,
.item-level,
.item-date {
    font-size: 12px;
    color: #8e8e93;
    padding: 2px 10px;
    background: #f2f2f7;
    border-radius: 6px;
    font-weight: 500;
}

.item-info {
    font-size: 14px;
    color: #5b9bd5;
    font-weight: 600;
}

.item-author,
.item-number,
.item-rank {
    display: inline-block;
}

/* 操作按钮 */
.action-section {
    padding: 24px 16px 40px;
    margin-bottom: 80px;
}

.primary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #5B9BD5 0%, #7FB3E6 100%);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(91, 155, 213, 0.2);
}

.primary-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.primary-btn svg {
    width: 20px;
    height: 20px;
}

/* 响应式调整 */
@media screen and (max-width: 360px) {
    .stat-value {
        font-size: 24px;
    }
    
    .semester-item {
        padding: 12px;
    }
    
    .achievement-item {
        padding: 12px;
        gap: 12px;
    }
    
    .item-icon {
        width: 36px;
        height: 36px;
    }
    
    .item-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .item-title {
        font-size: 14px;
    }
}
