/* Base Styles */
:root {
    --primary-bg: #0b0c10;
    --text-color: #f5f5f5;
    --accent-color: #e5a9a9; /* Soft romantic pink/rose gold */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: default; /* Make sure mouse is always standard arrow */
}

body {
    background-color: var(--primary-bg);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    overflow: hidden; /* Prevent scrolling during animation */
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

#sparkles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none; /* Let clicks pass through to elements below */
    z-index: 9999;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

/* Screen Management */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 2s ease-in-out, visibility 2s;
    z-index: 10;
}

.screen.visible {
    opacity: 1;
    visibility: visible;
    z-index: 20;
}

/* Glassmorphism Panels */
.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    transform: translateY(20px);
    animation: floatUp 1s ease-out forwards;
}

.glass-panel-dark {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

@keyframes floatUp {
    to { transform: translateY(0); }
}

/* Intro Screen */
#intro-screen h1 {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

#intro-screen p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #cccccc;
}

button {
    background: linear-gradient(135deg, #e5a9a9, #d48282);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(229, 169, 169, 0.4);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(229, 169, 169, 0.6);
}

/* Phase 1 */
#phase1-screen h1 {
    font-size: 3rem;
    text-align: center;
    color: var(--accent-color);
    padding: 0 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.fade-text {
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.fade-text.show {
    opacity: 1;
}

/* Phase 2 */
.photo-container {
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.photo-fade {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 2s ease-in-out, transform 10s ease-out;
}

.photo-fade.show {
    opacity: 1;
    transform: scale(1);
}

/* Phase 3 */
#phase3-screen {
    align-items: flex-end;
    padding-bottom: 1.5vh;
}

.bg-photo-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(15px);
    transform: scale(1.1);
    z-index: 0;
    transition: opacity 0.8s ease-in-out;
}

.bg-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
    transition: opacity 0.8s ease-in-out;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(11, 12, 16, 1) 0%, rgba(11, 12, 16, 0.5) 40%, transparent 100%);
    z-index: 2;
    pointer-events: none;
    transition: opacity 1s ease-in-out;
}

.narration-container {
    position: relative;
    z-index: 3;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 1s ease-in-out;
}

.final-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    font-size: 8rem;
    opacity: 0;
    visibility: hidden;
    z-index: 10;
    transition: opacity 2s ease-in-out, transform 3s ease-out, visibility 2s;
    text-shadow: 0 0 40px rgba(255, 105, 180, 0.9);
}

.final-heart.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1.3);
}

.nav-btn {
    margin-top: 1.5rem;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-btn.show {
    opacity: 1;
    visibility: visible;
}

.narration-fade {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #fff;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    font-weight: 300;
}

.narration-fade.show {
    opacity: 1;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    #phase1-screen h1 {
        font-size: 2.2rem;
    }
    
    .glass-panel {
        padding: 2rem 1.5rem;
    }
    
    #intro-screen h1 {
        font-size: 2rem;
    }
    
    .narration-fade {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .glass-panel-dark {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    #phase1-screen h1 {
        font-size: 1.8rem;
    }
    
    .narration-fade {
        font-size: 0.95rem;
    }
}
