<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>For Chamsi ❤️</title>
<!-- Importing a cute, rounded font -->
<link href="https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600&display=swap" rel="stylesheet">
<style>
:root {
/* Palette: Soft, Pastel, Aesthetic */
--bg-color: #fff0f5; /* Lavender Blush */
--card-bg: #ffffff;
--text-color: #5d5d5d;
--primary-pink: #ffb7b2;
--soft-green: #a8e6cf; /* Mint */
--soft-red: #ffaaa5; /* Salmon/Coral */
--shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Fredoka', sans-serif;
background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
background-color: var(--bg-color);
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden; /* Prevent scrollbars when button moves */
position: relative;
}
/* Ambient background blobs */
.blob {
position: absolute;
background: var(--primary-pink);
opacity: 0.4;
filter: blur(40px);
border-radius: 50%;
z-index: -1;
animation: float 10s infinite alternate;
}
.blob-1 { width: 300px; height: 300px; top: -50px; left: -50px; }
.blob-2 { width: 250px; height: 250px; bottom: -50px; right: -50px; background: #c7ceea; animation-delay: -5s; }
@keyframes float {
0% { transform: translate(0, 0); }
100% { transform: translate(30px, 50px); }
}
/* Main Card */
.card {
background: var(--card-bg);
padding: 3rem 2.5rem;
border-radius: 30px;
box-shadow: var(--shadow);
text-align: center;
max-width: 90%;
width: 450px;
position: relative;
transition: transform 0.3s ease, height 0.3s ease;
}
/* --- Image Styles --- */
.image-header {
width: 200px;
height: auto;
margin-bottom: 1.5rem;
display: inline-block;
animation: bounce 2s infinite;
border-radius: 25px;
background-color: #fff;
padding: 5px;
box-shadow: 0 5px 15px rgba(0,0,0,0.08);
border: 2px solid #fff0f5;
}
.image-header img {
width: 100%;
height: auto;
border-radius: 20px;
object-fit: cover;
display: block;
}
h1 {
color: var(--text-color);
font-size: 1.6rem;
margin-bottom: 2.5rem;
font-weight: 600;
line-height: 1.3;
}
/* Buttons Container */
.btn-group {
display: flex;
justify-content: center;
gap: 1.5rem;
position: relative;
min-height: 60px;
}
button {
border: none;
padding: 12px 32px;
font-size: 1.2rem;
font-family: inherit;
font-weight: 600;
border-radius: 50px;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
position: relative;
box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
/* Yes Button */
.btn-yes {
background-color: var(--soft-green);
color: #2e5c48;
z-index: 10;
}
.btn-yes:hover {
transform: scale(1.05);
box-shadow: 0 6px 12px rgba(168, 230, 207, 0.5);
}
/* No Button */
.btn-no {
background-color: var(--soft-red);
color: #8a4a45;
}
/* Success Message State */
.success-content {
display: none;
flex-direction: column;
align-items: center;
justify-content: center;
animation: popIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
width: 100%;
}
.success-content h2 {
color: #ff8fab;
font-size: 1.6rem; /* Adjusted size for longer text */
margin-bottom: 1rem;
line-height: 1.4;
}
.success-content p {
color: var(--text-color);
font-size: 1.2rem;
}
/* Confetti Particles */
.confetti {
position: absolute;
width: 10px;
height: 10px;
background-color: #ffd700;
animation: confetti-fall linear forwards;
top: -10px;
z-index: 100;
border-radius: 2px;
}
/* Animations */
@keyframes bounce {
0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
40% { transform: translateY(-15px); }
60% { transform: translateY(-7px); }
}
@keyframes popIn {
0% { opacity: 0; transform: scale(0.5); }
100% { opacity: 1; transform: scale(1); }
}
@keyframes confetti-fall {
0% { transform: translateY(0) rotate(0deg); opacity: 1; }
100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
/* Mobile Adjustments */
@media (max-width: 480px) {
.card {
padding: 2rem 1.5rem;
width: 90%;
}
.image-header {
width: 160px;
}
h1 {
font-size: 1.4rem;
}
.success-content h2 {
font-size: 1.4rem;
}
.btn-group {
flex-direction: column;
align-items: center;
gap: 1rem;
}
button {
width: 100%;
}
}
</style>
</head>
<body>
<!-- Background Decoration -->
<div class="blob blob-1"></div>
<div class="blob blob-2"></div>
<main class="card" id="mainCard">
<!-- Initial Question View -->
<div id="questionView">
<div class="image-header">
<img src="https://z-cdn-media.chatglm.cn/files/ae5f5a8f-442d-49ca-900b-d95739cb2278.png?auth_key=1870150761-7a40fd12c68b4df0a3814c3d252943aa-0-5c712bcd462692c4dc6a090d348bd5c4" alt="Cat with Rose">
</div>
<h1>Chamsi, will you be my Valentine?</h1>
<div class="btn-group">
<button class="btn-yes" id="yesBtn">Yes</button>
<button class="btn-no" id="noBtn">No</button>
</div>
</div>
<!-- Success View (Hidden initially) -->
<div id="successView" class="success-content">
<!-- Replaced heart with the Cartoon Cat Image -->
<div class="image-header" style="margin-bottom: 1.5rem;">
<img src="https://z-cdn-media.chatglm.cn/files/1178deed-c777-4760-8df0-4f672c91de68.png?auth_key=1870151292-117f6eff70104facb5dcf4ed908858c0-0-8d08bbb4c26450d3bb01166522d93c19" alt="Happy Cartoon Cat">
</div>
<!-- Updated Text 1 -->
<h2>Nmout aelik chamsi taeiiiiiii 😍</h2>
<!-- Updated Text 2 -->
<p>Nti hiya yemat wladi 🥹</p>
</div>
</main>
<script>
document.addEventListener('DOMContentLoaded', () => {
const yesBtn = document.getElementById('yesBtn');
const noBtn = document.getElementById('noBtn');
const questionView = document.getElementById('questionView');
const successView = document.getElementById('successView');
const mainCard = document.getElementById('mainCard');
const body = document.body;
// --- "No" Button Logic ---
const moveButton = () => {
const btnRect = noBtn.getBoundingClientRect();
noBtn.style.position = 'fixed';
noBtn.style.left = Math.random() * (window.innerWidth - btnRect.width) + 'px';
noBtn.style.top = Math.random() * (window.innerHeight - btnRect.height) + 'px';
noBtn.style.transition = 'all 0.2s ease-out';
noBtn.style.transform = `rotate(${Math.random() * 20 - 10}deg)`;
};
noBtn.addEventListener('mouseover', moveButton);
noBtn.addEventListener('touchstart', (e) => {
e.preventDefault();
moveButton();
});
noBtn.addEventListener('click', (e) => {
e.preventDefault();
moveButton();
});
// --- "Yes" Button Logic ---
yesBtn.addEventListener('click', () => {
questionView.style.display = 'none';
successView.style.display = 'flex';
mainCard.style.background = 'linear-gradient(to bottom right, #fff, #fff0f3)';
mainCard.style.borderColor = '#ffb7b2';
createConfetti();
});
// --- Confetti Function ---
function createConfetti() {
const colors = ['#ffb7b2', '#a8e6cf', '#ffd3b6', '#ffaaa5', '#dcd6f7'];
for (let i = 0; i < 100; i++) {
const confetti = document.createElement('div');
confetti.classList.add('confetti');
const bg = colors[Math.floor(Math.random() * colors.length)];
const left = Math.random() * 100 + 'vw';
const animDuration = Math.random() * 3 + 2 + 's';
const size = Math.random() * 10 + 5 + 'px';
confetti.style.backgroundColor = bg;
confetti.style.left = left;
confetti.style.width = size;
confetti.style.height = size;
confetti.style.animationDuration = animDuration;
document.body.appendChild(confetti);
setTimeout(() => {
confetti.remove();
}, parseFloat(animDuration) * 1000);
}
}
});
</script>
</body>
</html>