mirror of
https://github.com/tiennm99/valentine-2025.git
synced 2026-10-11 03:13:55 +00:00
125 lines
2.3 KiB
CSS
125 lines
2.3 KiB
CSS
@keyframes shake {
|
|
0%, 100% { transform: translateX(0); }
|
|
25% { transform: translateX(-5px) rotate(-5deg); }
|
|
75% { transform: translateX(5px) rotate(5deg); }
|
|
}
|
|
|
|
@keyframes float {
|
|
0%, 100% { transform: translateY(0); }
|
|
50% { transform: translateY(-10px); }
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(20px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0%, 100% { opacity: 1; transform: scale(1); }
|
|
50% { opacity: .8; transform: scale(1.1); }
|
|
}
|
|
|
|
@keyframes floating-hearts {
|
|
0% { transform: translateY(0) translateX(0) rotate(0); opacity: 1; }
|
|
100% { transform: translateY(-100px) translateX(var(--translate-x)) rotate(var(--rotate)); opacity: 0; }
|
|
}
|
|
|
|
.shake {
|
|
animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
|
|
}
|
|
|
|
.animate-float {
|
|
animation: float 2s ease-in-out infinite;
|
|
}
|
|
|
|
.animate-fade-in {
|
|
animation: fadeIn 1s ease-in;
|
|
}
|
|
|
|
.animate-pulse {
|
|
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
}
|
|
|
|
.hearts-animation {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.hearts-animation::before,
|
|
.hearts-animation::after {
|
|
content: '❤️';
|
|
position: absolute;
|
|
font-size: 1.5rem;
|
|
animation: floating-hearts 2s ease-in-out infinite;
|
|
opacity: 0;
|
|
}
|
|
|
|
.hearts-animation::before {
|
|
--translate-x: -20px;
|
|
--rotate: -30deg;
|
|
left: 40%;
|
|
}
|
|
|
|
.hearts-animation::after {
|
|
--translate-x: 20px;
|
|
--rotate: 30deg;
|
|
right: 40%;
|
|
animation-delay: 1s;
|
|
}
|
|
|
|
.music-controls {
|
|
position: fixed;
|
|
bottom: 20px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
z-index: 1000;
|
|
background: rgba(255, 255, 255, 0.9);
|
|
padding: 8px 16px;
|
|
border-radius: 9999px;
|
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
backdrop-filter: blur(5px);
|
|
}
|
|
|
|
.success-screen {
|
|
display: none;
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.music-controls {
|
|
bottom: 10px;
|
|
padding: 6px 12px;
|
|
width: calc(100% - 32px);
|
|
max-width: 300px;
|
|
}
|
|
|
|
.music-controls button {
|
|
width: 100%;
|
|
}
|
|
|
|
.hearts-animation::before,
|
|
.hearts-animation::after {
|
|
font-size: 1rem;
|
|
}
|
|
}
|
|
|
|
@media (max-height: 500px) and (orientation: landscape) {
|
|
.music-controls {
|
|
bottom: 5px;
|
|
}
|
|
|
|
.main-screen,
|
|
.success-screen {
|
|
padding: 1rem;
|
|
}
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
.music-controls {
|
|
background: rgba(0, 0, 0, 0.7);
|
|
}
|
|
}
|