/* 学生工作台 - 多级选择 + 图文列表页（美化版） */

.student-list-page {
    padding: 0;
    margin: 0;
    padding-top: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* 页面头部（美化 + 返回首页） */
.student-list-page .page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    padding: 24px 24px 22px 24px;
    background: linear-gradient(135deg, rgba(62, 146, 204, 0.06) 0%, rgba(10, 36, 99, 0.03) 100%);
    border-radius: 14px;
    border: 1px solid rgba(62, 146, 204, 0.12);
    border-left: 4px solid var(--light-blue);
    box-shadow: 0 2px 12px rgba(10, 36, 99, 0.06);
}

.student-list-page .page-header-inner {
    flex: 1;
    min-width: 0;
}

.student-list-page .page-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--deep-space-blue);
    margin: 0 0 8px 0;
    padding: 0;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.student-list-page .page-subtitle {
    font-size: 14px;
    color: var(--dark-gray);
    margin: 0;
    line-height: 1.55;
}

.student-list-page .page-header .btn-back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--white, #fff);
    background: linear-gradient(135deg, var(--light-blue) 0%, #2a7ab8 100%);
    border: none;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(62, 146, 204, 0.3);
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.student-list-page .page-header .btn-back-home:hover {
    background: linear-gradient(135deg, #2a7ab8 0%, var(--deep-space-blue) 100%);
    box-shadow: 0 4px 16px rgba(62, 146, 204, 0.4);
    transform: translateY(-1px);
}

.student-list-page .page-header .btn-back-home svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* 课程类别容器（含分类、学段、选课状态） */
.student-list-category {
    margin-bottom: 28px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(62, 146, 204, 0.04) 0%, rgba(10, 36, 99, 0.03) 100%);
    border-radius: 14px;
    border: 1px solid rgba(62, 146, 204, 0.12);
}

/* 课程类别、学段、选课状态 - 统一布局：标签 + 按钮 */
.student-list-category .student-list-level1 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    padding: 0;
}

.student-list-level1 .level1-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark-gray);
    background: var(--white, #fff);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.student-list-level1 .level1-btn:hover {
    color: var(--deep-space-blue);
    border-color: var(--light-blue);
    background: rgba(255,255,255,0.95);
    box-shadow: 0 2px 8px rgba(62, 146, 204, 0.15);
}

.student-list-level1 .level1-btn.active {
    color: var(--white, #fff);
    background: linear-gradient(135deg, var(--light-blue) 0%, #2a7ab8 100%);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(62, 146, 204, 0.35);
}

/* 二级、三级选择（学段、选课状态）- 与课程分类样式一致 */
.student-list-category .student-list-level2,
.student-list-category .student-list-level3 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    padding: 0;
}

.student-list-category .student-list-level2 {
    margin-top: 14px;
}

.student-list-category .student-list-level3 {
    margin-top: 14px;
}

.student-list-category .filter-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--deep-space-blue);
    margin-right: 4px;
}

.student-list-category .filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* 学段、选课状态按钮与课程分类保持一致（胶囊样式）- 提高优先级覆盖通用 level2 样式 */
.student-list-category .student-list-level2 .level2-btn,
.student-list-category .student-list-level3 .level3-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark-gray);
    background: var(--white, #fff);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.student-list-category .student-list-level2 .level2-btn:hover,
.student-list-category .student-list-level3 .level3-btn:hover {
    color: var(--deep-space-blue);
    border-color: var(--light-blue);
    background: rgba(255,255,255,0.95);
    box-shadow: 0 2px 8px rgba(62, 146, 204, 0.15);
}

.student-list-category .student-list-level2 .level2-btn.active,
.student-list-category .student-list-level3 .level3-btn.active {
    color: var(--white, #fff);
    background: linear-gradient(135deg, var(--light-blue) 0%, #2a7ab8 100%);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(62, 146, 204, 0.35);
}

/* 项目/挑战/活动页的 level2 独立样式（使用 level2-label、level2-options） */
.student-list-level2 .level2-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--deep-space-blue);
    margin-right: 4px;
}

.student-list-level2 .level2-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.student-list-level2 .level2-btn {
    padding: 8px 16px;
    font-size: 13px;
    color: var(--dark-gray);
    background: var(--white, #fff);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.student-list-level2 .level2-btn:hover {
    color: var(--deep-space-blue);
    border-color: var(--light-blue);
    background: rgba(62, 146, 204, 0.06);
}

.student-list-level2 .level2-btn.active {
    color: var(--light-blue);
    font-weight: 600;
    border-color: var(--light-blue);
    background: rgba(62, 146, 204, 0.08);
}

.student-list-page > .student-list-level2 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding: 12px 0;
}

/* 图文列表：卡片网格 */
.student-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    min-height: 200px;
}

.student-list-card {
    background: var(--white, #fff);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease, transform 0.25s ease, border-color 0.2s;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.student-list-card:hover {
    box-shadow: 0 12px 32px rgba(10, 36, 99, 0.14);
    transform: translateY(-4px);
    border-color: rgba(62, 146, 204, 0.25);
}

.student-list-card.hidden {
    display: none !important;
}

.student-list-card.paged-hidden {
    display: none !important;
}

.student-list-card .card-thumb-wrap {
    position: relative;
    width: 100%;
    height: 172px;
    overflow: hidden;
    background: var(--light-gray);
}

.student-list-card .card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.student-list-card:hover .card-thumb {
    transform: scale(1.06);
}

.student-list-card .card-thumb-wrap::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(0,0,0,0.25), transparent);
    pointer-events: none;
}

.student-list-card .card-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.student-list-card .card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.student-list-card .card-tag {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: 500;
    background: linear-gradient(135deg, rgba(62, 146, 204, 0.1) 0%, rgba(62, 146, 204, 0.06) 100%);
    color: var(--light-blue);
    border: 1px solid rgba(62, 146, 204, 0.2);
}

.student-list-card .card-tag.tag-alt {
    background: rgba(0,0,0,0.06);
    color: var(--dark-gray);
    border-color: transparent;
}

.student-list-card .card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--deep-space-blue);
    margin: 0 0 10px 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.student-list-card .card-desc {
    font-size: 14px;
    color: var(--dark-gray);
    line-height: 1.55;
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.student-list-card .card-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.student-list-card .card-link {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s;
    cursor: pointer;
}

.student-list-card .card-link[type="button"],
.student-list-card button.card-link {
    border: none;
    font: inherit;
}

.student-list-card .card-link-detail {
    color: var(--light-blue);
    background: transparent;
    border: 1px solid var(--light-blue);
}

.student-list-card .card-link-detail:hover {
    background: rgba(62, 146, 204, 0.1);
}

/* 加入学习 - 蓝色 */
.student-list-card .card-link-study {
    color: var(--white, #fff);
    background: linear-gradient(135deg, var(--light-blue) 0%, #2a7ab8 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(62, 146, 204, 0.25);
}

.student-list-card:hover .card-link-study {
    box-shadow: 0 4px 14px rgba(62, 146, 204, 0.35);
}

.student-list-card .card-link-study:hover {
    background: linear-gradient(135deg, #2a7ab8 0%, var(--deep-space-blue) 100%);
}

/* 继续学习 - 绿色（已选课程） */
.student-list-card[data-enrolled="true"] .card-link-study {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.student-list-card[data-enrolled="true"]:hover .card-link-study {
    box-shadow: 0 4px 14px rgba(76, 175, 80, 0.4);
}

.student-list-card[data-enrolled="true"] .card-link-study:hover {
    background: linear-gradient(135deg, #43A047 0%, #1B5E20 100%);
}

/* 无结果提示 */
.student-list-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    background: linear-gradient(135deg, rgba(62, 146, 204, 0.05) 0%, rgba(10, 36, 99, 0.03) 100%);
    border-radius: 14px;
    border: 1px dashed rgba(62, 146, 204, 0.25);
    display: none;
}

.student-list-empty.visible {
    display: block;
}

.student-list-empty .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.student-list-empty .empty-text {
    font-size: 16px;
    color: var(--dark-gray);
    margin: 0 0 8px 0;
}

.student-list-empty .empty-hint {
    font-size: 14px;
    color: var(--dark-gray);
    opacity: 0.85;
}

.student-list-pagination {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.student-list-pagination.hidden {
    display: none;
}

.student-list-pagination .pagination-btn {
    min-width: 84px;
    height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid rgba(62, 146, 204, 0.35);
    background: #fff;
    color: var(--deep-space-blue);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.student-list-pagination .pagination-btn:hover:not(:disabled) {
    background: rgba(62, 146, 204, 0.08);
    border-color: var(--light-blue);
}

.student-list-pagination .pagination-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.student-list-pagination .pagination-info {
    font-size: 13px;
    color: #4f5f79;
    min-width: 96px;
    text-align: center;
}

@media (max-width: 768px) {
    .student-list-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .student-list-level1 {
        padding: 12px 14px;
    }
    .student-list-level1 .level1-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* 认领任务确认弹窗 */
.claim-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.claim-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.claim-confirm-content {
    position: relative;
    max-width: 420px;
    width: 100%;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    padding: 24px;
}

.claim-confirm-title {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--deep-space-blue, #0a2463);
}

.claim-confirm-message {
    margin: 0 0 24px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #4f5f79;
}

.claim-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.claim-confirm-btn {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.2s;
}

.claim-confirm-cancel {
    background: rgba(0, 0, 0, 0.06);
    color: #4f5f79;
}

.claim-confirm-cancel:hover {
    background: rgba(0, 0, 0, 0.1);
}

.claim-confirm-ok {
    background: linear-gradient(135deg, var(--light-blue, #3e92cc) 0%, #2a7ab8 100%);
    color: #fff;
}

.claim-confirm-ok:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(62, 146, 204, 0.4);
}

/* ========== 学生工作台首页 - 推荐区块美化 ========== */
.recommend-section {
    margin-top: 36px;
    padding: 24px 26px 26px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(10, 36, 99, 0.08);
    box-shadow: 0 4px 20px rgba(10, 36, 99, 0.06);
}

.recommend-section:first-of-type {
    margin-top: 0;
}

/* 区块标题栏 - 带图标与强调色 */
.section-title-bar-accent {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid transparent;
}

.recommend-section-challenge .section-title-bar-accent {
    border-bottom-color: rgba(22, 160, 133, 0.25);
}

.recommend-section-course .section-title-bar-accent {
    border-bottom-color: rgba(230, 126, 34, 0.25);
}

.recommend-section-project .section-title-bar-accent {
    border-bottom-color: rgba(39, 174, 96, 0.25);
}

.recommend-section-activity .section-title-bar-accent {
    border-bottom-color: rgba(52, 152, 219, 0.25);
}

.section-title-bar-accent h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--deep-space-blue);
    margin: 0;
    letter-spacing: 0.02em;
}

.section-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.section-icon svg {
    width: 16px;
    height: 16px;
    color: #fff;
    opacity: 0.95;
}

.section-icon-challenge {
    background: linear-gradient(135deg, #16a085 0%, #1abc9c 100%);
    box-shadow: 0 2px 8px rgba(22, 160, 133, 0.35);
}

.section-icon-course {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    box-shadow: 0 2px 8px rgba(230, 126, 34, 0.35);
}

.section-icon-project {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.35);
}

.section-icon-activity {
    background: linear-gradient(135deg, #3498db 0%, #5dade2 100%);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.35);
}

.section-more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--light-blue);
    text-decoration: none;
    transition: color 0.2s, gap 0.2s;
}

.section-more-link:hover {
    color: var(--deep-space-blue);
    gap: 8px;
}

.section-more-link svg {
    flex-shrink: 0;
}

/* 推荐挑战 - 任务列表美化 */
.recommend-task-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.recommend-task-list .task-item {
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(248,252,255,0.95) 100%);
    border-radius: 14px;
    padding: 20px 24px;
    border: 1px solid rgba(22, 160, 133, 0.12);
    border-left: 4px solid #16a085;
    box-shadow: 0 2px 12px rgba(10, 36, 99, 0.05);
    transition: all 0.28s ease;
}

.recommend-task-list .task-item:hover {
    border-left-color: #1abc9c;
    box-shadow: 0 6px 24px rgba(22, 160, 133, 0.15);
    transform: translateX(4px);
}

.recommend-task-list .task-item .task-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--deep-space-blue);
    margin-bottom: 6px;
    line-height: 1.4;
}

.recommend-task-list .task-item .task-meta {
    font-size: 13px;
    color: #5a6c87;
    line-height: 1.55;
}

.recommend-task-list .task-item .task-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.recommend-task-list .task-item .btn-primary {
    background: linear-gradient(135deg, #16a085 0%, #1abc9c 100%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 10px rgba(22, 160, 133, 0.3);
}

.recommend-task-list .task-item .btn-primary:hover {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    box-shadow: 0 4px 14px rgba(22, 160, 133, 0.4);
}

.recommend-task-list .task-item .btn-secondary {
    background: #fff;
    color: #16a085;
    border: 1px solid rgba(22, 160, 133, 0.4);
}

.recommend-task-list .task-item .btn-secondary:hover {
    background: rgba(22, 160, 133, 0.08);
    border-color: #16a085;
}

/* 推荐课程/项目/活动 - 卡片网格美化 */
.recommend-section .recommend-grid {
    gap: 22px;
}

.recommend-section .student-list-card {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(10, 36, 99, 0.08);
    transition: all 0.3s ease;
}

.recommend-section-course .student-list-card {
    border-top: 3px solid transparent;
    border-top-color: rgba(230, 126, 34, 0.4);
}

.recommend-section-course .student-list-card:hover {
    border-top-color: #e67e22;
    box-shadow: 0 12px 32px rgba(230, 126, 34, 0.12);
}

.recommend-section-project .student-list-card {
    border-top: 3px solid transparent;
    border-top-color: rgba(39, 174, 96, 0.4);
}

.recommend-section-project .student-list-card:hover {
    border-top-color: #27ae60;
    box-shadow: 0 12px 32px rgba(39, 174, 96, 0.12);
}

.recommend-section-activity .student-list-card {
    border-top: 3px solid transparent;
    border-top-color: rgba(52, 152, 219, 0.4);
}

.recommend-section-activity .student-list-card:hover {
    border-top-color: #3498db;
    box-shadow: 0 12px 32px rgba(52, 152, 219, 0.12);
}

.recommend-section .student-list-card .card-thumb-wrap {
    height: 160px;
}

.recommend-section .student-list-card .card-thumb-wrap::after {
    height: 70px;
    background: linear-gradient(to top, rgba(0,0,0,0.35), transparent);
}

.recommend-section .student-list-card .card-body {
    padding: 20px;
}

.recommend-section .student-list-card .card-title {
    font-size: 16px;
    font-weight: 600;
    -webkit-line-clamp: 2;
}

.recommend-section .student-list-card .card-desc {
    font-size: 14px;
    -webkit-line-clamp: 2;
}

.recommend-section-course .student-list-card .card-link-study {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    box-shadow: 0 2px 10px rgba(230, 126, 34, 0.3);
}

.recommend-section-course .student-list-card .card-link-study:hover {
    background: linear-gradient(135deg, #d35400 0%, #e67e22 100%);
    box-shadow: 0 4px 14px rgba(230, 126, 34, 0.4);
}

.recommend-section-project .student-list-card .card-link-study {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    box-shadow: 0 2px 10px rgba(39, 174, 96, 0.3);
}

.recommend-section-project .student-list-card .card-link-study:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    box-shadow: 0 4px 14px rgba(39, 174, 96, 0.4);
}

.recommend-section-activity .student-list-card .card-link-study {
    background: linear-gradient(135deg, #3498db 0%, #5dade2 100%);
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

.recommend-section-activity .student-list-card .card-link-study:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    box-shadow: 0 4px 14px rgba(52, 152, 219, 0.4);
}

@media (max-width: 768px) {
    .recommend-section {
        padding: 18px 16px 20px;
        margin-top: 28px;
    }
    .section-title-bar-accent h2 {
        font-size: 18px;
    }
    .section-icon {
        width: 24px;
        height: 24px;
    }
    .recommend-task-list .task-item {
        flex-direction: column;
        align-items: stretch;
        padding: 16px 18px;
    }
    .recommend-task-list .task-item .task-actions {
        justify-content: flex-start;
    }
}
