This is a complex request for a genomic newborn screening parent consent education suite. Let me break down what's needed:
- Interactive modules - Educational content about genomic newborn screening
- Q&A overlays - Question and answer popups/overlays for clarification
- Certification - A completion certificate system
This needs to be:
- Educational and professional looking
- Interactive with meaningful engagement
- Have clear visual hierarchy
- Be well-animated and dynamic
- Single HTML file with Three.js for any 3D elements
Let me design this:
Design Concept:
- Clean, medical/scientific aesthetic with warm, approachable colors (not cold hospital blues)
- Use soft greens, warm whites, and coral accents for a friendly but professional feel
- DNA helix as a 3D background element using Three.js
- Progress tracking through modules
- Interactive quizzes with overlays
- Final certification with personalized name entry
Structure:
- Welcome/Landing section with animated 3D DNA
- Multiple learning modules (What is genomic screening, Benefits, Risks, Process, Privacy)
- Each module has interactive elements and Q&A overlays
- Progress bar tracking completion
- Quiz section
- Certification generation
Technical Implementation:
- Three.js for DNA helix background animation
- CSS animations for transitions
- JavaScript for module navigation, quiz logic, and certification
- Local storage for progress saving
Let me code this:
Genomic Newborn Screening Parent Consent Education Suite
Design Approach
I'll create a comprehensive educational platform with:
- 3D DNA Helix Background - Animated Three.js visualization representing genomics
- 5 Interactive Learning Modules - Covering screening basics, benefits, risks, process, and privacy
- Q&A Overlays - Clickable question buttons that reveal detailed answers
- Knowledge Check Quizzes - Interactive questions after each module
- Certification System - Personalized certificate upon completion
- Progress Tracking - Visual progress bar and module completion states
Color Palette: Warm sage greens, coral accents, and cream backgrounds - professional yet approachable for new parents.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Genomic Newborn Screening - Parent Education Suite</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--sage-dark: #2d5a47;
--sage-medium: #4a7c59;
--sage-light: #7fb069;
--sage-pale: #e8f5e9;
--coral: #e07a5f;
--coral-dark: #c45c3e;
--cream: #faf9f6;
--charcoal: #2d3436;
--slate: #636e72;
}
body {
font-family: 'Segoe UI', system-ui, sans-serif;
background: var(--cream);
color: var(--charcoal);
overflow-x: hidden;
line-height: 1.6;
}
#canvas-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
opacity: 0.15;
}
.app-container {
min-height: 100vh;
position: relative;
}
/* Header */
.header {
background: linear-gradient(135deg, var(--sage-dark) 0%, var(--sage-medium) 100%);
padding: 1rem 2rem;
position: sticky;
top: 0;
z-index: 100;
box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.header-content {
max-width: 1400px;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
display: flex;
align-items: center;
gap: 1rem;
}
.logo-icon {
width: 50px;
height: 50px;
background: rgba(255,255,255,0.2);
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
}
.logo-text h1 {
color: white;
font-size: 1.3rem;
font-weight: 600;
}
.logo-text p {
color: rgba(255,255,255,0.8);
font-size: 0.8rem;
}
.progress-container {
display: flex;
align-items: center;
gap: 1rem;
}
.progress-bar {
width: 200px;
height: 8px;
background: rgba(255,255,255,0.2);
border-radius: 4px;
overflow: hidden;
}
.progress-fill {
height: 100%;
background: var(--coral);
border-radius: 4px;
transition: width 0.5s ease;
width: 0%;
}
.progress-text {
color: white;
font-size: 0.9rem;
font-weight: 500;
}
/* Main Content */
.main-content {
max-width: 1200px;
margin: 0 auto;
padding: 2rem;
}
/* Welcome Section */
.welcome-section {
text-align: center;
padding: 3rem 2rem;
background: white;
border-radius: 24px;
margin-bottom: 2rem;
box-shadow: 0 10px 40px rgba(45,90,71,0.1);
position: relative;
overflow: hidden;
}
.welcome-section::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 6px;
background: linear-gradient(90deg, var(--sage-light), var(--coral), var(--sage-light));
}
.welcome-badge {
display: inline-block;
background: var(--sage-pale);
color: var(--sage-dark);
padding: 0.5rem 1.5rem;
border-radius: 30px;
font-size: 0.85rem;
font-weight: 600;
margin-bottom: 1.5rem;
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.02); }
}
.welcome-section h2 {
font-size: 2.5rem;
color: var(--sage-dark);
margin-bottom: 1rem;
}
.welcome-section p {
font-size: 1.1rem;
color: var(--slate);
max-width: 700px;
margin: 0 auto 2rem;
}
.start-btn {
background: linear-gradient(135deg, var(--coral) 0%, var(--coral-dark) 100%);
color: white;
border: none;
padding: 1rem 3rem;
font-size: 1.1rem;
font-weight: 600;
border-radius: 50px;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 6px 20px rgba(224,122,95,0.4);
}
.start-btn:hover {
transform: translateY(-3px);
box-shadow: 0 10px 30px rgba(224,122,95,0.5);
}
/* Module Navigation */
.module-nav {
display: flex;
gap: 0.5rem;
margin-bottom: 2rem;
flex-wrap: wrap;
justify-content: center;
}
.module-tab {
background: white;
border: 2px solid var(--sage-pale);
padding: 0.8rem 1.5rem;
border-radius: 12px;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
gap: 0.5rem;
font-weight: 500;
}
.module-tab:hover {
border-color: var(--sage-light);
transform: translateY(-2px);
}
.module-tab.active {
background: var(--sage-dark);
color: white;
border-color: var(--sage-dark);
}
.module-tab.completed {
background: var(--sage-light);
color: white;
border-color: var(--sage-light);
}
.tab-number {
width: 28px;
height: 28px;
background: rgba(0,0,0,0.1);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.85rem;
}
.module-tab.completed .tab-number {
background: rgba(255,255,255,0.3);
}
/* Module Content */
.module-content {
display: none;
animation: fadeSlideIn 0.5s ease;
}
.module-content.active {
display: block;
}
@keyframes fadeSlideIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.content-card {
background: white;
border-radius: 20px;
padding: 2.5rem;
box-shadow: 0 8px 30px rgba(45,90,71,0.08);
margin-bottom: 1.5rem;
}
.content-card h3 {
color: var(--sage-dark);
font-size: 1.6rem;
margin-bottom: 1rem;
display: flex;
align-items: center;
gap: 0.75rem;
}
.content-card h3 .icon {
width: 40px;
height: 40px;
background: var(--sage-pale);
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.2rem;
}
.content-card p {
color: var(--slate);
margin-bottom: 1rem;
font-size: 1.05rem;
}
.highlight-box {
background: var(--sage-pale);
border-left: 4px solid var(--sage-medium);
padding: 1rem 1.5rem;
border-radius: 0 12px 12px 0;
margin: 1.5rem 0;
}
.highlight-box h4 {
color: var(--sage-dark);
margin-bottom: 0.5rem;
}
/* Q&A Buttons */
.qa-section {
margin-top: 2rem;
}
.qa-section h4 {
color: var(--sage-dark);
margin-bottom: 1rem;
font-size: 1.2rem;
}
.qa-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1rem;
}
.qa-btn {
background: linear-gradient(135deg, var(--cream) 0%, white 100%);
border: 2px solid var(--sage-pale);
padding: 1.2rem;
border-radius: 14px;
cursor: pointer;
transition: all 0.3s ease;
text-align: left;
}
.qa-btn:hover {
border-color: var(--coral);
transform: translateY(-3px);
box-shadow: 0 8px 25px rgba(224,122,95,0.15);
}
.qa-btn .question {
font-weight: 600;
color: var(--charcoal);
display: flex;
align-items: center;
gap: 0.5rem;
}
.qa-btn .question::before {
content: 'Q';
background: var(--coral);
color: white;
width: 24px;
height: 24px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.75rem;
flex-shrink: 0;
}
/* Q&A Overlay */
.overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.6);
display: none;
align-items: center;
justify-content: center;
z-index: 1000;
padding: 2rem;
backdrop-filter: blur(5px);
}
.overlay.active {
display: flex;
animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.overlay-content {
background: white;
border-radius: 24px;
max-width: 600px;
width: 100%;
max-height: 80vh;
overflow-y: auto;
position: relative;
animation: slideUp 0.4s ease;
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(50px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.overlay-header {
background: linear-gradient(135deg, var(--sage-dark) 0%, var(--sage-medium) 100%);
padding: 1.5rem 2rem;
border-radius: 24px 24px 0 0;
}
.overlay-header h3 {
color: white;
font-size: 1.2rem;
display: flex;
align-items: center;
gap: 0.75rem;
}
.overlay-close {
position: absolute;
top: 1rem;
right: 1rem;
background: rgba(255,255,255,0.2);
border: none;
width: 36px;
height: 36px;
border-radius: 50%;
cursor: pointer;
color: white;
font-size: 1.3rem;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
}
.overlay-close:hover {
background: rgba(255,255,255,0.3);
transform: rotate(90deg);
}
.overlay-body {
padding: 2rem;
}
.overlay-body .answer {
color: var(--slate);
font-size: 1.05rem;
line-height: 1.8;
}
.answer-highlight {
background: var(--sage-pale);
padding: 1rem;
border-radius: 12px;
margin-top: 1rem;
}
/* Quiz Section */
.quiz-container {
background: white;
border-radius: 20px;
padding: 2.5rem;
box-shadow: 0 8px 30px rgba(45,90,71,0.08);
}
.quiz-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 2rem;
padding-bottom: 1rem;
border-bottom: 2px solid var(--sage-pale);
}
.quiz-progress {
font-weight: 600;
color: var(--sage-dark);
}
.quiz-question {
font-size: 1.3rem;
color: var(--charcoal);
margin-bottom: 1.5rem;
}
.quiz-options {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.quiz-option {
background: var(--cream);
border: 2px solid transparent;
padding: 1rem 1.5rem;
border-radius: 12px;
cursor: pointer;
transition: all 0.3s ease;
text-align: left;
font-size: 1rem;
}
.quiz-option:hover {
border-color: var(--sage-light);
background: white;
}
.quiz-option.selected {
border-color: var(--sage-dark);
background: var(--sage-pale);
}
.quiz-option.correct {
border-color: var(--sage-light);
background: rgba(127, 176, 105, 0.2);
}
.quiz-option.incorrect {
border-color: var(--coral);
background: rgba(224, 122, 95, 0.2);
}
.quiz-feedback {
margin-top: 1.5rem;
padding: 1rem 1.5rem;
border-radius: 12px;
display: none;
}
.quiz-feedback.show {
display: block;
animation: fadeSlideIn 0.3s ease;
}
.quiz-feedback.correct {
background: rgba(127, 176, 105, 0.2);
color: var(--sage-dark);
}
.quiz-feedback.incorrect {
background: rgba(224, 122, 95, 0.2);
color: var(--coral-dark);
}
.quiz-nav {
display: flex;
gap: 1rem;
margin-top: 2rem;
}
.quiz-btn {
padding: 0.8rem 2rem;
border-radius: 10px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
border: none;
}
.quiz-btn.primary {
background: var(--sage-dark);
color: white;
}
.quiz-btn.primary:hover {
background: var(--sage-medium);
}
.quiz-btn.secondary {
background: var(--cream);
color: var(--charcoal);
border: 2px solid var(--sage-pale);
}
.quiz-btn.secondary:hover {
border-color: var(--sage-light);
}
/* Certification Section */
.certification-section {
display: none;
text-align: center;
}
.certification-section.active {
display: block;
}
.cert-form {
background: white;
border-radius: 20px;
padding: 3rem;
box-shadow: 0 10px 40px rgba(45,90,71,0.1);
max-width: 500px;
margin: 0 auto 2rem;
}
.cert-form h3 {
color: var(--sage-dark);
margin-bottom: 0.5rem;
font-size: 1.5rem;
}
.cert-form p {
color: var(--slate);
margin-bottom: 2rem;
}
.form-group {
margin-bottom: 1.5rem;
text-align: left;
}
.form-group label {
display: block;
font-weight: 600;
color: var(--charcoal);
margin-bottom: 0.5rem;
}
.form-group input {
width: 100%;
padding: 1rem;
border: 2px solid var(--sage-pale);
border-radius: 12px;
font-size: 1rem;
transition: all 0.3s ease;
}
.form-group input:focus {
outline: none;
border-color: var(--sage-medium);
box-shadow: 0 0 0 4px rgba(74,124,89,0.1);
}
.generate-cert-btn {
background: linear-gradient(135deg, var(--coral) 0%, var(--coral-dark) 100%);
color: white;
border: none;
padding: 1rem 3rem;
font-size: 1.1rem;
font-weight: 600;
border-radius: 50px;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 6px 20px rgba(224,122,95,0.4);
width: 100%;
}
.generate-cert-btn:hover {
transform: translateY(-3px);
box-shadow: 0 10px 30px rgba(224,122,95,0.5);
}
/* Certificate */
.certificate {
background: linear-gradient(135deg, #fff 0%, var(--cream) 100%);
border: 3px solid var(--sage-dark);
border-radius: 20px;
padding: 3rem;
max-width: 700px;
margin: 0 auto;
position: relative;
display: none;
box-shadow: 0 15px 50px rgba(45,90,71,0.15);
}
.certificate.show {
display: block;
animation: certReveal 0.8s ease;
}
@keyframes certReveal {
from {
opacity: 0;
transform: scale(0.8) rotateX(20deg);
}
to {
opacity: 1;
transform: scale(1) rotateX(0);
}
}
.certificate::before {
content: '';
position: absolute;
top: 10px;
left: 10px;
right: 10px;
bottom: 10px;
border: 2px solid var(--sage-light);
border-radius: 14px;
pointer-events: none;
}
.cert-header {
text-align: center;
margin-bottom: 2rem;
}
.cert-badge {
width: 80px;
height: 80px;
background: linear-gradient(135deg, var(--sage-medium) 0%, var(--sage-dark) 100%);
border-radius: 50%;
margin: 0 auto 1rem;
display: flex;
align-items: center;
justify-content: center;
font-size: 2rem;
color: white;
}
.cert-title {
font-size: 1.8rem;
color: var(--sage-dark);
margin-bottom: 0.5rem;
}
.cert-subtitle {
color: var(--slate);
font-size: 1rem;
}
.cert-body {
text-align: center;
margin-bottom: 2rem;
}
.cert-body p {
color: var(--slate);
margin-bottom: 0.5rem;
font-size: 1.1rem;
}
.cert-name {
font-size: 2rem;
color: var(--charcoal);
font-weight: 700;
margin: 1rem 0;
font-family: 'Georgia', serif;
}
.cert-course {
background: var(--sage-pale);
padding: 0.5rem 1.5rem;
border-radius: 30px;
display: inline-block;
color: var(--sage-dark);
font-weight: 600;
}
.cert-footer {
display: flex;
justify-content: space-around;
margin-top: 2rem;
padding-top: 1.5rem;
border-top: 1px solid var(--sage-pale);
}
.cert-footer-item {
text-align: center;
}
.cert-footer-item .label {
font-size: 0.8rem;
color: var(--slate);
margin-bottom: 0.3rem;
}
.cert-footer-item .value {
font-weight: 600;
color: var(--sage-dark);
}
.print-btn {
background: var(--sage-dark);
color: white;
border: none;
padding: 0.8rem 2rem;
font-size: 1rem;
font-weight: 600;
border-radius: 10px;
cursor: pointer;
margin-top: 2rem;
transition: all 0.3s ease;
}
.print-btn:hover {
background: var(--sage-medium);
}
/* Floating particles */
.particle {
position: fixed;
width: 8px;
height: 8px;
background: var(--sage-light);
border-radius: 50%;
pointer-events: none;
z-index: -1;
opacity: 0.4;
animation: float 15s infinite ease-in-out;
}
@keyframes float {
0%, 100% {
transform: translateY(100vh) rotate(0deg);
opacity: 0;
}
10% {
opacity: 0.4;
}
90% {
opacity: 0.4;
}
100% {
transform: translateY(-100vh) rotate(720deg);
opacity: 0;
}
}
/* Responsive */
@media (max-width: 768px) {
.header-content {
flex-direction: column;
gap: 1rem;
}
.progress-container {
width: 100%;
justify-content: center;
}
.welcome-section h2 {
font-size: 1.8rem;
}
.module-nav {
flex-direction: column;
}
.module-tab {
justify-content: center;
}
.content-card {
padding: 1.5rem;
}
.certificate {
padding: 2rem 1.5rem;
}
.cert-name {
font-size: 1.5rem;
}
}
</style>
</head>
<body>
<div id="canvas-container"></div>
<div class="app-container">
<!-- Header -->
<header class="header">
<div class="header-content">
<div class="logo">
<div class="logo-icon">
<svg width="28" height="28" viewBox="0 0 24 24" fill="white">
<path d="M12 2C13.1 2 14 2.9 14 4C14 4.74 13.6 5.39 13 5.73V7H14C17.31 7 20 9.69 20 13V20H4V13C4 9.69 6.69 7 10 7H11V5.73C10.4 5.39 10 4.74 10 4C10 2.9 10.9 2 12 2M8 13V18H10V13H8M11 13V18H13V13H11M14 13V18H16V13H14Z"/>
</svg>
</div>
<div class="logo-text">
<h1>Genomic Newborn Screening</h1>
<p>Parent Consent Education Suite</p>
</div>
</div>
<div class="progress-container">
<div class="progress-bar">
<div class="progress-fill" id="progressFill"></div>
</div>
<span class="progress-text" id="progressText">0% Complete</span>
</div>
</div>
</header>
<!-- Main Content -->
<main class="main-content">
<!-- Welcome Section -->
<section class="welcome-section" id="welcomeSection">
<span class="welcome-badge">Required Education Program</span>
<h2>Understanding Genomic Newborn Screening</h2>
<p>Welcome to our comprehensive education program designed to help you make an informed decision about genomic screening for your newborn. This interactive course will guide you through everything you need to know.</p>
<button class="start-btn" onclick="startLearning()">Begin Your Learning Journey</button>
</section>
<!-- Module Navigation -->
<nav class="module-nav" id="moduleNav" style="display: none;">
<button class="module-tab active" data-module="1" onclick="switchModule(1)">
<span class="tab-number">1</span>
What is Genomic Screening?
</button>
<button class="module-tab" data-module="2" onclick="switchModule(2)">
<span class="tab-number">2</span>
Benefits
</button>
<button class="module-tab" data-module="3" onclick="switchModule(3)">
<span class="tab-number">3</span>
Risks and Limitations
</button>
<button class="module-tab" data-module="4" onclick="switchModule(4)">
<span class="tab-number">4</span>
The Process
</button>
<button class="module-tab" data-module="5" onclick="switchModule(5)">
<span class="tab-number">5</span>
Privacy and Data
</button>
</nav>
<!-- Module 1: What is Genomic Screening -->
<div class="module-content active" id="module1">
<div class="content-card">
<h3><span class="icon">1</span> What is Genomic Newborn Screening?</h3>
<p>Genomic newborn screening is an advanced medical test that analyzes your baby's DNA to identify genetic conditions that may affect their health. Unlike traditional newborn screening that tests for a limited number of conditions, genomic screening can potentially identify hundreds of genetic variations.</p>
<div class="highlight-box">
<h4>Key Point</h4>
<p>This screening is optional and requires your informed consent. The results can help healthcare providers deliver personalized care early in your child's life.</p>
</div>
<p>The test uses a small blood sample, typically collected from your baby's heel (heel prick test), to extract and analyze DNA. This analysis looks for specific genetic markers associated with various health conditions.</p>
<div class="qa-section">
<h4>Frequently Asked Questions</h4>
<div class="qa-grid">
<button class="qa-btn" onclick="showQA('what-dna')">
<span class="question">What exactly is DNA and how does it relate to my baby's health?</span>
</button>
<button class="qa-btn" onclick="showQA('how-different')">
<span class="question">How is this different from standard newborn screening?</span>
</button>
<button class="qa-btn" onclick="showQA('when-results')">
<span class="question">When will I receive the results?</span>
</button>
</div>
</div>
</div>
<div class="quiz-container" id="quiz1">
<div class="quiz-header">
<h3>Knowledge Check</h3>
<span class="quiz-progress">Question <span id="qProgress1">1</span> of 2</span>
</div>
<p class="quiz-question" id="qText1">Genomic newborn screening analyzes which of the following?</p>
<div class="quiz-options" id="qOptions1"></div>
<div class="quiz-feedback" id="qFeedback1"></div>
<div class="quiz-nav">
<button class="quiz-btn primary" id="qNextBtn1" onclick="nextQuizQuestion(1)" style="display:none;">Next Question</button>
<button class="quiz-btn primary" id="qCompleteBtn1" onclick="completeModuleQuiz(1)" style="display:none;">Complete Module</button>
</div>
</div>
</div>
<!-- Module 2: Benefits -->
<div class="module-content" id="module2">
<div class="content-card">
<h3><span class="icon">2</span> Benefits of Genomic Newborn Screening</h3>
<p>Understanding the potential benefits helps you make an informed decision about whether this screening is right for your family.</p>
<div class="highlight-box">
<h4>Early Detection Saves Lives</h4>
<p>Many genetic conditions are treatable when detected early. Early intervention can prevent serious health complications and improve your child's quality of life.</p>
</div>
<p><strong>Key Benefits Include:</strong></p>
<ul style="margin-left: 1.5rem; margin-top: 1rem;">
<li style="margin-bottom: 0.5rem;">Early identification of treatable genetic conditions</li>
<li style="margin-bottom: 0.5rem;">Personalized medical care tailored to your child's genetic profile</li>
<li style="margin-bottom: 0.5rem;">Informed family planning for future children</li>
<li style="margin-bottom: 0.5rem;">Reduced diagnostic odyssey for rare conditions</li>
<li style="margin-bottom: 0.5rem;">Access to early interventions and treatments</li>
<li style="margin-bottom: 0.5rem;">Peace of mind through comprehensive screening</li>
</ul>
<div class="qa-section">
<h4>Frequently Asked Questions</h4>
<div class="qa-grid">
<button class="qa-btn" onclick="showQA('treatable')">
<span class="question">What types of conditions can be treated if found early?</span>
</button>
<button class="qa-btn" onclick="showQA('accuracy')">
<span class="question">How accurate are the screening results?</span>
</button>
</div>
</div>
</div>
<div class="quiz-container" id="quiz2">
<div class="quiz-header">
<h3>Knowledge Check</h3>
<span class="quiz-progress">Question <span id="qProgress2">1</span> of 2</span>
</div>
<p class="quiz-question" id="qText2">Which of the following is a key benefit of genomic newborn screening?</p>
<div class="quiz-options" id="qOptions2"></div>
<div class="quiz-feedback" id="qFeedback2"></div>
<div class="quiz-nav">
<button class="quiz-btn primary" id="qNextBtn2" onclick="nextQuizQuestion(2)" style="display:none;">Next Question</button>
<button class="quiz-btn primary" id="qCompleteBtn2" onclick="completeModuleQuiz(2)" style="display:none;">Complete Module</button>
</div>
</div>
</div>
<!-- Module 3: Risks -->
<div class="module-content" id="module3">
<div class="content-card">
<h3><span class="icon">3</span> Risks and Limitations</h3>
<p>It's important to understand both the benefits and limitations of genomic screening to make a fully informed decision.</p>
<div class="highlight-box" style="background: rgba(224,122,95,0.1); border-left-color: var(--coral);">
<h4>Important Consideration</h4>
<p>A positive screening result does not always mean your baby has a condition. Further diagnostic testing is typically required to confirm any findings.</p>
</div>
<p><strong>Potential Risks and Limitations:</strong></p>
<ul style="margin-left: 1.5rem; margin-top: 1rem;">
<li style="margin-bottom: 0.5rem;">False positives may cause unnecessary worry and additional testing</li>
<li style="margin-bottom: 0.5rem;">False negatives may provide false reassurance</li>
<li style="margin-bottom: 0.5rem;">Incidental findings may reveal unexpected information</li>
<li style="margin-bottom: 0.5rem;">Not all genetic conditions can be detected</li>
<li style="margin-bottom: 0.5rem;">Results may have implications for family members</li>
<li style="margin-bottom: 0.5rem;">Potential for genetic discrimination (protected by GINA)</li>
</ul>
<div class="qa-section">
<h4>Frequently Asked Questions</h4>
<div class="qa-grid">
<button class="qa-btn" onclick="showQA('false-positive')">
<span class="question">What happens if we get a false positive result?</span>
</button>
<button class="qa-btn" onclick="showQA('incidental')">
<span class="question">What are incidental findings?</span>
</button>
<button class="qa-btn" onclick="showQA('not-detected')">
<span class="question">Can this test detect all genetic conditions?</span>
</button>
</div>
</div>
</div>
<div class="quiz-container" id="quiz3">
<div class="quiz-header">
<h3>Knowledge Check</h3>
<span class="quiz-progress">Question <span id="qProgress3">1</span> of 2</span>
</div>
<p class="quiz-question" id="qText3">What is a potential limitation of genomic newborn screening?</p>
<div class="quiz-options" id="qOptions3"></div>
<div class="quiz-feedback" id="qFeedback3"></div>
<div class="quiz-nav">
<button class="quiz-btn primary" id="qNextBtn3" onclick="nextQuizQuestion(3)" style="display:none;">Next Question</button>
<button class="quiz-btn primary" id="qCompleteBtn3" onclick="completeModuleQuiz(3)" style="display:none;">Complete Module</button>
</div>
</div>
</div>
<!-- Module 4: The Process -->
<div class="module-content" id="module4">
<div class="content-card">
<h3><span class="icon">4</span> The Screening Process</h3>
<p>Understanding what happens during the screening process can help you feel more comfortable with your decision.</p>
<div class="highlight-box">
<h4>Simple and Safe</h4>
<p>The screening process is simple, safe, and typically completed within the first 24-48 hours after birth using a small blood sample.</p>
</div>
<p><strong>Step-by-Step Process:</strong></p>
<ol style="margin-left: 1.5rem; margin-top: 1rem;">
<li style="margin-bottom: 1rem;"><strong>Consent:</strong> You provide informed consent after completing this education program</li>
<li style="margin-bottom: 1rem;"><strong>Sample Collection:</strong> A few drops of blood are collected from your baby's heel</li>
<li style="margin-bottom: 1rem;"><strong>Laboratory Analysis:</strong> DNA is extracted and analyzed for genetic markers</li>
<li style="margin-bottom: 1rem;"><strong>Results Review:</strong> A genetic counselor reviews results with you (typically 2-4 weeks)</li>
<li style="margin-bottom: 1rem;"><strong>Follow-up Care:</strong> If needed, additional testing and specialist referrals are arranged</li>
</ol>
<div class="qa-section">
<h4>Frequently Asked Questions</h4>
<div class="qa-grid">
<button class="qa-btn" onclick="showQA('sample')">
<span class="question">Is the blood collection painful for my baby?</span>
</button>
<button class="qa-btn" onclick="showQA('counselor')">
<span class="question">What is a genetic counselor and why would I meet with one?</span>
</button>
</div>
</div>
</div>
<div class="quiz-container" id="quiz4">
<div class="quiz-header">
<h3>Knowledge Check</h3>
<span class="quiz-progress">Question <span id="qProgress4">1</span> of 2</span>
</div>
<p class="quiz-question" id="qText4">When is the blood sample typically collected for genomic newborn screening?</p>
<div class="quiz-options" id="qOptions4"></div>
<div class="quiz-feedback" id="qFeedback4"></div>
<div class="quiz-nav">
<button class="quiz-btn primary" id="qNextBtn4" onclick="nextQuizQuestion(4)" style="display:none;">Next Question</button>
<button class="quiz-btn primary" id="qCompleteBtn4" onclick="completeModuleQuiz(4)" style="display:none;">Complete Module</button>
</div>
</div>
</div>
<!-- Module 5: Privacy -->
<div class="module-content" id="module5">
<div class="content-card">
<h3><span class="icon">5</span> Privacy and Data Protection</h3>
<p>Your baby's genetic information is highly sensitive. Understanding how it's protected is essential to making an informed decision.</p>
<div class="highlight-box">
<h4>Protected by Law</h4>
<p>The Genetic Information Nondiscrimination Act (GINA) protects against genetic discrimination in health insurance and employment.</p>
</div>
<p><strong>Your Privacy Rights Include:</strong></p>
<ul style="margin-left: 1.5rem; margin-top: 1rem;">
<li style="margin-bottom: 0.5rem;">Control over who can access your child's genetic information</li>
<li style="margin-bottom: 0.5rem;">Secure storage of genetic data in certified laboratories</li>
<li style="margin-bottom: 0.5rem;">Option to have samples destroyed after testing</li>
<li style="margin-bottom: 0.5rem;">Protection from genetic discrimination under GINA</li>
<li style="margin-bottom: 0.5rem;">HIPAA protection for all health-related information</li>
</ul>
<div class="qa-section">
<h4>Frequently Asked Questions</h4>
<div class="qa-grid">
<button class="qa-btn" onclick="showQA('ginA')">
<span class="question">What protections does GINA provide?</span>
</button>
<button class="qa-btn" onclick="showQA('destroy')">
<span class="question">Can we request that samples be destroyed after testing?</span>
</button>
<button class="qa-btn" onclick="showQA('who-access')">
<span class="question">Who can access my baby's genetic information?</span>
</button>
</div>
</div>
</div>
<div class="quiz-container" id="quiz5">
<div class="quiz-header">
<h3>Knowledge Check</h3>
<span class="quiz-progress">Question <span id="qProgress5">1</span> of 2</span>
</div>
<p class="quiz-question" id="qText5">Which law protects against genetic discrimination in health insurance and employment?</p>
<div class="quiz-options" id="qOptions5"></div>
<div class="quiz-feedback" id="qFeedback5"></div>
<div class="quiz-nav">
<button class="quiz-btn primary" id="qNextBtn5" onclick="nextQuizQuestion(5)" style="display:none;">Next Question</button>
<button class="quiz-btn primary" id="qCompleteBtn5" onclick="completeModuleQuiz(5)" style="display:none;">Complete and Get Certified</button>
</div>
</div>
</div>
<!-- Certification Section -->
<section class="certification-section" id="certificationSection">
<div class="cert-form" id="certForm">
<h3>Congratulations!</h3>
<p>You have completed all educational modules. Enter your information below to receive your completion certificate.</p>
<div class="form-group">
<label for="parentName">Your Full Name</label>
<input type="text" id="parentName" placeholder="Enter your full name">
</div>
<div class="form-group">
<label for="babyName">Baby's Name (Optional)</label>
<input type="text" id="babyName" placeholder="Enter baby's name or 'Baby [Last Name]'">
</div>
<button class="generate-cert-btn" onclick="generateCertificate()">Generate Certificate</button>
</div>
<div class="certificate" id="certificate">
<div class="cert-header">
<div class="cert-badge">
<svg width="40" height="40" viewBox="0 0 24 24" fill="white">
<path d="M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z"/>
</svg>
</div>
<h2 class="cert-title">Certificate of Completion</h2>
<p class="cert-subtitle">Genomic Newborn Screening Education Program</p>
</div>
<div class="cert-body">
<p>This certifies that</p>
<p class="cert-name" id="certName">Parent Name</p>
<p>has successfully completed the comprehensive education program on</p>
<span class="cert-course">Genomic Newborn Screening Parent Consent</span>
<p style="margin-top: 1.5rem; font-size: 0.95rem;">Demonstrating understanding of benefits, risks, processes, and privacy considerations.</p>
</div>
<div class="cert-footer">
<div class="cert-footer-item">
<p class="label">Date Completed</p>
<p class="value" id="certDate">January 1, 2025</p>
</div>
<div class="cert-footer-item">
<p class="label">Certificate ID</p>
<p class="value" id="certId">GNS-2025-XXXX</p>
</div>
</div>
<button class="print-btn" onclick="printCertificate()">Print Certificate</button>
</div>
</section>
</main>
</div>
<!-- Q&A Overlay -->
<div class="overlay" id="qaOverlay">
<div class="overlay-content">
<div class="overlay-header">
<h3 id="qaTitle">Question</h3>
<button class="overlay-close" onclick="closeQA()">×</button>
</div>
<div class="overlay-body">
<p class="answer" id="qaAnswer">Answer will appear here.</p>
</div>
</div>
</div>
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@0.160.0/build/three.module.js",
"three/addons/": "https://unpkg.com/three@0.160.0/examples/jsm/"
}
}
</script>
<script type="module">
import * as THREE from 'three';
// Three.js DNA Helix Background
class DNABackground {
constructor() {
this.scene = new THREE.Scene();
this.camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
this.renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
this.renderer.setSize(window.innerWidth, window.innerHeight);
this.renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
document.getElementById('canvas-container').appendChild(this.renderer.domElement);
this.dna = [];
this.particles = null;
this.time = 0;
this.init();
this.animate();
window.addEventListener('resize', () => this.onResize());
}
init() {
this.camera.position.z = 30;
// Create DNA helix
const helixHeight = 50;
const radius = 8;
const turns = 3;
const nodesPerTurn = 20;
const totalNodes = turns * nodesPerTurn;
const sphereGeometry = new THREE.SphereGeometry(0.4, 16, 16);
const cylinderGeometry = new THREE.CylinderGeometry(0.15, 0.15, 1, 8);
const colors = [0x4a7c59, 0xe07a5f, 0x7fb069, 0x2d5a47];
for (let i = 0; i < totalNodes; i++) {
const t = i / totalNodes;
const angle = t * Math.PI * 2 * turns;
const y = (t - 0.5) * helixHeight;
// Strand 1
const x1 = Math.cos(angle) * radius;
const z1 = Math.sin(angle) * radius;
// Strand 2
const x2 = Math.cos(angle + Math.PI) * radius;
const z2 = Math.sin(angle + Math.PI) * radius;
const color1 = new THREE.MeshBasicMaterial({ color: colors[i % 2] });
const color2 = new THREE.MeshBasicMaterial({ color: colors[(i + 1) % 2] });
const sphere1 = new THREE.Mesh(sphereGeometry, color1);
sphere1.position.set(x1, y, z1);
this.scene.add(sphere1);
this.dna.push({ mesh: sphere1, baseY: y, angle: angle, strand: 1 });
const sphere2 = new THREE.Mesh(sphereGeometry, color2);
sphere2.position.set(x2, y, z2);
this.scene.add(sphere2);
this.dna.push({ mesh: sphere2, baseY: y, angle: angle + Math.PI, strand: 2 });
// Connect strands with base pairs
if (i % 3 === 0) {
const direction = new THREE.Vector3(x2 - x1, 0, z2 - z1);
const length = direction.length();
const basePair = new THREE.Mesh(
cylinderGeometry,
new THREE.MeshBasicMaterial({ color: 0x636e72 })
);
basePair.scale.y = length * 3;
basePair.position.set((x1 + x2) / 2, y, (z1 + z2) / 2);
basePair.rotation.z = Math.PI / 2;
basePair.rotation.y = angle;
this.scene.add(basePair);
this.dna.push({ mesh: basePair, baseY: y, angle: angle, isBasePair: true });
}
}
// Add floating particles
const particleCount = 100;
const positions = new Float32Array(particleCount * 3);
for (let i = 0; i < particleCount; i++) {
positions[i * 3] = (Math.random() - 0.5) * 60;
positions[i * 3 + 1] = (Math.random() - 0.5) * 60;
positions[i * 3 + 2] = (Math.random() - 0.5) * 60;
}
const particleGeometry = new THREE.BufferGeometry();
particleGeometry.setAttribute('position', new THREE.BufferAttribute(positions, 3));
const particleMaterial = new THREE.PointsMaterial({
color: 0x7fb069,
size: 0.3,
transparent: true,
opacity: 0.6
});
this.particles = new THREE.Points(particleGeometry, particleMaterial);
this.scene.add(this.particles);
}
animate() {
requestAnimationFrame(() => this.animate());
this.time += 0.005;
// Rotate DNA
this.scene.rotation.y = this.time * 0.5;
// Animate DNA nodes
this.dna.forEach((item, index) => {
if (!item.isBasePair) {
item.mesh.position.y = item.baseY + Math.sin(this.time * 2 + index * 0.1) * 0.3;
}
});
// Animate particles
if (this.particles) {
this.particles.rotation.y = -this.time * 0.2;
this.particles.rotation.x = Math.sin(this.time * 0.5) * 0.1;
}
this.renderer.render(this.scene, this.camera);
}
onResize() {
this.camera.aspect = window.innerWidth / window.innerHeight;
this.camera.updateProjectionMatrix();
this.renderer.setSize(window.innerWidth, window.innerHeight);
}
}
// Initialize 3D background
new DNABackground();
</script>
<script>
// Application State
let state = {
currentModule: 1,
completedModules: [],
quizState: {},
totalProgress: 0
};
// Quiz Data
const quizData = {
1: [
{
question: "Genomic newborn screening analyzes which of the following?",
options: ["Blood type only", "DNA for genetic markers", "Baby's height and weight", "Eye color genes"],
correct: 1,
feedback: "Correct! Genomic newborn screening analyzes your baby's DNA to identify genetic markers associated with various health conditions."
},
{
question: "Is genomic newborn screening mandatory?",
options: ["Yes, it is required by law", "No, it requires parent consent", "Only for premature babies", "Only in certain states"],
correct: 1,
feedback: "Correct! Genomic newborn screening is optional and requires your informed consent."
}
],
2: [
{
question: "Which of the following is a key benefit of genomic newborn screening?",
options: ["Determining baby's eye color", "Early identification of treatable conditions", "Predicting adult height", "Choosing baby's name"],
correct: 1,
feedback: "Correct! Early identification of treatable genetic conditions allows for timely intervention and better health outcomes."
},
{
question: "How can genomic screening help with family planning?",
options: ["It cannot help at all", "It identifies conditions that may affect future children", "It determines family size", "It predicts siblings' genders"],
correct: 1,
feedback: "Correct! Understanding genetic conditions can help parents make informed decisions about future family planning."
}
],
3: [
{
question: "What is a potential limitation of genomic newborn screening?",
options: ["It is too expensive", "False positives may cause unnecessary worry", "It takes too long", "It is painful for the baby"],
correct: 1,
feedback: "Correct! False positives can occur, which may cause unnecessary worry and require additional confirmatory testing."
},
{
question: "What are incidental findings?",
options: ["Results that are wrong", "Unexpected genetic information discovered during testing", "Results shared with family members", "Findings from previous tests"],
correct: 1,
feedback: "Correct! Incidental findings are unexpected genetic information that may be discovered during the screening process."
}
],
4: [
{
question: "When is the blood sample typically collected for genomic newborn screening?",
options: ["During pregnancy", "First 24-48 hours after birth", "At one month old", "At one year old"],
correct: 1,
feedback: "Correct! The blood sample is typically collected within the first 24-48 hours after birth using a simple heel prick."
},
{
question: "Who typically reviews the results with parents?",
options: ["The hospital receptionist", "A genetic counselor", "The baby's grandparents", "A nutritionist"],
correct: 1,
feedback: "Correct! A genetic counselor is trained to explain genetic test results and help parents understand their implications."
}
],
5: [
{
question: "Which law protects against genetic discrimination in health insurance and employment?",
options: ["HIPAA", "GINA", "ADA", "FMLA"],
correct: 1,
feedback: "Correct! The Genetic Information Nondiscrimination Act (GINA) protects individuals from genetic discrimination."
},
{
question: "Can parents request that genetic samples be destroyed after testing?",
options: ["No, samples must be kept forever", "Yes, they can request destruction", "Only with a court order", "Only for certain conditions"],
correct: 1,
feedback: "Correct! Parents have the right to request that their baby's genetic samples be destroyed after testing is complete."
}
]
};
// Q&A Data
const qaData = {
'what-dna': {
question: "What exactly is DNA and how does it relate to my baby's health?",
answer: "DNA (deoxyribonucleic acid) is the genetic blueprint that determines how our bodies develop and function. It contains genes that provide instructions for making proteins, which are essential for our body's structure and function. Variations in genes can sometimes lead to health conditions. By analyzing your baby's DNA, we can identify genetic variations that may indicate an increased risk for certain conditions, allowing for early intervention and personalized care.",
highlight: "Think of DNA as an instruction manual for building and maintaining your baby's body. Sometimes there are typos in this manual that can affect how the body works."
},
'how-different': {
question: "How is this different from standard newborn screening?",
answer: "Standard newborn screening tests for about 30-60 specific conditions using biochemical tests. Genomic screening analyzes the actual DNA and can potentially identify hundreds of genetic conditions. Standard screening looks at what the body is currently doing (metabolism), while genomic screening looks at the genetic code itself to identify potential future health risks. Genomic screening can detect conditions that standard screening might miss.",
highlight: "Standard screening = checking current body function. Genomic screening = reading the genetic instruction manual."
},
'when-results': {
question: "When will I receive the results?",
answer: "Results are typically available within 2-4 weeks after the sample is collected. A genetic counselor will contact you to schedule a results appointment, either in person or via telehealth. If any concerning results are found, you'll be contacted sooner. Normal results may be communicated through a secure patient portal or letter.",
highlight: "The 2-4 week timeline allows for thorough laboratory analysis and careful review of results by genetic specialists."
},
'treatable': {
question: "What types of conditions can be treated if found early?",
answer: "Many conditions detected through genomic screening can be treated or managed effectively when caught early. These include metabolic disorders (like PKU, which requires a special diet), endocrine disorders (like congenital hypothyroidism, treated with hormone replacement), and immunodeficiencies (which may require preventive treatments). Early detection also allows for monitoring and early intervention for conditions like cystic fibrosis and certain heart conditions.",
highlight: "Early treatment can prevent developmental delays, organ damage, and other serious complications for many conditions."
},
'accuracy': {
question: "How accurate are the screening results?",
answer: "Genomic screening is highly accurate, but no test is 100% perfect. The technology has a very low false-positive rate (less than 1% for most conditions) and a low false-negative rate. However, a positive screening result is considered preliminary and requires confirmation through diagnostic testing. The accuracy can vary depending on the specific condition being tested for and the type of genetic variation.",
highlight: "Screening = high accuracy first step. Positive results are confirmed with additional diagnostic testing."
},
'false-positive': {
question: "What happens if we get a false positive result?",
answer: "A false positive means the screening indicated a possible condition that further testing shows is not actually present. If your screening shows a positive result, you'll be contacted by a genetic counselor who will explain the finding and recommend confirmatory diagnostic testing. This additional testing is more specific and can determine whether the condition is truly present. While waiting for results can be stressful, most positive screening results do not turn out to be actual conditions.",
highlight: "Remember: a positive screen is not a diagnosis. It's a signal that more specific testing is needed."
},
'incidental': {
question: "What are incidental findings?",
answer: "Incidental findings are genetic variations discovered during testing that are unrelated to the original purpose of the screening. For example, while looking for childhood-onset conditions, we might discover a gene variant associated with an adult-onset condition or carrier status for a recessive condition. Before testing, you'll have the option to choose whether you want to receive certain types of incidental findings.",
highlight: "You have control over what types of incidental findings you want to receive, if any."
},
'not-detected': {
question: "Can this test detect all genetic conditions?",
answer: "No, genomic newborn screening cannot detect all genetic conditions. The test focuses on genes associated with conditions that have available treatments or interventions. It does not test for all possible genetic variations. Additionally, some genetic changes are difficult to detect with current technology, and some conditions may be caused by multiple genes or environmental factors not captured by this test. A negative result does not guarantee your baby will never develop any health conditions.",
highlight: "This screening is comprehensive but not exhaustive. It focuses on actionable genetic findings."
},
'sample': {
question: "Is the blood collection painful for my baby?",
answer: "The blood collection involves a small prick to your baby's heel, similar to the standard newborn screening that most babies already receive. While babies may briefly cry or show discomfort, the procedure is quick (just a few seconds) and any discomfort passes rapidly. The amount of blood needed is very small - just a few drops. Hospital staff are experienced in making this process as quick and comfortable as possible.",
highlight: "The heel prick is brief and safe, with minimal discomfort that passes quickly."
},
'counselor': {
question: "What is a genetic counselor and why would I meet with one?",
answer: "A genetic counselor is a healthcare professional with specialized training in medical genetics and counseling. They help you understand complex genetic information, explain what results mean for your baby and family, provide emotional support, and guide you through any follow-up decisions. Meeting with a genetic counselor ensures you fully understand your results and have support for any decisions that need to be made based on those results.",
highlight: "Genetic counselors are your partners in understanding and making decisions about genetic information."
},
'ginA': {
question: "What protections does GINA provide?",
answer: "The Genetic Information Nondiscrimination Act (GINA) is a federal law that protects Americans from discrimination based on their genetic information. It prohibits health insurers from using genetic information to make coverage, underwriting, or premium decisions. It also prevents employers from using genetic information in hiring, firing, compensation, or other employment decisions. However, GINA does not apply to life insurance, disability insurance, or long-term care insurance.",
highlight: "GINA ensures your baby's genetic information cannot be used against them for health insurance or employment."
},
'destroy': {
question: "Can we request that samples be destroyed after testing?",
answer: "Yes, you have the right to request that your baby's blood sample and extracted DNA be destroyed after testing is complete. You can make this request at the time of consent or at any point after testing. The laboratory will provide documentation confirming the destruction of samples. However, keeping samples may be beneficial for future retesting or as new genetic knowledge emerges.",
highlight: "You maintain control over your baby's biological samples and can request destruction at any time."
},
'who-access': {
question: "Who can access my baby's genetic information?",
answer: "Access to your baby's genetic information is strictly controlled. Only authorized healthcare providers involved in your baby's care can access this information. It is protected under HIPAA privacy rules. The testing laboratory must follow strict confidentiality protocols. Information is not shared with employers, insurers (without your consent), or other third parties. You can request a complete list of who has accessed the information and for what purpose.",
highlight: "Strict privacy protections ensure only authorized healthcare providers can access genetic information."
}
};
// Initialize quizzes
function initQuizzes() {
for (let module = 1; module <= 5; module++) {
state.quizState[module] = {
currentQuestion: 0,
answered: [],
score: 0
};
renderQuizQuestion(module);
}
}
// Render quiz question
function renderQuizQuestion(module) {
const quiz = quizData[module];
const state2 = state.quizState[module];
const questionData = quiz[state2.currentQuestion];
document.getElementById(`qProgress${module}`).textContent = state2.currentQuestion + 1;
document.getElementById(`qText${module}`).textContent = questionData.question;
const optionsContainer = document.getElementById(`qOptions${module}`);
optionsContainer.innerHTML = '';
questionData.options.forEach((option, index) => {
const btn = document.createElement('button');
btn.className = 'quiz-option';
btn.textContent = option;
btn.onclick = () => selectAnswer(module, index);
optionsContainer.appendChild(btn);
});
document.getElementById(`qFeedback${module}`).classList.remove('show');
document.getElementById(`qNextBtn${module}`).style.display = 'none';
document.getElementById(`qCompleteBtn${module}`).style.display = 'none';
}
// Select answer
function selectAnswer(module, index) {
const quiz = quizData[module];
const state2 = state.quizState[module];
const questionData = quiz[state2.currentQuestion];
if (state2.answered.includes(state2.currentQuestion)) return;
state2.answered.push(state2.currentQuestion);
const options = document.querySelectorAll(`#qOptions${module} .quiz-option`);
options.forEach((opt, i) => {
opt.classList.remove('selected');
if (i === index) opt.classList.add('selected');
if (i === questionData.correct) opt.classList.add('correct');
if (i === index && index !== questionData.correct) opt.classList.add('incorrect');
});
const feedback = document.getElementById(`qFeedback${module}`);
if (index === questionData.correct) {
state2.score++;
feedback.className = 'quiz-feedback show correct';
} else {
feedback.className = 'quiz-feedback show incorrect';
}
feedback.textContent = questionData.feedback;
if (state2.currentQuestion < quiz.length - 1) {
document.getElementById(`qNextBtn${module}`).style.display = 'block';
} else {
document.getElementById(`qCompleteBtn${module}`).style.display = 'block';
}
}
// Next quiz question
window.nextQuizQuestion = function(module) {
state.quizState[module].currentQuestion++;
renderQuizQuestion(module);
};
// Complete module quiz
window.completeModuleQuiz = function(module) {
if (!state.completedModules.includes(module)) {
state.completedModules.push(module);
}
// Update tab style
const tab = document.querySelector(`.module-tab[data-module="${module}"]`);
tab.classList.add('completed');
updateProgress();
if (module < 5) {
switchModule(module + 1);
} else {
showCertification();
}
};
// Update progress
function updateProgress() {
const progress = (state.completedModules.length / 5) * 100;
state.totalProgress = progress;
document.getElementById('progressFill').style.width = progress + '%';
document.getElementById('progressText').textContent = Math.round(progress) + '% Complete';
}
// Start learning
window.startLearning = function() {
document.getElementById('welcomeSection').style.display = 'none';
document.getElementById('moduleNav').style.display = 'flex';
initQuizzes();
};
// Switch module
window.switchModule = function(module) {
state.currentModule = module;
document.querySelectorAll('.module-tab').forEach(tab => {
tab.classList.remove('active');
});
document.querySelector(`.module-tab[data-module="${module}"]`).classList.add('active');
document.querySelectorAll('.module-content').forEach(content => {
content.classList.remove('active');
});
document.getElementById(`module${module}`).classList.add('active');
};
// Show Q&A overlay
window.showQA = function(id) {
const qa = qaData[id];
document.getElementById('qaTitle').innerHTML = `<span style="display:inline-flex;align-items:center;gap:0.5rem;"><span style="background:rgba(255,255,255,0.2);padding:0.3rem 0.6rem;border-radius:6px;font-size:0.8rem;">Q</span> ${qa.question}</span>`;
document.getElementById('qaAnswer').innerHTML = qa.answer +
`<div class="answer-highlight"><strong>Key Takeaway:</strong> ${qa.highlight}</div>`;
document.getElementById('qaOverlay').classList.add('active');
};
// Close Q&A overlay
window.closeQA = function() {
document.getElementById('qaOverlay').classList.remove('active');
};
// Close overlay on background click
document.getElementById('qaOverlay').addEventListener('click', function(e) {
if (e.target === this) closeQA();
});
// Show certification
function showCertification() {
document.getElementById('moduleNav').style.display = 'none';
document.querySelectorAll('.module-content').forEach(m => m.classList.remove('active'));
document.getElementById('certificationSection').classList.add('active');
}
// Generate certificate
window.generateCertificate = function() {
const name = document.getElementById('parentName').value.trim();
if (!name) {
alert('Please enter your name to generate the certificate.');
return;
}
document.getElementById('certName').textContent = name;
const date = new Date();
document.getElementById('certDate').textContent = date.toLocaleDateString('en-US', {
year: 'numeric',
month: 'long',
day: 'numeric'
});
const certId = 'GNS-' + date.getFullYear() + '-' + Math.random().toString(36).substr(2, 4).toUpperCase();
document.getElementById('certId').textContent = certId;
document.getElementById('certForm').style.display = 'none';
document.getElementById('certificate').classList.add('show');
};
// Print certificate
window.printCertificate = function() {
window.print();
};
// Create floating particles
function createParticles() {
for (let i = 0; i < 15; i++) {
const particle = document.createElement('div');
particle.className = 'particle';
particle.style.left = Math.random() * 100 + 'vw';
particle.style.animationDelay = Math.random() * 15 + 's';
particle.style.animationDuration = (15 + Math.random() * 10) + 's';
document.body.appendChild(particle);
}
}
createParticles();
</script>
</body>
</html>
Key Features
Interactive Learning
- 5 Comprehensive Modules covering all aspects of genomic newborn screening
- Progress tracking with visual progress bar
- Module navigation with completion indicators
Q&A System
- Expandable question buttons throughout each module
- Detailed answer overlays with key takeaways
- 15+ frequently asked questions with comprehensive answers
Knowledge Assessment
- 2 quiz questions per module (10 total)
- Immediate feedback on correct/incorrect answers
- Must complete quiz to mark module as complete
Certification
- Personalized certificate with name and unique ID
- Professional design suitable for printing
- Date-stamped completion record
Visual Design
- 3D animated DNA helix background using Three.js
- Warm, professional color palette (sage greens, coral accents)
- Smooth animations and transitions throughout
- Fully responsive for all device sizes