<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>InstantQuestions Generator</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="main-container">
        <div class="form-card">
            <div class="card-header">
                <h1>InstantQuestions</h1>
                <p>Generate WAEC/NECO style exam papers instantly.</p>
            </div>

            <form action="/generate" method="post">
                <div class="form-grid">
                    <div class="form-group full-width">
                        <label for="school_name">School Name</label>
                        <input type="text" id="school_name" name="school_name" placeholder="e.g., Prestige International School">
                    </div>

                    <div class="form-group">
                        <label for="term">Term</label>
                        <input type="text" id="term" name="term" placeholder="e.g., First Term">
                    </div>

                    <div class="form-group">
                        <label for="subject">Subject</label>
                        <input type="text" id="subject" name="subject" placeholder="e.g., Mathematics" required>
                    </div>

                    <div class="form-group">
                        <label for="education_level">Education Level</label>
                        <input type="text" id="education_level" name="education_level" placeholder="e.g., S.S.C.E" value="S.S.C.E" required>
                    </div>

                    <div class="form-group">
                        <label for="exam_year">Exam Year</label>
                        <input type="text" id="exam_year" name="exam_year" placeholder="e.g., 2024" value="2024" required>
                    </div>

                    <div class="form-group">
                        <label for="duration">Exam Duration</label>
                        <input type="text" id="duration" name="duration" placeholder="e.g., 2 hours 30 minutes" value="2 hours 30 minutes" required>
                    </div>

                    <div class="form-group">
                        <label for="difficulty">Difficulty Level</label>
                        <select id="difficulty" name="difficulty">
                            <option value="Easy">Easy</option>
                            <option value="Medium" selected>Medium</option>
                            <option value="Hard">Hard</option>
                            <option value="Mixed">Mixed</option>
                        </select>
                    </div>

                    <div class="form-group full-width">
                        <label for="topics">Topics to cover (comma-separated)</label>
                        <textarea id="topics" name="topics" placeholder="e.g., Algebra, Geometry, Trigonometry"></textarea>
                    </div>

                    <div class="form-group full-width">
                        <label for="instructions">General Instructions</label>
                        <textarea id="instructions" name="instructions">Answer all questions in this section.</textarea>
                    </div>

                    <div class="form-group">
                        <label for="objective_count">Number of Objective Questions</label>
                        <input type="number" id="objective_count" name="objective_count" value="20" min="0" max="<?= MAX_OBJECTIVE ?>">
                    </div>

                    <div class="form-group">
                        <label for="theory_count">Number of Theory Questions</label>
                        <input type="number" id="theory_count" name="theory_count" value="3" min="0" max="<?= MAX_THEORY ?>">
                    </div>

                    <div class="form-group full-width">
                        <button type="submit" class="submit-button">Generate Exam</button>
                    </div>
                </div>
            </form>
        </div>
        <div class="footer">
            Developed by Polycarp Ukadilonu (cpcodes web)
        </div>
    </div>
</body>
</html>