/* General Styles */ body { font-family: 'Arial', sans-serif; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100dvh; transition: background-color 0.3s, color 0.3s; background-color: #121212; color: #e0e0e0; } body.light-mode { background-color: #f0f8ff; color: #333; } /* Heading */ h1 { color: #2a9d8f; font-size: 2.5rem; margin-bottom: 20px; } /* Joke Display */ p#joke { font-size: 1.5rem; padding: 15px 20px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); max-width: 600px; text-align: center; margin: 0; background-color: #333; color: #e0e0e0; transition: background-color 0.3s, color 0.3s; } body.light-mode p#joke { background-color: #e9f5f5; color: #333; } /* Buttons */ button { margin-top: 20px; padding: 10px 20px; font-size: 1rem; color: #fff; border: none; border-radius: 5px; cursor: pointer; transition: background-color 0.3s ease; background-color: #2a9d8f; } button:hover { background-color: #264653; } button:active { transform: scale(0.98); } body.light-mode button { background-color: #264653; } body.light-mode button:hover { background-color: #2a9d8f; } /* Dark Mode Toggle Button */ #darkModeToggle { position: fixed; top: 10px; right: 10px; width: 50px; height: 50px; border: none; border-radius: 50%; background-color: #264653; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); transition: background-color 0.3s ease, transform 0.3s ease; } #darkModeToggle:hover { background-color: #2a9d8f; transform: scale(1.1); } #darkModeToggle i { font-size: 24px; color: #fff; transition: transform 0.3s ease, opacity 0.3s ease; } /* Make light mode icon spin */ body.light-mode #darkModeToggle i { transform: rotate(180deg); }