What Decade Should You Have Been Born In? Take the Quiz!

What Decade Should You Have Been Born In? | Viral Retro Quiz
body {
font-family: ‘Arial’, sans-serif;
margin: 0;
padding: 0;
background: url(‘https://images.unsplash.com/photo-1516541196182-6bdb0516eddf’😉 no-repeat center fixed;
background-size: cover;
color: #333;
overflow-x: hidden;
}
.quiz-wrapper {
display: flex;
max-width: 1200px;
margin: 20px auto;
min-height: 80vh;
}
.sidebar {
width: 250px;
background: rgba(0, 0, 0, 0.8);
color: #fff;
padding: 20px;
border-radius: 15px 0 0 15px;
box-shadow: 0 0 20px rgba(0,0,0,0.3);
}
.sidebar h3 {
font-family: ‘Press Start 2P’, cursive;
color: #ff69b4;
text-shadow: 2px 2px #000;
}
.progress-bar {
width: 100%;
height: 15px;
background: #444;
border-radius: 8px;
overflow: hidden;
margin: 20px 0;
}
.progress {
height: 100%;
background: linear-gradient(90deg, #ff4500, #ff69b4);
width: 0;
transition: width 0.5s ease;
}
.sidebar button {
display: block;
width: 100%;
padding: 10px;
margin: 10px 0;
background: #ff1493;
color: #fff;
border: none;
border-radius: 8px;
cursor: pointer;
font-family: ‘Press Start 2P’, cursive;
font-size: 0.9em;
}
.sidebar button:hover {
background: #c71585;
}
.quiz-container {
flex: 1;
background: rgba(255, 255, 255, 0.95);
padding: 30px;
border-radius: 0 15px 15px 0;
box-shadow: 0 0 20px rgba(0,0,0,0.3);
position: relative;
transition: transform 0.5s ease;
}
h1 {
font-family: ‘Press Start 2P’, cursive;
color: #ff4500;
text-shadow: 3px 3px #000;
font-size: 2.2em;
text-align: center;
margin-bottom: 20px;
}
.question {
display: none;
opacity: 0;
transform: translateX(50px);
transition: opacity 0.7s ease, transform 0.7s ease;
background: rgba(255, 255, 255, 0.8);
padding: 20px;
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
position: relative;
z-index: 1;
}
.question.active {
display: block;
opacity: 1;
transform: translateX(0);
}
.option {
display: block;
margin: 15px auto;
padding: 15px;
width: 90%;
background: linear-gradient(45deg, #f0e68c, #ffd700);
border: 3px solid #333;
border-radius: 12px;
cursor: pointer;
font-size: 1.2em;
text-align: center;
transition: transform 0.3s, background 0.3s;
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.option:hover {
transform: translateY(-5px);
background: linear-gradient(45deg, #ffd700, #f0e68c);
}
.option.selected {
background: linear-gradient(45deg, #32cd32, #90ee90);
border-color: #228b22;
}
button#next-btn {
padding: 15px 40px;
background: #ff1493;
color: #fff;
border: none;
border-radius: 12px;
cursor: pointer;
font-family: ‘Press Start 2P’, cursive;
font-size: 1.1em;
margin: 20px auto;
display: block;
transition: background 0.3s;
}
button#next-btn:hover {
background: #c71585;
}
#result {
display: none;
margin-top: 20px;
padding: 30px;
border-radius: 12px;
background: #e0ffff;
animation: slideIn 1s ease;
text-align: center;
}
#result h2 {
color: #ff4500;
font-family: ‘Press Start 2P’, cursive;
}
#result img {
max-width: 100%;
border-radius: 12px;
margin: 20px 0;
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
#spotify-player {
margin: 20px 0;
min-height: 80px;
}
#spotify-player iframe {
width: 100%;
height: 80px;
border: none;
}
#spotify-error {
display: none;
color: #ff4500;
font-size: 0.9em;
margin: 10px 0;
}
.share-buttons {
display: flex;
justify-content: center;
flex-wrap: wrap;
gap: 10px;
margin: 20px 0;
}
.share-buttons a, .share-buttons button {
padding: 12px 20px;
color: #fff;
text-decoration: none;
border-radius: 8px;
font-size: 0.9em;
transition: transform 0.2s;
display: inline-flex;
align-items: center;
gap: 8px;
}
.share-buttons a:hover, .share-buttons button:hover {
transform: scale(1.1);
}
.twitter { background: #1da1f2; }
.facebook { background: #3b5998; }
.pinterest { background: #e60023; }
.instagram { background: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5); }
.download { background: #00ced1; }
.result-60s { background: linear-gradient(135deg, #98fb98, #7fffd4); }
.result-70s { background: linear-gradient(135deg, #ffa500, #ff6347); }
.result-80s { background: linear-gradient(135deg, #ff69b4, #ba55d3); }
.result-90s { background: linear-gradient(135deg, #00ced1, #20b2aa); }
@keyframes slideIn {
from { opacity: 0; transform: translateX(50px); }
to { opacity: 1; transform: translateX(0); }
}
@media (max-width: 768px) {
.quiz-wrapper { flex-direction: column; }
.sidebar { width: 100%; border-radius: 15px 15px 0 0; }
.quiz-container { border-radius: 0 0 15px 15px; }
h1 { font-size: 1.8em; }
.option { font-size: 1em; width: 95%; }
}
@media (max-width: 480px) {
.quiz-container { padding: 15px; }
.share-buttons a, .share-buttons button { padding: 10px 15px; font-size: 0.8em; }
}
Next
const questions = document.querySelectorAll(‘.question’);
const nextBtn = document.getElementById(‘next-btn’);
const resultDiv = document.getElementById(‘result’);
const decadeSpan = document.getElementById(‘decade’);
const descriptionP = document.getElementById(‘description’);
const resultImage = document.getElementById(‘result-image’);
const spotifyPlayer = document.getElementById(‘spotify-player’);
const spotifyError = document.getElementById(‘spotify-error’);
const spotifyLink = document.getElementById(‘spotify-link’);
const twitterShare = document.getElementById(‘twitter-share’);
const facebookShare = document.getElementById(‘facebook-share’);
const pinterestShare = document.getElementById(‘pinterest-share’);
const instagramShare = document.getElementById(‘instagram-share’);
const downloadBadge = document.getElementById(‘download-badge’);
const progress = document.getElementById(‘progress’);
const currentQ = document.getElementById(‘current-q’);
const totalQ = document.getElementById(‘total-q’);
let currentQuestion = 0;
let scores = { ’60s’: 0, ’70s’: 0, ’80s’: 0, ’90s’: 0 };
let selectedOption = false;
// Initialize total questions
totalQ.textContent = questions.length;
// Update progress bar and question number
function updateProgress() {
const percentage = ((currentQuestion + 1) / questions.length) * 100;
progress.style.width = `${percentage}%`;
currentQ.textContent = currentQuestion + 1;
}
// Handle option clicks
document.querySelectorAll(‘.option’).forEach(option => {
option.addEventListener(‘click’, () => {
if (selectedOption) return;
selectedOption = true;
const decade = option.getAttribute(‘data-decade’);
const weight = parseInt(option.getAttribute(‘data-weight’));
scores[decade] += weight;
option.classList.add(‘selected’);
setTimeout(nextQuestion, 500);
});
});
// Move to next question or show result
function nextQuestion() {
if (!selectedOption) {
alert(‘Please select an option!’);
return;
}
questions[currentQuestion].classList.remove(‘active’);
currentQuestion++;
selectedOption = false;
document.querySelectorAll(‘.option’).forEach(opt => opt.classList.remove(‘selected’));
if (currentQuestion < questions.length) {
questions[currentQuestion].classList.add('active');
updateProgress();
} else {
nextBtn.style.display = 'none';
showResult();
}
}
// Load Spotify iframe with error handling and debugging
function loadSpotifyPlayer(url, fallbackUrl) {
console.log(`Attempting to load Spotify player with URL: ${url}`);
spotifyPlayer.innerHTML = “;
const iframe = spotifyPlayer.querySelector(‘iframe’);
iframe.onerror = () => {
console.error(`Spotify iframe failed to load: ${url}`);
spotifyPlayer.style.display = ‘none’;
spotifyError.style.display = ‘block’;
spotifyLink.href = fallbackUrl;
};
iframe.onload = () => {
console.log(`Spotify iframe loaded successfully: ${url}`);
spotifyPlayer.style.display = ‘block’;
spotifyError.style.display = ‘none’;
};
}
// Calculate and display result with tiebreaker
function showResult() {
resultDiv.style.display = ‘block’;
window.scrollTo({ top: resultDiv.offsetTop, behavior: ‘smooth’ });
let maxScore = 0;
let winningDecade = ’60s’;
let tiedDecades = [];
for (let decade in scores) {
if (scores[decade] > maxScore) {
maxScore = scores[decade];
winningDecade = decade;
tiedDecades = [decade];
} else if (scores[decade] === maxScore) {
tiedDecades.push(decade);
}
}
// Tiebreaker: Choose decade with highest weighted question
if (tiedDecades.length > 1) {
let maxWeight = 0;
tiedDecades.forEach(decade => {
let weight = 0;
document.querySelectorAll(`.option[data-decade=”${decade}”]`).forEach(opt => {
weight += parseInt(opt.getAttribute(‘data-weight’));
});
if (weight > maxWeight) {
maxWeight = weight;
winningDecade = decade;
}
});
}
// Decade results with verified Spotify URLs
const results = {
’60s’: {
title: ‘Groovy 60s Soul’,
description: ‘Peace, love, and rock ‘n’ roll! You’d be rocking bell-bottoms at Woodstock, vibing to Jimi Hendrix. Your free-spirited soul belongs in the 60s!’,
image: ‘https://atenajos.blog/wp-content/uploads/2025/08/c0259-groovy-60s-soul-badge.png’,
spotify: ‘https://open.spotify.com/embed/playlist/37i9dQZF1DX1MUPbVKMgJE?si=7b5a9f3b6c8d4e2a’,
spotifyFallback: ‘https://open.spotify.com/playlist/37i9dQZF1DX1MUPbVKMgJE’,
class: ‘result-60s’
},
’70s’: {
title: ‘Disco 70s Star’,
description: ‘Get down with your bad self! You’d be strutting in platform shoes, dancing under disco balls to ABBA. The 70s’ funky vibe is your home!’,
image: ‘https://atenajos.blog/wp-content/uploads/2025/08/01bff-disco-70s-star-badge.png’,
spotify: ‘https://open.spotify.com/embed/playlist/37i9dQZF1DX1spT6G79wU1?si=4c2e8f9a1d3b4f7c’,
spotifyFallback: ‘https://open.spotify.com/playlist/37i9dQZF1DX1spT6G79wU1’,
class: ‘result-70s’
},
’80s’: {
title: ‘Electric 80s Icon’,
description: ‘Big hair, don’t care! You’d be rocking a Walkman and neon leg warmers, dancing to Madonna at an arcade. The 80s’ bold vibe is your scene!’,
image: ‘https://atenajos.blog/wp-content/uploads/2025/08/f4915-electric-80s-icon-badge.png’,
spotify: ‘https://open.spotify.com/embed/playlist/37i9dQZF1DXbVhgHBGQAo4?si=9e1f3c8b2a4d4b6e’,
spotifyFallback: ‘https://open.spotify.com/playlist/37i9dQZF1DXbVhgHBGQAo4’,
class: ‘result-80s’
},
’90s’: {
title: ‘Rad 90s Rebel’,
description: ‘Grunge and Tamagotchis are your jam! You’d be chilling in flannel, blasting Nirvana, and living the 90s slacker dream. Totally awesome!’,
image: ‘https://atenajos.blog/wp-content/uploads/2025/08/74fc3-rad-90s-rebel-badge.png’,
spotify: ‘https://open.spotify.com/embed/playlist/37i9dQZF1DXaLI8a395lse?si=5d7a2f9c3b2e4c1f’,
spotifyFallback: ‘https://open.spotify.com/playlist/37i9dQZF1DXaLI8a395lse’,
class: ‘result-90s’
}
};
// Display result
decadeSpan.textContent = results[winningDecade].title;
descriptionP.textContent = results[winningDecade].description;
resultImage.src = results[winningDecade].image;
resultImage.alt = `${winningDecade} Vibe`;
resultDiv.classList.add(results[winningDecade].class);
loadSpotifyPlayer(results[winningDecade].spotify, results[winningDecade].spotifyFallback);
// Dynamic social sharing
const shareText = `I’m a ${results[winningDecade].title}! Find your decade in this epic quiz! 🎸📼`;
const shareUrl = ‘https://atomic-temporary-240405815.wpcomstaging.com/what-decade-should-you-have-been-born-in-take-the-quiz/’;
twitterShare.href = `https://twitter.com/intent/tweet?text=${encodeURIComponent(shareText)}&url=${encodeURIComponent(shareUrl)}`;
facebookShare.href = `https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(shareUrl)}`;
pinterestShare.href = `https://pinterest.com/pin/create/button/?url=${encodeURIComponent(shareUrl)}&media=${encodeURIComponent(results[winningDecade].image)}&description=${encodeURIComponent(shareText)}`;
instagramShare.onclick = () => {
alert(‘To share on Instagram Stories, download your badge and upload it manually with a link to: ‘ + shareUrl);
};
downloadBadge.onclick = () => {
const link = document.createElement(‘a’);
link.href = results[winningDecade].image;
link.download = `${winningDecade}-badge.jpg`;
link.click();
};
// Track result in Google Analytics
if (typeof gtag === ‘function’) {
gtag(‘event’, ‘quiz_completed’, {
‘event_category’: ‘Quiz’,
‘event_label’: winningDecade
});
}
}
// Next button click
nextBtn.addEventListener(‘click’, nextQuestion);
// Initialize progress
updateProgress();
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag(‘js’, new Date());
gtag(‘config’, ‘G-ZREN9LSKEH’);
Discover more from atenajos
Subscribe to get the latest posts sent to your email.
-
What you eat shows up on your skin. Here are the science-backed foods that genuinely support a clear, glowing complexion, and why they work.

-
Premature ageing is driven by a handful of everyday factors most people never notice. Here is what actually speeds it up, and how to slow it back down.

-
Nine practical swaps for eating more sustainably on a budget. No special ingredients, no extra cost, just smarter choices at the same grocery store.

