/**
 * Learning Dashboard Styles
 * 学习仪表盘样式
 */

/* 仪表盘按钮 */
.btn-learning-dashboard {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-learning-dashboard:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-learning-dashboard:active {
    transform: translateY(0);
}

/* 仪表盘面板 */
.learning-dashboard-panel {
    position: fixed;
    right: -520px;
    top: 0;
    width: 500px;
    max-width: 95vw;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.learning-dashboard-panel.open {
    right: 0;
}

/* 仪表盘头部 */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dashboard-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.btn-close-dashboard {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: white;
    transition: transform 0.2s ease;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-dashboard:hover {
    transform: scale(1.1);
}

/* 仪表盘主体 */
.dashboard-body {
    padding: 24px;
}

/* 统计卡片网格 */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 4px;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: #636e72;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* 仪表盘区块 */
.dashboard-section {
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
}

.dashboard-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #2d3436;
}

/* 学域掌握度图表 */
.domain-mastery-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.domain-mastery-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.domain-mastery-label {
    width: 120px;
    font-size: 13px;
    font-weight: 500;
    color: #2d3436;
    flex-shrink: 0;
}

.domain-mastery-progress {
    flex: 1;
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.domain-mastery-fill {
    height: 100%;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
}

.domain-mastery-percent {
    font-size: 11px;
    color: white;
    font-weight: 600;
}

/* 热力图图例 */
.heatmap-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #636e72;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.heatmap-hint {
    font-size: 12px;
    color: #999;
    font-style: italic;
    margin-bottom: 12px;
}

.btn-toggle-heatmap {
    width: 100%;
    padding: 10px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toggle-heatmap:hover {
    background: #667eea;
    color: white;
}

/* 薄弱节点列表 */
.weak-nodes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weak-node-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.weak-node-item:hover {
    background: #ffe0b2;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2);
}

.weak-node-name {
    font-weight: 500;
    color: #2d3436;
    flex: 1;
}

.weak-node-score {
    font-size: 12px;
    color: #e65100;
    font-weight: 600;
    padding: 4px 8px;
    background: white;
    border-radius: 6px;
}

/* 学习建议 */
.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommendation-item {
    padding: 12px;
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.recommendation-item p {
    margin: 0;
    color: #2d3436;
}

.recommendation-item.priority-high {
    background: #ffebee;
    border-left-color: #f44336;
}

/* 最近活动 */
.recent-activities {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid #e0e0e0;
}

.activity-time {
    color: #999;
    font-size: 11px;
    flex-shrink: 0;
    width: 60px;
}

.activity-action {
    font-weight: 500;
    color: #667eea;
    flex-shrink: 0;
}

.activity-node {
    color: #636e72;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 空状态提示 */
.empty-hint {
    text-align: center;
    color: #999;
    font-size: 13px;
    font-style: italic;
    padding: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .learning-dashboard-panel {
        width: 100%;
        right: -100%;
    }

    .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }

    .domain-mastery-label {
        width: 100px;
        font-size: 12px;
    }
}

/* 滚动条样式 */
.learning-dashboard-panel::-webkit-scrollbar {
    width: 8px;
}

.learning-dashboard-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.learning-dashboard-panel::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.learning-dashboard-panel::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}
