.prompt-generator {
max-width: 600px;
margin: 20px auto;
padding: 25px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 15px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
font-family: ‘Georgia’, serif;
color: white;
text-align: center;
}
.prompt-generator h2 {
margin-top: 0;
margin-bottom: 20px;
font-size: 1.8em;
font-weight: normal;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
.prompt-button {
background: #ff6b6b;
color: white;
border: none;
padding: 15px 30px;
font-size: 1.1em;
font-weight: bold;
border-radius: 50px;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
font-family: inherit;
margin-bottom: 25px;
}
.prompt-button:hover {
background: #ff5252;
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}
.prompt-button:active {
transform: translateY(0);
}
.prompt-display {
min-height: 80px;
background: rgba(255, 255, 255, 0.95);
color: #333;
padding: 20px;
border-radius: 10px;
font-size: 1.1em;
line-height: 1.6;
box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transform: translateY(10px);
transition: all 0.4s ease;
}
.prompt-display.visible {
opacity: 1;
transform: translateY(0);
}
.prompt-display.empty {
color: #888;
font-style: italic;
}
.prompt-counter {
margin-top: 15px;
font-size: 0.9em;
opacity: 0.8;
}
@media (max-width: 600px) {
.prompt-generator {
margin: 10px;
padding: 20px;
}
.prompt-generator h2 {
font-size: 1.5em;
}
.prompt-button {
padding: 12px 25px;
font-size: 1em;
}
.prompt-display {
font-size: 1em;
padding: 15px;
}
}
✨ Creative Writing Prompt Generator ✨
Get Writing Prompt
// Array of 30 creative writing prompts (you can easily replace these with your own)
const prompts = [
“Write about a character who discovers they can hear the thoughts of inanimate objects.”,
“A time traveler arrives in your hometown, but they’re from next Tuesday.”,
“Your protagonist inherits a bookstore where the books rewrite themselves every night.”,
“Write a story where gravity works differently for one person.”,
“A character finds a door in their basement that wasn’t there yesterday.”,
“Your main character can only tell lies, but everyone believes them completely.”,
“Write about a world where colors have gone extinct and someone finds the last red rose.”,
“A detective must solve a crime that hasn’t happened yet.”,
“Your protagonist wakes up to find that everyone else has vanished, except for one other person.”,
“Write about a character who collects memories from abandoned places.”,
“A librarian discovers that every book they touch comes to life for exactly one hour.”,
“Your character receives a letter addressed to them from 50 years in the future.”,
“Write about a world where music is illegal and your protagonist is an underground musician.”,
“A character can taste emotions in the food they eat.”,
“Your protagonist finds out they’re a background character in someone else’s story.”,
“Write about a job interview for a position that doesn’t seem to exist.”,
“A character discovers their reflection has been living its own life.”,
“Your protagonist can see the expiration dates floating above people’s heads.”,
“Write about a town where it’s been the same day for the past decade.”,
“A character finds a key that unlocks anything, but only once per object.”,
“Your protagonist is the only person who remembers that dragons used to be real.”,
“Write about a character who can step into photographs.”,
“A meteorologist who can control weather but only in a 3-foot radius around them.”,
“Your character discovers that their dreams are being broadcast on TV.”,
“Write about a world where lying causes physical pain.”,
“A character who can communicate with their future self, but only through sticky notes.”,
“Your protagonist works at a company that sells bottled emotions.”,
“Write about someone who can see the history of any object by touching it.”,
“A character discovers that every time they tell a joke, something random disappears from the world.”,
“Your protagonist finds a phone booth that connects to any place in time and space.”
];
let currentPromptIndex = 0;
let promptCount = 0;
function getNewPrompt() {
const promptDisplay = document.getElementById(‘promptDisplay’);
const promptCounter = document.getElementById(‘promptCounter’);
// Hide current prompt with animation
promptDisplay.classList.remove(‘visible’);
setTimeout(() => {
// Get the next prompt (cycles through all 30)
const prompt = prompts[currentPromptIndex];
// Update display
promptDisplay.textContent = prompt;
promptDisplay.classList.remove(’empty’);
// Update counter
promptCount++;
promptCounter.textContent = `Prompt ${promptCount} of ∞`;
// Show new prompt with animation
setTimeout(() => {
promptDisplay.classList.add(‘visible’);
}, 50);
// Move to next prompt (cycle back to 0 after 29)
currentPromptIndex = (currentPromptIndex + 1) % prompts.length;
}, 200);
}
// Optional: Get today’s prompt based on date (uncomment if you want daily prompts)
/*
function getTodaysPrompt() {
const today = new Date().getDate();
const promptIndex = (today – 1) % prompts.length;
return prompts[promptIndex];
}
*/