dark-forest-menu-view / index.html
blewis101's picture
Add 2 files
d97154f verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The Dark Forest</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Bungee+Shade&family=National+Park&display=swap" rel="stylesheet">
<style>
body {
overflow: hidden;
font-family: 'Bungee Shade', cursive;
}
.background-container {
position: relative;
width: 100vw;
height: 100vh;
overflow: hidden;
}
.background-image {
position: absolute;
width: 100%;
height: 100%;
background-image: url('https://images.unsplash.com/photo-1448375240586-882707db888b'); /* Direct image URL */
background-size: cover;
background-position: center;
z-index: 1; /* Add this to establish stacking context */
}
.background-overlay {
position: absolute;
width: 100%;
height: 100%;
background: linear-gradient(to bottom,
rgba(0,0,0,0) 0%,
rgba(0,0,0,0.7) 100%,
rgba(0,0,0,1) 100%);
z-index: 2; /* Higher than background image */
}
.title-container {
position: absolute;
top: 15% !important; /* Lower position for better spacing */
left: 50%;
transform: translateX(-50%);
text-align: center;
z-index: 20;
width: 100%;
pointer-events: none;
}
.menu-container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 400px;
background-color: rgba(20, 20, 20, 0.8);
border: 2px solid #4a0000;
border-radius: 10px;
padding: 30px;
box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
z-index: 15;
margin-top: 30px;
}
.game-title {
color: #ff0000;
font-size: 4rem;
text-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
letter-spacing: 2px;
white-space: nowrap;
}
.menu-button {
display: block;
width: 100%;
padding: 15px;
margin-bottom: 15px;
background-color: #1a1a1a;
color: #d1d1d1;
border: 1px solid #4a0000;
border-radius: 5px;
font-family: 'National Park', sans-serif;
font-size: 1.2rem;
text-align: center;
cursor: pointer;
transition: all 0.3s ease;
}
.menu-button:hover {
background-color: #4a0000;
color: white;
transform: translateY(-3px);
box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
}
.menu-button:active {
transform: translateY(0);
}
.flicker {
animation: flicker 5s infinite alternate;
}
@keyframes flicker {
0%, 18%, 22%, 25%, 53%, 57%, 100% {
text-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
}
20%, 24%, 55% {
text-shadow: 0 0 2px rgba(255, 0, 0, 0.2);
}
}
/* Add this new rule */
@media (max-width: 768px) {
.game-title {
font-size: 3rem !important;
white-space: normal;
}
.particles {
position: absolute;
width: 100%;
height: 100%;
pointer-events: none;
}
.particle {
position: absolute;
background-color: rgba(255, 0, 0, 0.5);
border-radius: 50%;
pointer-events: none;
}
</style>
</head>
<body>
<div class="background-container">
<div class="background-image"></div>
<div class="background-overlay"></div>
<div class="particles" id="particles"></div>
<div class="title-container">
<h1 class="game-title flicker">THE DARK FOREST</h1>
</div>
<div class="menu-container">
<button class="menu-button">CONTINUE GAME</button>
<button class="menu-button">NEW GAME</button>
<button class="menu-button">SETTINGS</button>
<button class="menu-button">THE LOST WEBSITE</button>
</div>
</div>
<script>
// Create floating particles for atmosphere
document.addEventListener('DOMContentLoaded', function() {
const particlesContainer = document.getElementById('particles');
const particleCount = 30;
for (let i = 0; i < particleCount; i++) {
const particle = document.createElement('div');
particle.classList.add('particle');
// Random size between 1px and 3px
const size = Math.random() * 2 + 1;
particle.style.width = `${size}px`;
particle.style.height = `${size}px`;
// Random position
particle.style.left = `${Math.random() * 100}%`;
particle.style.top = `${Math.random() * 100}%`;
// Random animation
const duration = Math.random() * 20 + 10;
const delay = Math.random() * 5;
particle.style.animation = `float ${duration}s ease-in-out ${delay}s infinite`;
particlesContainer.appendChild(particle);
}
// Add floating animation
const style = document.createElement('style');
style.innerHTML = `
@keyframes float {
0% {
transform: translate(0, 0);
opacity: 0;
}
50% {
opacity: 0.8;
}
100% {
transform: translate(${Math.random() * 100 - 50}px, ${Math.random() * 100 - 50}px);
opacity: 0;
}
}
`;
document.head.appendChild(style);
// Add button hover effects
const buttons = document.querySelectorAll('.menu-button');
buttons.forEach(button => {
button.addEventListener('mouseenter', () => {
const audio = new Audio('https://assets.mixkit.co/sfx/preview/mixkit-select-click-1109.mp3');
audio.volume = 0.2;
audio.play();
});
});
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=blewis101/dark-forest-menu-view" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>