:root {
    --primary-color: #ff6b81;
    --secondary-color: #ff9a9e;
    --bg-gradient-start: #fecfef;
    --bg-gradient-end: #ff9a9e;
    --text-color: #fff;
    --gold: #ffd700;
    --white: #ffffff;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: var(--white);
}

.background-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.floating-heart {
    position: absolute;
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
    opacity: 0.6;
}

.floating-heart:nth-child(1) { left: 10%; top: 100%; animation-duration: 8s; animation-delay: 0s; }
.floating-heart:nth-child(2) { left: 30%; top: 100%; animation-duration: 10s; animation-delay: 2s; }
.floating-heart:nth-child(3) { left: 50%; top: 100%; animation-duration: 7s; animation-delay: 4s; }
.floating-heart:nth-child(4) { left: 70%; top: 100%; animation-duration: 9s; animation-delay: 1s; }
.floating-heart:nth-child(5) { left: 90%; top: 100%; animation-duration: 11s; animation-delay: 3s; }

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.8; }
    100% { transform: translateY(-120vh) rotate(360deg); opacity: 0; }
}

.container {
    position: relative;
    width: 90%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.step {
    display: none;
    opacity: 0;
    width: 100%;
}

.step.active {
    display: block;
    /* Default animation fallback */
    animation: fadeIn 0.8s forwards;
}

/* Custom Animations per step */
.step.active.anim-fade { animation: fadeIn 0.8s forwards; }
.step.active.anim-slide-left { animation: slideInLeft 0.8s forwards; }
.step.active.anim-slide-right { animation: slideInRight 0.8s forwards; }
.step.active.anim-zoom { animation: zoomIn 0.8s forwards; }
.step.active.anim-bounce-in { animation: bounceIn 0.8s forwards; }
.step.active.anim-pulse-in { animation: pulseIn 0.8s forwards; }
.step.active.anim-scale-up { animation: scaleUp 0.8s forwards; }

.step.exit, .step.active.exit {
    animation: fadeOut 0.5s forwards !important;
}

/* Keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { opacity: 1; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes pulseIn {
    0% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.5) rotate(-5deg); }
    to { opacity: 1; transform: scale(1) rotate(0deg); }
}

.title {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.message {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.visuals {
    font-size: 3rem;
    margin: 1rem 0;
    animation: floatVisuals 3s ease-in-out infinite;
}

@keyframes floatVisuals {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.big-title {
    font-size: 4rem;
    color: var(--gold);
    text-shadow: 2px 2px 0px #fff;
}

.big-message {
    font-size: 1.5rem;
    font-weight: bold;
}

.next-btn {
    background: var(--white);
    color: var(--primary-color);
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.next-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    background: #fff0f5;
}

.replay-btn {
    margin-top: 1rem;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .title { font-size: 2.5rem; }
    .big-title { font-size: 3rem; }
    .message { font-size: 1rem; }
    .container { padding: 1.5rem; }
}
