<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Week 2 Reflection - Machine Learning Basics</title>
</head>
<body>

<div id="submission-form" style="font-family: Arial, sans-serif; max-width: 700px; margin: auto; padding: 20px;">
    <!-- Week Header -->
    <div style="background: #f8f9fa; border-left: 4px solid #6f42c1; padding: 15px; margin-bottom: 20px;">
        <h2 style="margin: 0; color: #6f42c1;">🔬 Week 2: Machine Learning Basics</h2>
        <p style="margin: 5px 0 0 0; color: #666;">Theme: Technical Analysis</p>
    </div>

    <!-- Progress Indicator -->
    <div style="background: #e9ecef; padding: 10px; border-radius: 5px; margin-bottom: 20px; text-align: center;">
        <strong>Your Progress:</strong> Week 2 of 12 | Building technical foundations 🛠️
    </div>

    <!-- Micro-credential Alert -->
    <div style="background: #f0e5ff; border: 1px solid #d4b5ff; padding: 15px; border-radius: 5px; margin-bottom: 20px;">
        <h4 style="margin: 0 0 5px 0; color: #6f42c1;">🏅 Micro-Credential Opportunity</h4>
        <p style="margin: 0; line-height: 1.5;">
            This reflection contributes to: <strong>🔬 Technical Analyst</strong><br>
            <small style="color: #666;">Complete 2 technical theme reflections to earn this credential!</small>
        </p>
    </div>

    <!-- Reflection Prompts -->
    <div style="background: #f0f8ff; border: 1px solid #cce5ff; padding: 15px; border-radius: 5px; margin-bottom: 20px;">
        <h4 style="margin: 0 0 10px 0; color: #004085;">💭 Reflection Prompts (choose one or more):</h4>
        <ul style="margin: 0; padding-left: 20px; line-height: 1.6;">
            <li>How would you explain machine learning to a non-technical friend?</li>
            <li>What surprised you about how machines 'learn'?</li>
            <li>Which ML algorithm concept was most challenging to understand?</li>
        </ul>
        <div style="margin-top: 10px; padding: 10px; background: #e7f3ff; border-radius: 5px;">
            <strong>💡 Technical Tip:</strong> Try to include specific examples or analogies to demonstrate your understanding.
        </div>
    </div>

    <!-- Student ID Input -->
    <div style="margin-bottom: 15px;">
        <label for="student_id" style="display: block; font-weight: bold; margin-bottom: 5px;">
            Student ID: <span style="color: red;">*</span>
        </label>
        <input 
            id="student_id" 
            type="text" 
            placeholder="Enter your Curtin Student ID"
            style="width: 100%; padding: 10px; border: 1px solid #ced4da; border-radius: 5px; font-size: 16px;"
            required
        />
    </div>

    <!-- Hidden Fields -->
    <input id="course_id" type="hidden" value="AI101" />
    <input id="week_id" type="hidden" value="Week02" />
    <input id="theme_id" type="hidden" value="technical" />

    <!-- Reflection Textarea -->
    <div style="margin-bottom: 15px;">
        <label for="reflection" style="display: block; font-weight: bold; margin-bottom: 5px;">
            Your Technical Reflection: <span style="color: red;">*</span>
        </label>
        <textarea 
            id="reflection" 
            rows="10" 
            placeholder="Analyze the technical concepts you learned about machine learning this week..."
            style="width: 100%; padding: 10px; border: 1px solid #ced4da; border-radius: 5px; font-size: 16px; resize: vertical;"
            required
        ></textarea>
    </div>

    <!-- Submit Button -->
    <div style="text-align: center; margin: 20px 0;">
        <button 
            onclick="BadgeQuest.submitReflection()" 
            style="background: #6f42c1; color: white; border: none; padding: 12px 30px; font-size: 16px; border-radius: 5px; cursor: pointer; font-weight: bold;"
            onmouseover="this.style.background='#5a32a3'" 
            onmouseout="this.style.background='#6f42c1'"
        >
            🔬 Submit Technical Analysis
        </button>
    </div>

    <!-- Result Container -->
    <div id="result" style="margin-top: 20px;"></div>

    <!-- Week Information -->
    <div style="background: #f8f9fa; border: 1px solid #dee2e6; padding: 15px; border-radius: 5px; margin-top: 30px;">
        <h4 style="margin: 0 0 10px 0;">ℹ️ About This Week's Theme</h4>
        <p style="margin: 0 0 10px 0; line-height: 1.6;">
            <strong>Technical Analysis</strong> reflections demonstrate your understanding of AI/ML concepts. 
            Focus on explaining technical ideas clearly, identifying connections between concepts, and showing 
            how you've grasped the underlying principles.
        </p>
        <p style="margin: 0; font-size: 0.9em; color: #666;">
            <strong>Requirements:</strong> Minimum 100 words | Include technical concepts | Demonstrate understanding
        </p>
    </div>

    <!-- Technical Resources -->
    <div style="background: #fff3cd; border: 1px solid #ffeaa7; padding: 15px; border-radius: 5px; margin-top: 15px;">
        <h4 style="margin: 0 0 10px 0;">📚 Key Concepts to Consider</h4>
        <ul style="margin: 0; padding-left: 20px; font-size: 0.9em;">
            <li>Supervised vs. Unsupervised Learning</li>
            <li>Training Data and Test Data</li>
            <li>Overfitting and Underfitting</li>
            <li>Algorithm Selection</li>
        </ul>
    </div>
</div>

<!-- Include BadgeQuest Library -->
<script src="badgequest_lib.js"></script>
<script>
// Initialize form with week-specific configuration
BadgeQuest.init(2, 'Week02', 'technical', 'Technical Analysis');

// Week-specific enhancements
document.addEventListener('DOMContentLoaded', function() {
    // Check if they completed Week 1
    const week1Submitted = localStorage.getItem('badgequest_submitted_Week01');
    if (!week1Submitted) {
        const reminder = document.createElement('div');
        reminder.style.cssText = 'background: #fff3cd; border: 1px solid #ffeaa7; padding: 10px; margin-bottom: 15px; border-radius: 5px;';
        reminder.innerHTML = '💡 <strong>Reminder:</strong> Don\'t forget to submit your Week 1 reflection if you haven\'t already!';
        document.querySelector('#submission-form').prepend(reminder);
    }
});
</script>

</body>
</html>