diff --git a/index.html b/index.html
index 9dbe302..d50e5bb 100644
--- a/index.html
+++ b/index.html
@@ -9,7 +9,10 @@
@@ -21,6 +24,23 @@
// Open wiby.me/surprise directly in the iframe
frame.src = 'https://wiby.me/surprise/';
});
+
+ // Dark mode toggle
+ const darkModeToggle = document.getElementById('darkModeToggle');
+ const body = document.body;
+
+ // Check for saved preference
+ if (localStorage.getItem('darkMode') === 'true') {
+ body.classList.add('dark-mode');
+ darkModeToggle.textContent = '☀️';
+ }
+
+ darkModeToggle.addEventListener('click', () => {
+ body.classList.toggle('dark-mode');
+ const isDark = body.classList.contains('dark-mode');
+ darkModeToggle.textContent = isDark ? '☀️' : '🌙';
+ localStorage.setItem('darkMode', isDark);
+ });