Valentine_prop / static /style.css
Hemann's picture
Update static/style.css
dd87b83 verified
Raw
History Blame Contribute Delete
13.1 kB
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;900&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}
body {
font-family: 'Poppins', sans-serif;
overflow: hidden;
user-select: none;
}
.container {
min-height: 100vh;
width: 100vw;
background: linear-gradient(135deg, #fff0f3 0%, #ffe4e9 50%, #ffd4e5 100%);
display: flex;
align-items: center;
justify-content: center;
position: relative;
overflow: hidden;
padding-top: 30px; /* Space for header */
}
/* Sparkle canvas */
#sparkleCanvas {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 1;
}
/* Floating hearts background */
.hearts-background {
position: absolute;
inset: 0;
pointer-events: none;
overflow: hidden;
}
.floating-heart {
position: absolute;
font-size: 2rem;
opacity: 0.6;
animation: floatUp linear infinite;
}
/* Card */
.card {
background: rgba(255, 255, 255, 0.7);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border: 2px solid rgba(255, 255, 255, 0.3);
border-radius: 30px;
padding: 3rem 2rem;
max-width: 550px;
width: 90%;
box-shadow: 0 20px 60px rgba(255, 77, 109, 0.3);
position: relative;
z-index: 10;
animation: cardEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
margin: 2rem auto;
}
.content {
position: relative;
width: 100%;
}
.screen {
display: none;
text-align: center;
}
.screen.active {
display: block;
animation: fadeIn 0.5s ease-out;
}
/* Emoji container */
.emoji-container {
position: relative;
display: inline-block;
margin-bottom: 1.5rem;
}
.main-emoji {
font-size: 6rem;
animation: heartbeat 1.5s ease-in-out infinite;
display: inline-block;
}
.floating-emoji {
position: absolute;
font-size: 2.5rem;
top: -10px;
right: -20px;
animation: float 2s ease-in-out infinite;
}
.floating-emoji-2 {
position: absolute;
font-size: 2rem;
bottom: 0;
left: -15px;
animation: float 2.5s ease-in-out infinite;
}
/* Title */
.title {
font-size: 2rem;
font-weight: 700;
color: #590d22;
margin-bottom: 0.5rem;
line-height: 1.4;
}
.name-highlight {
color: #ff4d6d;
text-shadow: 2px 2px 4px rgba(255, 77, 109, 0.3);
animation: glow 2s ease-in-out infinite;
}
.valentine-text {
display: block;
color: #ff4d6d;
font-size: 2.5rem;
margin-top: 0.5rem;
animation: pulse 2s ease-in-out infinite;
}
.subtitle {
color: #590d22;
font-size: 1.1rem;
margin-bottom: 2rem;
opacity: 0.8;
}
/* Buttons */
.button-container {
position: relative;
min-height: 120px;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: 1.5rem;
margin-bottom: 1rem;
padding: 0 1rem;
}
.btn {
font-family: 'Poppins', sans-serif;
font-size: 1.2rem;
font-weight: 600;
padding: 1rem 2.5rem;
border: none;
border-radius: 50px;
cursor: pointer;
transition: all 0.3s ease;
color: white;
position: relative;
z-index: 10;
flex-shrink: 0;
}
.btn-yes {
background: linear-gradient(135deg, #ff4d6d 0%, #ff758f 100%);
box-shadow: 0 8px 25px rgba(255, 77, 109, 0.4);
animation: pulseGlow 2s infinite;
}
.btn-yes:hover {
transform: scale(1.1) rotate(-2deg);
box-shadow: 0 12px 35px rgba(255, 77, 109, 0.6);
}
.btn-yes:active {
transform: scale(0.95);
}
.btn-no {
background: linear-gradient(135deg, #590d22 0%, #800f2f 100%);
box-shadow: 0 4px 15px rgba(89, 13, 34, 0.3);
transition: all 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
position: relative;
}
.btn-no.moving {
position: absolute !important;
}
.btn-no.vanished {
opacity: 0 !important;
pointer-events: none !important;
transform: scale(0) rotate(360deg) !important;
}
/* Phrase */
.phrase {
min-height: 30px;
color: #ff4d6d;
font-weight: 600;
font-size: 1.1rem;
margin: 1rem 0;
animation: bounceIn 0.5s ease-out;
}
.hint {
color: #590d22;
opacity: 0.5;
font-size: 0.9rem;
margin-top: 1rem;
}
.attempt-counter {
margin-top: 1rem;
color: #590d22;
font-weight: 600;
font-size: 0.95rem;
min-height: 25px;
}
/* Success screen */
.success-emoji {
font-size: 8rem;
animation: bounce 1s ease-out;
margin-bottom: 1rem;
}
.success-title {
font-size: 2.5rem;
color: #ff4d6d;
font-weight: 900;
margin-bottom: 1.5rem;
animation: bounceIn 0.6s ease-out;
}
.success-message {
background: rgba(255, 240, 243, 0.8);
border-radius: 20px;
padding: 2rem;
margin-bottom: 1.5rem;
}
.success-message p {
color: #590d22;
font-size: 1.2rem;
font-weight: 600;
margin-bottom: 1rem;
}
.heart-row {
display: flex;
justify-content: center;
gap: 1rem;
margin: 1.5rem 0;
}
.beating-heart {
font-size: 2.5rem;
display: inline-block;
animation: heartbeat 1s ease-in-out infinite;
}
.beating-heart:nth-child(2) {
animation-delay: 0.2s;
}
.beating-heart:nth-child(3) {
animation-delay: 0.4s;
}
.love-quote {
font-style: italic;
color: #ff4d6d;
font-size: 1rem;
margin-top: 1rem;
}
.stats-message {
background: rgba(255, 77, 109, 0.1);
border-radius: 15px;
padding: 1rem;
margin-bottom: 1.5rem;
color: #590d22;
font-size: 0.95rem;
}
.btn-replay {
background: transparent;
color: #ff4d6d;
border: 2px solid #ff4d6d;
margin-bottom: 1.5rem;
}
.btn-replay:hover {
background: #ff4d6d;
color: white;
transform: scale(1.05);
}
/* Share section */
.share-section {
margin-top: 2rem;
padding-top: 1.5rem;
border-top: 2px dashed rgba(255, 77, 109, 0.3);
}
.share-text {
color: #590d22;
font-weight: 600;
margin-bottom: 0.8rem;
}
.share-input {
width: 100%;
padding: 0.8rem;
border: 2px solid #ff4d6d;
border-radius: 10px;
font-family: 'Poppins', sans-serif;
font-size: 0.9rem;
margin-bottom: 0.8rem;
text-align: center;
background: rgba(255, 255, 255, 0.8);
}
.btn-copy {
background: linear-gradient(135deg, #ff4d6d 0%, #ff758f 100%);
font-size: 1rem;
padding: 0.8rem 2rem;
}
.btn-copy:hover {
transform: scale(1.05);
}
/* Header Credit at Top */
.header-credit {
position: fixed;
top: 0;
left: 0;
right: 0;
padding: 1rem;
text-align: center;
z-index: 1000;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(15px);
-webkit-backdrop-filter: blur(15px);
border-bottom: 2px solid rgba(255, 77, 109, 0.2);
box-shadow: 0 2px 20px rgba(255, 77, 109, 0.15);
}
.header-credit p {
color: #590d22;
font-size: 0.9rem;
font-weight: 500;
margin: 0;
letter-spacing: 0.5px;
}
.creator-name {
color: #ff4d6d;
font-weight: 900;
font-size: 1.1rem;
text-shadow: 0 0 15px rgba(255, 77, 109, 0.6);
animation: headerGlow 2.5s ease-in-out infinite;
padding: 0 0.3rem;
display: inline-block;
}
@keyframes headerGlow {
0%, 100% {
text-shadow: 0 0 15px rgba(255, 77, 109, 0.6);
transform: scale(1);
}
50% {
text-shadow: 0 0 25px rgba(255, 77, 109, 1), 0 0 35px rgba(255, 77, 109, 0.7);
transform: scale(1.05);
}
}
/* Animations */
@keyframes cardEntrance {
0% {
opacity: 0;
transform: scale(0.8) translateY(50px);
}
100% {
opacity: 1;
transform: scale(1) translateY(0);
}
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes heartbeat {
0%, 100% {
transform: scale(1);
}
50% {
transform: scale(1.15);
}
}
@keyframes float {
0%, 100% {
transform: translateY(0) rotate(0deg);
}
50% {
transform: translateY(-20px) rotate(10deg);
}
}
@keyframes floatUp {
0% {
transform: translateY(100vh) scale(1) rotate(0deg);
opacity: 0.8;
}
100% {
transform: translateY(-10vh) scale(0.8) rotate(360deg);
opacity: 0;
}
}
@keyframes glow {
0%, 100% {
text-shadow: 2px 2px 4px rgba(255, 77, 109, 0.3);
}
50% {
text-shadow: 0 0 20px rgba(255, 77, 109, 0.8);
}
}
@keyframes pulse {
0%, 100% {
transform: scale(1);
}
50% {
transform: scale(1.05);
}
}
@keyframes pulseGlow {
0%, 100% {
box-shadow: 0 8px 25px rgba(255, 77, 109, 0.4);
}
50% {
box-shadow: 0 8px 40px rgba(255, 77, 109, 0.7);
}
}
@keyframes bounceIn {
0% {
opacity: 0;
transform: scale(0.3);
}
50% {
opacity: 1;
transform: scale(1.05);
}
70% {
transform: scale(0.9);
}
100% {
transform: scale(1);
}
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% {
transform: translateY(0);
}
40% {
transform: translateY(-30px);
}
60% {
transform: translateY(-15px);
}
}
/* Responsive */
@media (max-width: 640px) {
.container {
padding-top: 60px; /* Adjust for mobile header */
}
.header-credit {
padding: 0.75rem 0.5rem;
}
.header-credit p {
font-size: 0.75rem;
}
.creator-name {
font-size: 0.95rem;
}
.card {
padding: 2rem 1.5rem;
width: 95%;
margin: 1rem auto;
}
.title {
font-size: 1.5rem;
}
.valentine-text {
font-size: 2rem;
}
.main-emoji {
font-size: 4rem;
}
.btn {
font-size: 1rem;
padding: 0.8rem 2rem;
width: 100%;
max-width: 250px;
}
.button-container {
flex-direction: column;
gap: 1rem;
min-height: 150px;
}
.success-title {
font-size: 2rem;
}
.success-message p {
font-size: 1rem;
}
}
@media (max-width: 400px) {
.header-credit p {
font-size: 0.65rem;
}
.creator-name {
font-size: 0.85rem;
}
.card {
padding: 1.5rem 1rem;
}
.title {
font-size: 1.3rem;
}
.valentine-text {
font-size: 1.8rem;
}
}
/* Confetti */
.confetti {
position: fixed;
width: 10px;
height: 10px;
top: -10px;
z-index: 9999;
animation: confettiFall linear forwards;
}
@keyframes confettiFall {
to {
transform: translateY(100vh) rotate(360deg);
opacity: 0;
}
}
/* Shake animation */
@keyframes shake {
0%, 100% {
transform: translateX(0);
}
10%, 30%, 50%, 70%, 90% {
transform: translateX(-5px);
}
20%, 40%, 60%, 80% {
transform: translateX(5px);
}
}
.shake {
animation: shake 0.5s ease-in-out;
}
/* Screen shake effect */
.screen-shake {
animation: screenShake 0.5s ease-in-out;
}
@keyframes screenShake {
0%, 100% {
transform: translate(0, 0);
}
10%, 30%, 50%, 70%, 90% {
transform: translate(-5px, -5px);
}
20%, 40%, 60%, 80% {
transform: translate(5px, 5px);
}
}
/* Explosion particles */
.explosion-particle {
position: fixed;
width: 8px;
height: 8px;
background: radial-gradient(circle, #ff4d6d, #ff758f);
border-radius: 50%;
pointer-events: none;
z-index: 10000;
animation: explode 1s ease-out forwards;
}
@keyframes explode {
0% {
transform: translate(0, 0) scale(1);
opacity: 1;
}
100% {
transform: translate(var(--tx), var(--ty)) scale(0);
opacity: 0;
}
}
/* Firework particles */
.firework-particle {
position: fixed;
width: 6px;
height: 6px;
border-radius: 50%;
pointer-events: none;
z-index: 10000;
animation: firework 1.5s ease-out forwards;
}
@keyframes firework {
0% {
transform: translate(0, 0) scale(1);
opacity: 1;
}
100% {
transform: translate(var(--tx), var(--ty)) scale(0);
opacity: 0;
}
}
/* Heart burst effect */
.heart-burst {
position: fixed;
pointer-events: none;
z-index: 10000;
animation: heartBurst 2s ease-out forwards;
}
@keyframes heartBurst {
0% {
transform: translate(-50%, -50%) scale(0) rotate(0deg);
opacity: 1;
}
50% {
transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.5) rotate(180deg);
opacity: 1;
}
100% {
transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.5) rotate(360deg);
opacity: 0;
}
}
/* Accessibility */
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}