<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Science Quiz - Final Assessment</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.min.js"></script>
    <style>
        body {
            font-family: Arial, sans-serif;
            max-width: 1000px;
            margin: 20px auto;
            padding: 20px;
            background: #f0f0f0;
            color: #333;
        }

        .header {
            background: #fff;
            padding: 20px;
            border-radius: 8px;
            margin-bottom: 20px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .progress-bar {
            width: 100%;
            height: 10px;
            background: #ddd;
            border-radius: 5px;
            margin: 20px 0;
        }

        .progress {
            height: 100%;
            background: #4CAF50;
            width: 0;
            transition: width 0.3s ease;
        }

        .question-box {
            background: #fff;
            padding: 25px;
            margin: 20px 0;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .option-btn {
            display: block;
            width: 100%;
            padding: 15px;
            margin: 10px 0;
            border: 2px solid #ddd;
            border-radius: 5px;
            cursor: pointer;
            text-align: left;
            background: #fff;
        }

        .option-btn.selected {
            border-color: #4CAF50;
            background: #f8fff8;
        }

        .nav-buttons {
            display: flex;
            justify-content: space-between;
            margin-top: 25px;
            gap: 10px;
        }

        button {
            padding: 12px 25px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 16px;
        }

        .timer {
            font-size: 18px;
            color: #d32f2f;
            font-weight: bold;
        }

        .student-info {
            background: #fff;
            padding: 20px;
            border-radius: 8px;
            margin-bottom: 20px;
        }

        .result-section {
            background: #fff;
            padding: 25px;
            border-radius: 8px;
            display: none;
        }

        .question-review {
            margin: 15px 0;
            padding: 15px;
            border: 1px solid #eee;
            border-radius: 5px;
        }

        .correct { background: #e8f5e9; }
        .incorrect { background: #ffebee; }
        .skipped { background: #fff3e0; }

        .question-numbers-bar {
            display: flex;
            overflow-x: auto;
            gap: 5px;
            padding: 10px 0;
            margin: 15px 0;
        }

        .q-number {
            min-width: 35px;
            height: 35px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .q-number.current {
            background: #2196F3;
            color: white;
        }

        .q-number.answered {
            background: #4CAF50;
            color: white;
        }

        .q-number.unanswered {
            background: #ddd;
            color: #666;
        }

        .pdf-buttons {
            margin-top: 20px;
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }
    </style>
</head>
<body>
    <div class="header">
        <h1>Biology 31 jan 2025</h1>
        <div class="timer" id="timer">Time: 20:00</div>
    </div>

    <div class="student-info" id="student-info">
        <h2>Student Details</h2>
        <input type="text" id="student-name" placeholder="Enter your name" style="width: 300px; padding: 8px;">
        <button onclick="startQuiz()" style="background: #4CAF50; color: white;">Start Quiz</button>
    </div>

    <div id="quiz" style="display: none;">
        <div class="progress-bar">
            <div class="progress" id="progress"></div>
        </div>
        
        <div class="question-numbers-bar" id="question-numbers"></div>

        <div id="question-container"></div>
        
        <div class="nav-buttons">
            <button onclick="prevQuestion()" id="prev-btn" style="background: #607D8B; color: white;">Previous</button>
            <div>
                <button onclick="showResult()" id="submit-btn" style="background: #d32f2f; color: white; margin-right: 10px;">Submit</button>
                <button onclick="nextQuestion()" id="next-btn" style="background: #4CAF50; color: white;">Next</button>
            </div>
        </div>
    </div>

    <div class="result-section" id="result">
        <h2>Detailed Result Analysis</h2>
        <div id="result-summary"></div>
        <div id="detailed-analysis"></div>
        
        <div class="pdf-buttons">
            <button onclick="generatePDF()" style="background: #d32f2f; color: white;">Download PDF</button>
            <button onclick="shareToWhatsApp()" style="background: #25D366; color: white;">Share via WhatsApp</button>
            <button onclick="location.reload()" style="background: #2196F3; color: white;">Retake Test</button>
        </div>
    </div>

<script>
var quizData = {
    studentName: "",
    startTime: null,
    endTime: null,
    answers: [],
    questions: [
        {
    question: "Which part of the flower develops into a fruit?",
    options: ["Sepal", "Petal", "Ovary", "Stamen"],
    answer: "Ovary"
  },
  {
    question: "The transfer of pollen grains from anther to stigma is called:",
    options: ["Fertilization", "Pollination", "Germination", "Reproduction"],
    answer: "Pollination"
  },
  {
    question: "Which of these is not a part of a flower?",
    options: ["Sepal", "Petal", "Root", "Stamen"],
    answer: "Root"
  },
  {
    question: "The protective covering of a seed is called:",
    options: ["Seed coat", "Embryo", "Cotyledon", "Plumule"],
    answer: "Seed coat"
  },
  {
    question: "What is the main function of fruits?",
    options: ["Protect seeds", "Produce oxygen", "Absorb water", "Make flowers"],
    answer: "Protect seeds"
  },
  {
    question: "Which part of the seed grows into a new plant?",
    options: ["Seed coat", "Cotyledon", "Embryo", "Endosperm"],
    answer: "Embryo"
  },
  {
    question: "Mango is an example of:",
    options: ["Dry fruit", "Multiple fruit", "Simple fleshy fruit", "Aggregate fruit"],
    answer: "Simple fleshy fruit"
  },
  {
    question: "The male reproductive part of a flower is:",
    options: ["Pistil", "Stamen", "Petal", "Sepal"],
    answer: "Stamen"
  },
  {
    question: "Which of these is not a function of sepals?",
    options: ["Protection", "Photosynthesis", "Pollination", "Support"],
    answer: "Pollination"
  },
  {
    question: "The process of seed growing into a seedling is called:",
    options: ["Pollination", "Fertilization", "Germination", "Reproduction"],
    answer: "Germination"
  },
  {
    question: "Coconut is an example of:",
    options: ["Berry", "Drupe", "Nut", "Legume"],
    answer: "Drupe"
  },
  {
    question: "Which part stores food in seeds?",
    options: ["Seed coat", "Plumule", "Cotyledon", "Radicle"],
    answer: "Cotyledon"
  },
  {
    question: "The female reproductive part of a flower is:",
    options: ["Stamen", "Pistil", "Petal", "Sepal"],
    answer: "Pistil"
  },
  {
    question: "What helps in the dispersal of seeds?",
    options: ["Roots", "Stems", "Fruits", "Leaves"],
    answer: "Fruits"
  },
  {
    question: "Which of these is not a type of fruit?",
    options: ["Drupe", "Berry", "Legume", "Flower"],
    answer: "Flower"
  },
  {
    question: "Peas and beans are examples of:",
    options: ["Berries", "Nuts", "Legumes", "Drupes"],
    answer: "Legumes"
  },
  {
    question: "What is the function of pollen grains?",
    options: ["Produce seeds", "Male gametes", "Female gametes", "Make fruits"],
    answer: "Male gametes"
  },
  {
    question: "The part of pistil that receives pollen is:",
    options: ["Style", "Ovary", "Stigma", "Filament"],
    answer: "Stigma"
  },
  {
    question: "Which of these is essential for seed formation?",
    options: ["Sepals", "Petals", "Fertilization", "Leaves"],
    answer: "Fertilization"
  },
  {
    question: "What type of fruit is an apple?",
    options: ["True fruit", "False fruit", "Aggregate fruit", "Multiple fruit"],
    answer: "False fruit"
  },

  // Chapter 2: Human Circulatory System
  {
    question: "The human heart has how many chambers?",
    options: ["Two", "Three", "Four", "Five"],
    answer: "Four"
  },
  {
    question: "Which blood vessel carries oxygenated blood from the heart?",
    options: ["Veins", "Arteries", "Capillaries", "Venules"],
    answer: "Arteries"
  },
  {
    question: "What is the main function of red blood cells?",
    options: ["Fight infection", "Carry oxygen", "Clot blood", "Produce antibodies"],
    answer: "Carry oxygen"
  },
  {
    question: "The liquid part of blood is called:",
    options: ["Plasma", "Serum", "Hemoglobin", "Lymph"],
    answer: "Plasma"
  },
  {
    question: "Which chamber of the heart pumps blood to the lungs?",
    options: ["Left atrium", "Right atrium", "Left ventricle", "Right ventricle"],
    answer: "Right ventricle"
  },
  {
    question: "What is the function of white blood cells?",
    options: ["Carry oxygen", "Fight infection", "Clot blood", "Transport nutrients"],
    answer: "Fight infection"
  },
  {
    question: "The heartbeat sound 'lub-dub' is caused by:",
    options: ["Valve opening", "Valve closing", "Blood flow", "Heart muscles"],
    answer: "Valve closing"
  },
  {
    question: "Which blood vessels have the thinnest walls?",
    options: ["Arteries", "Veins", "Capillaries", "Arterioles"],
    answer: "Capillaries"
  },
  {
    question: "What is the normal heart rate of a healthy adult at rest?",
    options: ["60-100 beats/min", "40-60 beats/min", "100-120 beats/min", "120-140 beats/min"],
    answer: "60-100 beats/min"
  },
  {
    question: "Platelets are responsible for:",
    options: ["Fighting infection", "Carrying oxygen", "Blood clotting", "Producing hormones"],
    answer: "Blood clotting"
  },
  {
    question: "The main artery leaving the heart is called:",
    options: ["Vena cava", "Aorta", "Pulmonary artery", "Coronary artery"],
    answer: "Aorta"
  },
  {
    question: "Which type of blood vessel returns blood to the heart?",
    options: ["Arteries", "Veins", "Capillaries", "Arterioles"],
    answer: "Veins"
  },
  {
    question: "The circulation between heart and lungs is called:",
    options: ["Systemic circulation", "Pulmonary circulation", "Coronary circulation", "Portal circulation"],
    answer: "Pulmonary circulation"
  },
  {
    question: "What separates the right and left sides of the heart?",
    options: ["Septum", "Valve", "Artery", "Vein"],
    answer: "Septum"
  },
  {
    question: "Blood pressure is measured in:",
    options: ["mmHg", "Pascal", "Bar", "PSI"],
    answer: "mmHg"
  },
  {
    question: "Which blood cells are also called thrombocytes?",
    options: ["Red blood cells", "White blood cells", "Platelets", "Plasma cells"],
    answer: "Platelets"
  },
  {
    question: "The heart muscle is called:",
    options: ["Cardiac muscle", "Smooth muscle", "Skeletal muscle", "Striated muscle"],
    answer: "Cardiac muscle"
  },
  {
    question: "What prevents backflow of blood in veins?",
    options: ["Valves", "Muscles", "Pressure", "Capillaries"],
    answer: "Valves"
  },
  {
    question: "Which chamber receives oxygenated blood from lungs?",
    options: ["Right atrium", "Left atrium", "Right ventricle", "Left ventricle"],
    answer: "Left atrium"
  },
  {
    question: "The study of heart and blood vessels is called:",
    options: ["Neurology", "Cardiology", "Hematology", "Oncology"],
    answer: "Cardiology"
  },

  // Chapter 3: Human Digestive System
  {
    question: "The process of breaking down food into simpler forms is called:",
    options: ["Ingestion", "Digestion", "Absorption", "Assimilation"],
    answer: "Digestion"
  },
  {
    question: "Which organ produces bile?",
    options: ["Stomach", "Pancreas", "Liver", "Small intestine"],
    answer: "Liver"
  },
  {
    question: "The longest part of the digestive system is:",
    options: ["Esophagus", "Stomach", "Small intestine", "Large intestine"],
    answer: "Small intestine"
  },
  {
    question: "What is the function of saliva?",
    options: ["Break down proteins", "Break down fats", "Break down starch", "Break down vitamins"],
    answer: "Break down starch"
  },
  {
    question: "Where does most nutrient absorption occur?",
    options: ["Stomach", "Small intestine", "Large intestine", "Esophagus"],
    answer: "Small intestine"
  },
  {
    question: "The tooth's hard white outer covering is called:",
    options: ["Dentine", "Pulp", "Enamel", "Root"],
    answer: "Enamel"
  },
  {
    question: "Which organ stores bile?",
    options: ["Liver", "Gallbladder", "Pancreas", "Stomach"],
    answer: "Gallbladder"
  },
  {
    question: "Peristalsis is:",
    options: ["Food absorption", "Muscle contractions", "Enzyme production", "Waste removal"],
    answer: "Muscle contractions"
  },
  {
    question: "The first part of the small intestine is:",
    options: ["Ileum", "Jejunum", "Duodenum", "Cecum"],
    answer: "Duodenum"
  },
  {
    question: "Which organ produces insulin?",
    options: ["Liver", "Stomach", "Pancreas", "Gallbladder"],
    answer: "Pancreas"
  },
  {
    question: "The process of swallowing is called:",
    options: ["Ingestion", "Deglutition", "Peristalsis", "Absorption"],
    answer: "Deglutition"
  },
  {
    question: "What is the function of hydrochloric acid in the stomach?",
    options: ["Kill bacteria", "Break down fats", "Absorb nutrients", "Produce enzymes"],
    answer: "Kill bacteria"
  },
  {
    question: "The appendix is attached to the:",
    options: ["Small intestine", "Large intestine", "Stomach", "Esophagus"],
    answer: "Large intestine"
  },
  {
    question: "Which of these is not a digestive enzyme?",
    options: ["Amylase", "Pepsin", "Insulin", "Lipase"],
    answer: "Insulin"
  },
  {
    question: "The end product of protein digestion is:",
    options: ["Fatty acids", "Amino acids", "Glucose", "Glycerol"],
    answer: "Amino acids"
  },
  {
    question: "Villi are found in the:",
    options: ["Stomach", "Small intestine", "Large intestine", "Esophagus"],
    answer: "Small intestine"
  },
  {
    question: "Which vitamin is produced by intestinal bacteria?",
    options: ["Vitamin A", "Vitamin B", "Vitamin K", "Vitamin C"],
    answer: "Vitamin K"
  },
  {
    question: "The muscular opening at the end of the stomach is called:",
    options: ["Cardiac sphincter", "Pyloric sphincter", "Anal sphincter", "Esophageal sphincter"],
    answer: "Pyloric sphincter"
  },
  {
    question: "What is the main function of the large intestine?",
    options: ["Digest proteins", "Absorb nutrients", "Absorb water", "Produce enzymes"],
    answer: "Absorb water"
  },
  {
    question: "Which organ produces digestive enzymes?",
    options: ["Liver", "Gallbladder", "Pancreas", "Small intestine"],
    answer: "Pancreas"
  }

        // Add remaining questions here...
    ]
};

var currentQuestion = 0;
var timeLeft = 1200;
var timerId;

function startQuiz() {
    var name = document.getElementById('student-name').value;
    if (!name) return alert("Please enter your name");
    
    quizData.studentName = name;
    quizData.startTime = new Date();
    
    document.getElementById('student-info').style.display = 'none';
    document.getElementById('quiz').style.display = 'block';
    
    startTimer();
    showQuestion();
    updateQuestionNumbers();
}

function startTimer() {
    timerId = setInterval(function() {
        timeLeft--;
        var minutes = Math.floor(timeLeft / 60);
        var seconds = timeLeft % 60;
        document.getElementById('timer').textContent = 
            "Time: " + (minutes < 10 ? "0" : "") + minutes + ":" + (seconds < 10 ? "0" : "") + seconds;
        
        if (timeLeft <= 0) showResult();
    }, 1000);
}

function updateQuestionNumbers() {
    var numbersHTML = '';
    for (var i = 0; i < quizData.questions.length; i++) {
        var status = '';
        if (i === currentQuestion) {
            status = 'current';
        } else if (typeof quizData.answers[i] !== 'undefined') {
            status = 'answered';
        } else {
            status = 'unanswered';
        }
        numbersHTML += '<button class="q-number ' + status + '" onclick="jumpToQuestion(' + i + ')">' + (i + 1) + '</button>';
    }
    document.getElementById('question-numbers').innerHTML = numbersHTML;
}

function jumpToQuestion(index) {
    if (index >= 0 && index < quizData.questions.length) {
        currentQuestion = index;
        showQuestion();
        updateQuestionNumbers();
    }
}
function nextQuestion() {
    if (currentQuestion < quizData.questions.length - 1) {
        currentQuestion++;
        showQuestion();
        updateQuestionNumbers();
    }
}

function prevQuestion() {
    if (currentQuestion > 0) {
        currentQuestion--;
        showQuestion();
        updateQuestionNumbers();
    }
}

function showQuestion() {
    var question = quizData.questions[currentQuestion];
    var html = '<div class="question-box">';
    html += '<h3>Question ' + (currentQuestion + 1) + ' of ' + quizData.questions.length + '</h3>';
    html += '<p>' + question.question + '</p>';
    
    question.options.forEach((option, index) => {
        var isSelected = quizData.answers[currentQuestion] === option ? "selected" : "";
        html += `<button class="option-btn ${isSelected}" onclick="selectAnswer(${currentQuestion}, '${option}')">${option}</button>`;
    });

    html += '</div>';
    document.getElementById('question-container').innerHTML = html;

    // Update button visibility
    document.getElementById('prev-btn').style.display = currentQuestion === 0 ? 'none' : 'inline-block';
    document.getElementById('next-btn').style.display = currentQuestion === quizData.questions.length - 1 ? 'none' : 'inline-block';
}

function selectAnswer(questionIndex, answer) {
    quizData.answers[questionIndex] = answer;
    showQuestion();
    updateQuestionNumbers();
}

// Submit button at the beginning
document.getElementById('submit-btn').addEventListener('click', showResult);

function showQuestion() {
    var question = quizData.questions[currentQuestion];
    var html = '<div class="question-box">';
    html += '<h3>Question ' + (currentQuestion + 1) + ' of ' + quizData.questions.length + '</h3>';
    html += '<p>' + question.question + '</p>';
    
    for (var i = 0; i < question.options.length; i++) {
        var selected = quizData.answers[currentQuestion] === i ? ' selected' : '';
        html += '<div class="option-btn' + selected + '" onclick="selectAnswer(' + i + ')">' +
                String.fromCharCode(65 + i) + '. ' + question.options[i] + '</div>';
    }
    
    html += '</div>';
    document.getElementById('question-container').innerHTML = html;
    
    var progress = (currentQuestion + 1) / quizData.questions.length * 100;
    document.getElementById('progress').style.width = progress + '%';
    
    document.getElementById('prev-btn').disabled = currentQuestion === 0;
    updateQuestionNumbers();
}

function selectAnswer(index) {
    quizData.answers[currentQuestion] = index;
    updateQuestionNumbers();
    showQuestion();
}

function showResult() {
    if (!confirm("Are you sure you want to submit the quiz?")) return;
    
    clearInterval(timerId);
    quizData.endTime = new Date();
    
    document.getElementById('quiz').style.display = 'none';
    document.getElementById('result').style.display = 'block';
    
    var correct = 0;
    var analysisHTML = '<h3>Question-wise Analysis:</h3>';
    
    for (var i = 0; i < quizData.questions.length; i++) {
        var question = quizData.questions[i];
        var userAnswer = quizData.answers[i];
        var statusClass = '';
        var statusText = '';
        
        if (typeof userAnswer === 'undefined') {
            statusClass = 'skipped';
            statusText = 'Skipped';
        } else if (question.options[userAnswer] === question.answer) {
            correct++;
            statusClass = 'correct';
            statusText = 'Correct';
        } else {
            statusClass = 'incorrect';
            statusText = 'Incorrect';
        }
        
        analysisHTML += '<div class="question-review ' + statusClass + '">' +
            '<p><strong>Question ' + (i + 1) + ':</strong> ' + question.question + '</p>' +
            '<p>Your Answer: ' + (typeof userAnswer !== 'undefined' ? 
                String.fromCharCode(65 + userAnswer) + '. ' + question.options[userAnswer] : 'Not answered') + '</p>' +
            '<p>Correct Answer: ' + String.fromCharCode(65 + question.options.indexOf(question.answer)) + 
            '. ' + question.answer + '</p>' +
            '<p>Status: ' + statusText + '</p></div>';
    }
    
    var timeTaken = Math.floor((quizData.endTime - quizData.startTime) / 1000);
    var minutes = Math.floor(timeTaken / 60);
    var seconds = timeTaken % 60;
    var avgTime = (timeTaken/quizData.questions.length).toFixed(1);
    
    var summaryHTML = '<div class="result-summary">' +
        '<h3>Student Name: ' + quizData.studentName + '</h3>' +
        '<p>Total Questions: ' + quizData.questions.length + '</p>' +
        '<p>Correct Answers: ' + correct + '</p>' +
        '<p>Score: ' + correct + '/' + quizData.questions.length + ' (' + 
        Math.round((correct / quizData.questions.length) * 100) + '%)</p>' +
        '<p>Total Time: ' + minutes + 'm ' + seconds + 's</p>' +
        '<p>Average Time per Question: ' + avgTime + ' seconds</p></div>';
    
    document.getElementById('result-summary').innerHTML = summaryHTML;
    document.getElementById('detailed-analysis').innerHTML = analysisHTML;
}

function generatePDF() {
    // Get current date and time
    var currentDateTime = new Date();
    var formattedDateTime = currentDateTime.toLocaleString();  // Formats as "MM/DD/YYYY, HH:mm:ss"

    var studentNameText = quizData.studentname ? 'Student Name: ' + quizData.studentname : '';
    
    // Define the content array for the PDF
    var contentArray = [
        { 
            text: 'Exam Result', 
            style: 'header' 
        },
        { 
            text: '--------------------------------------', 
            style: 'divider' 
        }
    ];

    // Add student name if available
    if (studentNameText) {
        contentArray.push({
            text: studentNameText, 
            style: 'studentName',
            margin: [0, 15]
        });
    }

    // Add the result summary
    contentArray.push(
        {
            text: document.getElementById('result-summary').innerText,
            style: 'resultSummary',
            margin: [0, 15]
        }
    );

    // Add detailed analysis header
    contentArray.push(
        {
            text: 'Detailed Analysis:',
            style: 'subheader',
            margin: [0, 10]
        },
        {
            ul: Array.from(document.querySelectorAll('.question-review')).map(q => ({
                text: q.innerText,
                style: 'questionReviewItem',
                margin: [0, 5]
            })),
            margin: [0, 10]
        }
    );

    // Define styles for the PDF content
    var docDefinition = {
        content: contentArray,
        styles: {
            header: {
                fontSize: 22,
                bold: true,
                alignment: 'center',
                color: '#2E3D49'
            },
            subheader: {
                fontSize: 16,
                bold: true,
                margin: [0, 10],
                color: '#1F2C38'
            },
            studentName: {
                fontSize: 14,
                italics: true,
                margin: [0, 10],
                alignment: 'center',
                color: '#4C5C68'
            },
            resultSummary: {
                fontSize: 14,
                margin: [0, 10],
                color: '#333'
            },
            questionReviewItem: {
                fontSize: 12,
                margin: [0, 5],
                color: '#555'
            },
            divider: {
                fontSize: 1,
                margin: [0, 15],
                color: '#E1E1E1',
                alignment: 'center'
            },
            footer: {
                fontSize: 10,
                color: '#777',
                alignment: 'center'
            }
        },
        pageMargins: [40, 60, 40, 60], // Margins for a neat appearance
        footer: function(currentPage, pageCount) {
            return [
                {
                    text: formattedDateTime,
                    alignment: 'center',
                    style: 'footer',
                    margin: [0, 10]
                },
                {
                    text: currentPage + ' of ' + pageCount,
                    alignment: 'center',
                    style: 'footer'
                }
            ];
        }
    };

    // Create the PDF and trigger the download
    if (navigator.userAgent.match(/Android/i)) {
        // For mobile platforms
        pdfMake.createPdf(docDefinition).download('Exam-Result.pdf');
    } else {
        // For other platforms (macOS, Linux)
        pdfMake.createPdf(docDefinition).open();
    }
}


function shareToWhatsApp() {
    var summary = document.getElementById('result-summary').innerText;
    var message = encodeURIComponent(
        "Exam Result:\n" + summary + ""
    );
    window.open('https://wa.me/?text=' + message, '_blank');
}
</script>
</body>
</html>
