/* ===== 学习路径可视化样式 ===== */

/* 页面容器 */
.learning-path-page {
    padding: 16px;
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
    min-height: 100vh;
    background: linear-gradient(180deg, #F8F7FF 0%, #FFFFFF 100%);
}

/* 顶部统计卡片 */
.path-stats-card {
    background: linear-gradient(135deg, #6C5CE7 0%, #A29BFE 100%);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

.path-stats-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.path-stats-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.path-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.path-stats-title {
    font-size: 18px;
    font-weight: 700;
}

.path-stats-badge {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.path-stats-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    position: relative;
    z-index: 1;
}

.path-stats-main {
    flex: 1;
}

.path-stats-num {
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.path-stats-label {
    font-size: 13px;
    opacity: 0.9;
}

.path-stats-ring {
    width: 70px;
    height: 70px;
    position: relative;
}

.path-stats-ring svg {
    transform: rotate(-90deg);
}

.path-stats-ring-circle {
    fill: none;
    stroke: rgba(255,255,255,0.3);
    stroke-width: 6;
}

.path-stats-ring-progress {
    fill: none;
    stroke: white;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out;
}

.path-stats-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 700;
}

/* 考点树容器 */
.path-tree-container {
    margin-bottom: 20px;
}

/* 一级节点（模块） */
.path-module {
    margin-bottom: 16px;
}

.path-module-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: white;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(108,92,231,0.08);
    position: relative;
    overflow: hidden;
}

.path-module-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
}

.path-module[data-level="master"] .path-module-header::before {
    background: linear-gradient(180deg, #00B894, #55EFC4);
}

.path-module[data-level="weak"] .path-module-header::before {
    background: linear-gradient(180deg, #FDCB6E, #F39C12);
}

.path-module[data-level="urgent"] .path-module-header::before {
    background: linear-gradient(180deg, #FF7675, #D63031);
}

.path-module[data-level="none"] .path-module-header::before {
    background: #E2E8F0;
}

.path-module-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 20px;
}

.path-module[data-level="master"] .path-module-icon {
    background: rgba(0,184,148,0.1);
}

.path-module[data-level="weak"] .path-module-icon {
    background: rgba(253,203,110,0.2);
}

.path-module[data-level="urgent"] .path-module-icon {
    background: rgba(255,118,117,0.15);
}

.path-module[data-level="none"] .path-module-icon {
    background: rgba(108,92,231,0.1);
}

.path-module-info {
    flex: 1;
}

.path-module-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 2px;
}

.path-module-sub {
    font-size: 12px;
    color: #94a3b8;
}

.path-module-score {
    text-align: right;
}

.path-module-score-num {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
}

.path-module-score-label {
    font-size: 10px;
    color: #94a3b8;
}

.path-module-toggle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    transition: transform 0.3s;
}

.path-module.expanded .path-module-toggle {
    transform: rotate(180deg);
}

.path-module-toggle svg {
    width: 16px;
    height: 16px;
    color: #94a3b8;
}

/* 子节点容器 */
.path-children {
    padding-left: 20px;
    margin-top: 8px;
    display: none;
}

.path-module.expanded .path-children {
    display: block;
    animation: slideDown 0.3s ease;
}

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

/* 连接线 */
.path-children::before {
    content: '';
    position: absolute;
    left: 28px;
    top: 0;
    bottom: 20px;
    width: 2px;
    background: linear-gradient(180deg, #E2E8F0 0%, transparent 100%);
}

/* 二级节点 */
.path-node {
    position: relative;
    margin-bottom: 8px;
}

.path-node-header {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    position: relative;
}

.path-node-header:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(108,92,231,0.12);
}

.path-node-header:active {
    transform: scale(0.98);
}

/* 节点状态指示器 */
.path-node-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
}

.path-node-dot.master {
    background: #00B894;
    box-shadow: 0 0 0 3px rgba(0,184,148,0.2);
}

.path-node-dot.weak {
    background: #FDCB6E;
    box-shadow: 0 0 0 3px rgba(253,203,110,0.3);
}

.path-node-dot.urgent {
    background: #FF7675;
    box-shadow: 0 0 0 3px rgba(255,118,117,0.2);
    animation: pulse 2s infinite;
}

.path-node-dot.none {
    background: #E2E8F0;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(255,118,117,0.2);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(255,118,117,0.1);
    }
}

.path-node-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a2e;
}

.path-node-score {
    font-size: 14px;
    font-weight: 600;
    margin-left: 8px;
}

.path-node-score.master { color: #00B894; }
.path-node-score.weak { color: #F39C12; }
.path-node-score.urgent { color: #D63031; }
.path-node-score.none { color: #94a3b8; }

.path-node-arrow {
    width: 20px;
    height: 20px;
    margin-left: 4px;
    color: #CBD5E1;
    transition: all 0.3s;
}

.path-node-header:hover .path-node-arrow {
    color: #6C5CE7;
    transform: translateX(2px);
}

/* 三级节点 */
.path-subnodes {
    padding-left: 22px;
    margin-top: 6px;
    display: none;
}

.path-node.expanded .path-subnodes {
    display: block;
}

.path-subnode {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #F8F9FA;
    border-radius: 10px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.path-subnode:hover {
    background: white;
    border-color: #E2E8F0;
    transform: translateX(4px);
}

.path-subnode.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.path-subnode.locked::after {
    content: '🔒';
    margin-left: auto;
    font-size: 12px;
}

.path-subnode-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.path-subnode-dot.master { background: #00B894; }
.path-subnode-dot.weak { background: #FDCB6E; }
.path-subnode-dot.urgent { background: #FF7675; }
.path-subnode-dot.none { background: #E2E8F0; }

.path-subnode-name {
    flex: 1;
    font-size: 13px;
    color: #475569;
}

.path-subnode-score {
    font-size: 12px;
    font-weight: 600;
}

.path-subnode-score.master { color: #00B894; }
.path-subnode-score.weak { color: #F39C12; }
.path-subnode-score.urgent { color: #D63031; }
.path-subnode-score.none { color: #94a3b8; }

/* 推荐学习高亮 */
.path-node.recommended .path-node-header,
.path-subnode.recommended {
    background: linear-gradient(135deg, rgba(108,92,231,0.05) 0%, rgba(162,155,254,0.1) 100%);
    border: 1px solid rgba(108,92,231,0.2);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(108,92,231,0.2);
    }
    50% {
        box-shadow: 0 0 15px rgba(108,92,231,0.4);
    }
}

/* 节点详情弹窗 */
.path-node-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.path-node-modal.active {
    opacity: 1;
    visibility: visible;
}

.path-node-sheet {
    background: white;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 430px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}

.path-node-modal.active .path-node-sheet {
    transform: translateY(0);
}

.path-node-sheet-handle {
    width: 36px;
    height: 4px;
    background: #E2E8F0;
    border-radius: 2px;
    margin: 12px auto 16px;
}

.path-node-sheet-header {
    padding: 0 20px 16px;
    border-bottom: 1px solid #F1F5F9;
}

.path-node-sheet-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.path-node-sheet-desc {
    font-size: 14px;
    color: #64748B;
    line-height: 1.6;
}

.path-node-sheet-content {
    padding: 20px;
}

.path-node-sheet-section {
    margin-bottom: 20px;
}

.path-node-sheet-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

/* 掌握度指示器 */
.path-mastery-bar {
    height: 8px;
    background: #E2E8F0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.path-mastery-progress {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.path-mastery-progress.master {
    background: linear-gradient(90deg, #00B894, #55EFC4);
}

.path-mastery-progress.weak {
    background: linear-gradient(90deg, #FDCB6E, #F39C12);
}

.path-mastery-progress.urgent {
    background: linear-gradient(90deg, #FF7675, #D63031);
}

.path-mastery-progress.none {
    background: #E2E8F0;
}

.path-mastery-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #94a3b8;
}

/* 练习建议 */
.path-tips {
    background: #F8F9FA;
    border-radius: 12px;
    padding: 14px;
}

.path-tip-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

.path-tip-item:last-child {
    margin-bottom: 0;
}

.path-tip-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(108,92,231,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.path-tip-icon svg {
    width: 12px;
    height: 12px;
    color: #6C5CE7;
}

.path-tip-text {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

/* 行动按钮 */
.path-action-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6C5CE7 0%, #A29BFE 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.path-action-btn:active {
    transform: scale(0.98);
}

.path-action-btn svg {
    width: 18px;
    height: 18px;
}

/* VIP提示 */
.path-vip-tip {
    background: linear-gradient(135deg, rgba(108,92,231,0.08) 0%, rgba(162,155,254,0.12) 100%);
    border: 1px dashed rgba(108,92,231,0.3);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin-top: 16px;
}

.path-vip-tip-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.path-vip-tip-text {
    font-size: 13px;
    color: #6C5CE7;
    font-weight: 500;
}

.path-vip-tip-sub {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

/* 空状态 */
.path-empty {
    text-align: center;
    padding: 60px 20px;
}

.path-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.path-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.path-empty-desc {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 20px;
}

/* 底部提示 */
.path-footer-tip {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: #94a3b8;
}

.path-footer-tip a {
    color: #6C5CE7;
    text-decoration: none;
}

/* 响应式 */
@media (max-width: 375px) {
    .path-stats-num {
        font-size: 28px;
    }
    
    .path-module-header {
        padding: 12px;
    }
    
    .path-module-icon {
        width: 36px;
        height: 36px;
    }
}
