body {
    margin: 0;
    padding: 0;
    background: #0f172a; /* Soft dark slate/blue premium background */
    color: #f8fafc;
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

.z-1 {
    z-index: 1;
}

.btn-custom {
    background: linear-gradient(135deg, #f43f5e, #ec4899);
    border: none;
    color: white;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
    cursor: pointer;
    letter-spacing: 0.5px;
}

.btn-custom:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.6);
    color: white;
}

/* Glassmorphism Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 45px;
    max-width: 650px;
    width: 95%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    opacity: 0;
    animation: fadeUp 1s ease forwards;
    display: flex;
    flex-direction: column;
}

.title {
    font-family: 'Playfair Display', serif;
    color: #fce7f3;
    font-size: 2.2rem;
    text-align: center;
    text-shadow: 0 2px 10px rgba(244, 63, 94, 0.3);
    font-weight: 700;
}

/* Polaroid Photo Styles */
.photo-container {
    opacity: 0;
    transform: translateY(30px) scale(0.8) rotate(-8deg);
    transition: all 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 0;
    overflow: hidden;
    margin: 0 auto;
}

.photo-container.show {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(3deg);
    max-height: 500px; /* Enough space for the image */
    margin-bottom: 25px;
}

.polaroid {
    background: #fff;
    padding: 12px 12px 35px 12px; /* Thick bottom padding for polaroid look */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    display: inline-block;
    border-radius: 6px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
    position: relative;
}

.polaroid::after {
    content: "♥️";
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    color: #f43f5e;
}

.polaroid:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 0 20px 45px rgba(244, 63, 94, 0.4);
}

.polaroid img {
    max-width: 250px;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
}

.message-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #e2e8f0;
    min-height: 250px; /* Pre-allocate space to avoid jumping UI */
    width: 100%;
}

/* Customize Typewriter Cursor */
.Typewriter__cursor {
    color: #f43f5e;
    font-weight: bold;
}

.signature {
    font-size: 1rem;
    color: #cbd5e1;
    margin-bottom: 5px;
}

.signature-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: #f43f5e;
    font-style: italic;
    font-weight: 600;
}

@keyframes fadeUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.fade-in-up {
    animation: fadeUp 1.5s ease forwards;
}

/* Mobile Responsiveness */
@media (max-width: 576px) {
    .glass-card {
        padding: 30px 20px;
    }
    .title {
        font-size: 1.7rem;
    }
    .message-text {
        font-size: 0.95rem;
    }
    .polaroid img {
        max-width: 200px;
    }
}
