<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Animated UI Demo</title>
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
body {
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: #0f172a;
color: #f8fafc;
}
/* Card Entrance Animation */
.card {
width: 340px;
padding: 24px;
background: rgba(30, 41, 59, 0.7);
backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 20px;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
opacity: 0;
transform: translateY(30px) scale(0.95);
animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* Subtle Hover Lift */
.card:hover {
transform: translateY(-6px) scale(1.01);
box-shadow: 0 30px 60px rgba(99, 102, 241, 0.2);
}
@keyframes fadeInUp {
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
.badge {
display: inline-block;
padding: 4px 12px;
font-size: 12px;
font-weight: 600;
color: #818cf8;
background: rgba(99, 102, 241, 0.15);
border-radius: 20px;
margin-bottom: 16px;
}
h3 {
font-size: 20px;
margin-bottom: 8px;
}
p {
font-size: 14px;
color: #94a3b8;
line-height: 1.5;
margin-bottom: 24px;
}
/* Animated Action Bar */
.action-row {
display: flex;
justify-content: space-between;
align-items: center;
}
.status {
font-size: 13px;
color: #38bdf8;
font-weight: 500;
transition: color 0.3s ease;
}
/* Animated Toggle Button */
.btn {
padding: 10px 20px;
border: none;
border-radius: 12px;
background: linear-gradient(135deg, #6366f1, #4f46e5);
color: #fff;
font-weight: 600;
cursor: pointer;
position: relative;
overflow: hidden;
transition: all 0.3s ease;
}
.btn:hover {
background: linear-gradient(135deg, #4f46e5, #4338ca);
box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}
.btn:active {
transform: scale(0.96);
}
.btn.active {
background: linear-gradient(135deg, #10b981, #059669);
box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}
</style>
</head>
<body>
<div class="card">
<span class="badge">Interactive UI</span>
<h3>Animated Card</h3>
<p>Hover over the card to feel the smooth lift effect, or click the button below to trigger an interactive state change.</p>
<div class="action-row">
<span class="status" id="statusText">Status: Idle</span>
<button class="btn" id="toggleBtn">Activate</button>
</div>
</div>
<script>
const btn = document.getElementById('toggleBtn');
const statusText = document.getElementById('statusText');
btn.addEventListener('click', () => {
btn.classList.toggle('active');
if (btn.classList.contains('active')) {
btn.textContent = 'Active';
statusText.textContent = 'Status: Live';
statusText.style.color = '#34d399';
} else {
btn.textContent = 'Activate';
statusText.textContent = 'Status: Idle';
statusText.style.color = '#38bdf8';
}
});
</script>
</body>
</html>
<!DOCTYPE html><html lang=”en”><head> <meta charset=”UTF-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <title>Animated UI Demo</title> <style> * { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, ‘Segoe UI’, Roboto, sans-serif; } body { min-height: 100vh; display: flex; justify-content: center; align-items: center; background: #0f172a; color: #f8fafc; } /* Card Entrance Animation */ .card { width: 340px; padding: 24px; background: rgba(30, 41, 59, 0.7); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 20px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4); opacity: 0; transform: translateY(30px) scale(0.95); animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; transition: transform 0.3s ease, box-shadow 0.3s ease; } /* Subtle Hover Lift */ .card:hover { transform: translateY(-6px) scale(1.01); box-shadow: 0 30px 60px rgba(99, 102, 241, 0.2); } @keyframes fadeInUp { to { opacity: 1; transform: translateY(0) scale(1); } } .badge { display: inline-block; padding: 4px 12px; font-size: 12px; font-weight: 600; color: #818cf8; background: rgba(99, 102, 241, 0.15); border-radius: 20px; margin-bottom: 16px; } h3 { font-size: 20px; margin-bottom: 8px; } p { font-size: 14px; color: #94a3b8; line-height: 1.5; margin-bottom: 24px; } /* Animated Action Bar */ .action-row { display: flex; justify-content: space-between; align-items: center; } .status { font-size: 13px; color: #38bdf8; font-weight: 500; transition: color 0.3s ease; } /* Animated Toggle Button */ .btn { padding: 10px 20px; border: none; border-radius: 12px; background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; font-weight: 600; cursor: pointer; position: relative; overflow: hidden; transition: all 0.3s ease; } .btn:hover { background: linear-gradient(135deg, #4f46e5, #4338ca); box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4); } .btn:active { transform: scale(0.96); } .btn.active { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4); } </style></head><body> <div class=”card”> <span class=”badge”>Interactive UI</span> <h3>Animated Card</h3> <p>Hover over the card to feel the smooth lift effect, or click the button below to trigger an interactive state change.</p> <div class=”action-row”> <span class=”status” id=”statusText”>Status: Idle</span> <button class=”btn” id=”toggleBtn”>Activate</button> </div> </div> <script> const btn = document.getElementById(‘toggleBtn’); const statusText = document.getElementById(‘statusText’); btn.addEventListener(‘click’, () => { btn.classList.toggle(‘active’); if (btn.classList.contains(‘active’)) { btn.textContent = ‘Active’; statusText.textContent = ‘Status: Live’; statusText.style.color = ‘#34d399’; } else { btn.textContent = ‘Activate’; statusText.textContent = ‘Status: Idle’; statusText.style.color = ‘#38bdf8’; } }); </script></body></html>