/* =========================================
   1. IMPORTS & VARIABLES
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&family=Outfit:wght@300;500;700&display=swap');

:root {
    --primary: #ec4899;   /* Pink-500 */
    --secondary: #8b5cf6; /* Violet-500 */
    --accent: #f43f5e;    /* Rose-500 */
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.05);
}

/* =========================================
   2. GLOBAL BASE STYLES
   ========================================= */
body {
    font-family: 'Outfit', sans-serif;
    background-color: #000;
    color: white;
    overflow: hidden; /* Prevent scrolling during experience */
    -webkit-font-smoothing: antialiased;
}

/* Custom Romantic Cursor */
body {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="white" stroke="%23ec4899" stroke-width="2"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>') 12 12, auto;
}

/* Clickable elements get the active cursor */
button, .envelope-wrapper {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="%23ec4899" stroke="white" stroke-width="2"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>') 12 12, pointer;
}

.romantic-font {
    font-family: 'Dancing Script', cursive;
}

/* =========================================
   3. AURORA BACKGROUND ANIMATION
   ========================================= */
#aurora-bg {
    background: #0f172a;
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 10s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--primary);
    animation-duration: 12s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: var(--secondary);
    animation-delay: -5s;
    animation-duration: 15s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: #3b82f6;
    animation-duration: 18s;
    opacity: 0.4;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    100% { transform: translate(30px, 50px) rotate(10deg) scale(1.1); }
}

/* =========================================
   4. GLASSMORPHISM CARD
   ========================================= */
.glass-card {
    /* The outer container clips the content */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s;
}

/* The spinning gradient border */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin-slow {
    animation: spin-slow 10s linear infinite;
    /* Scale up to ensure corners are covered during rotation */
    transform-origin: center;
    scale: 1.5; 
}

/* =========================================
   5. ENVELOPE ENTRY ANIMATION
   ========================================= */
.envelope-wrapper {
    perspective: 1000px;
}

.envelope {
    /* Base shape */
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* =========================================
   6. AUDIO VISUALIZER
   ========================================= */
.bar {
    width: 4px;
    background: white;
    border-radius: 4px;
    animation: sound 0.5s ease-in-out infinite alternate;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

@keyframes sound {
    0% { height: 4px; opacity: 0.3; }
    100% { height: 24px; opacity: 1; }
}

/* =========================================
   7. FLOATING PARTICLES (HEARTS)
   ========================================= */
.particle-heart {
    position: absolute;
    color: rgba(255, 255, 255, 0.2);
    font-size: 20px;
    animation: rise 8s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes rise {
    0% {
        transform: translateY(110vh) scale(0.5) rotate(0deg);
        opacity: 0;
    }
    20% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-10vh) scale(1.5) rotate(360deg);
        opacity: 0;
    }
}

/* =========================================
   8. UTILITIES & INPUT STYLES
   ========================================= */
/* Custom Scrollbar for Text Areas if needed */
textarea::-webkit-scrollbar {
    width: 6px;
}
textarea::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

/* Input Placeholder styling */
input::placeholder, textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Shake Animation for Validation Errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.animate-shake {
    animation: shake 0.3s ease-in-out;
    border-color: #f43f5e !important; /* Red border on error */
}

/* Hide elements utility */
.hidden {
    display: none !important;
}
/* 🌈 Cinematic Typography */
#step-text {
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
    
    /* PRESERVE WHITE SPACE LOGIC */
    white-space: pre-wrap;       /* Respects \n and spaces */
    word-wrap: break-word;       /* Prevents overflow on mobile */
    overflow-wrap: break-word;
    
    text-align: center;
    display: block;
    width: 100%;
}

/* Optional: If you want a romantic cursive font for specific steps */
.romantic-font {
    font-family: 'Dancing Script', cursive !important;
    letter-spacing: 0.05em;
}