/**
 * 游戏增强样式
 * 
 * 包含向导模式、导师系统、任务卡片等新功能的样式
 */

/* ===== 导师选择模态框 ===== */
#chao-game-root #pn-mentor-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chao-game-root .pn-mentor-selection {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

#chao-game-root .pn-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

#chao-game-root .pn-modal-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: #333;
}

#chao-game-root .pn-modal-header p {
    color: #666;
    font-size: 16px;
}

#chao-game-root .pn-mentor-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

#chao-game-root .pn-mentor-card,
.chao-game-mentor-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer !important;
    transition: all 0.3s ease;
    background: #fff;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto !important;
}

#chao-game-root .pn-mentor-card:hover,
.chao-game-mentor-card:hover {
    border-color: #4a90e2;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.2);
}

#chao-game-root .pn-mentor-card.selected,
.chao-game-mentor-card.selected {
    border-color: #4a90e2;
    background: #f0f7ff;
}

.chao-game-mentor-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 🆕 确保导师选择模态框中的卡片可点击 */
#chao-game-mentor-selection-modal .chao-game-mentor-card,
#pn-mentor-selection-modal .pn-mentor-card {
    cursor: pointer !important;
    pointer-events: auto !important;
}

#chao-game-mentor-selection-modal .chao-game-mentor-card *,
#pn-mentor-selection-modal .pn-mentor-card * {
    pointer-events: none; /* 让子元素不拦截点击事件 */
}

#chao-game-root .pn-mentor-avatar {
    font-size: 48px;
    margin-bottom: 15px;
}

#chao-game-root .pn-mentor-card h3 {
    margin: 0 0 5px 0;
    font-size: 20px;
    color: #333;
}

#chao-game-root .pn-mentor-title {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

#chao-game-root .pn-mentor-description {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

#chao-game-root .pn-mentor-traits {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

#chao-game-root .pn-trait {
    background: #f0f0f0;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
}

#chao-game-root .pn-modal-footer {
    text-align: center;
}

#chao-game-root .pn-selection-success {
    color: #4caf50;
    font-weight: bold;
    margin-top: 10px;
}

/* ===== 向导模式 ===== */
#chao-game-root .pn-wizard-mode-badge {
    display: inline-block;
    background: #ff9800;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 10px;
}

#chao-game-root .pn-mode-selection {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
}

#chao-game-root .pn-mode-btn {
    flex: 1;
    max-width: 300px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

#chao-game-root .pn-mode-btn:hover {
    border-color: #4a90e2;
    transform: translateY(-2px);
}

#chao-game-root .pn-mode-btn.active {
    border-color: #4a90e2;
    background: #f0f7ff;
}

#chao-game-root .pn-mode-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}

#chao-game-root .pn-mode-title {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

#chao-game-root .pn-mode-desc {
    display: block;
    font-size: 14px;
    color: #666;
}

/* ===== 导师反馈 ===== */
#chao-game-root .pn-mentor-feedback {
    background: #f8f9fa;
    border-left: 4px solid #4a90e2;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

#chao-game-root .pn-mentor-avatar-small {
    font-size: 32px;
    flex-shrink: 0;
}

#chao-game-root .pn-mentor-dialogue {
    flex: 1;
    color: #333;
    font-size: 15px;
    line-height: 1.6;
}

/* ===== 任务卡片 ===== */
#chao-game-root #pn-task-card-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chao-game-root .pn-task-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

#chao-game-root .pn-task-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

#chao-game-root .pn-task-card-body h4 {
    margin: 0 0 15px 0;
    font-size: 22px;
    color: #333;
}

#chao-game-root .pn-task-dialogue {
    font-size: 16px;
    color: #555;
    font-style: italic;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

#chao-game-root .pn-task-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

#chao-game-root .pn-task-reward {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px;
    color: #856404;
    font-size: 14px;
    margin-bottom: 20px;
}

#chao-game-root .pn-task-card-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ===== 成就通知 ===== */
#chao-game-root .pn-achievement-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    border: 2px solid #4caf50;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
#chao-game-root from {
        transform: translateX(100%);
        opacity: 0;
    }
#chao-game-root to {
        transform: translateX(0);
        opacity: 1;
    }
}

#chao-game-root .pn-achievement-icon {
    font-size: 40px;
    flex-shrink: 0;
}

#chao-game-root .pn-achievement-text {
    flex: 1;
    color: #333;
}

#chao-game-root .pn-achievement-text strong {
    display: block;
    font-size: 16px;
    margin-bottom: 5px;
    color: #4caf50;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
#chao-game-root .pn-mentor-options {
        grid-template-columns: 1fr;
    }
    
#chao-game-root .pn-mode-selection {
        flex-direction: column;
    }
    
#chao-game-root .pn-mode-btn {
        max-width: 100%;
    }
    
#chao-game-root .pn-task-card {
        width: 95%;
        padding: 20px;
    }
    
#chao-game-root .pn-achievement-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}






