#animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1; /* Updated z-index to be over the background (0) but under content (2) */
    pointer-events: none;
    overflow: hidden;
    background: transparent;
}

/* SVG Doodle Styles */
.doodle {
    position: absolute;
    overflow: visible;
    width: 80px;
    height: 80px;
    /* Center the transformation */
    transform-origin: center center;
}

.doodle path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.5;

    /* Drawing animation setup */
    stroke-dasharray: var(--path-length, 1000);
    stroke-dashoffset: var(--path-length, 1000);

    /* Apply both animations */
    animation:
        draw calc(var(--draw-duration, 3s) * 1.5) ease-in-out infinite alternate,
        float calc(var(--float-duration, 6s) * 1.5) ease-in-out infinite alternate;
    animation-delay: calc(var(--draw-delay, 0s) * 1.5), calc(var(--float-delay, 0s) * 1.5);
}

@keyframes draw {
    0% {
        stroke-dashoffset: var(--path-length, 1000);
    }
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes float {
    0% {
        transform: translate(0px, 0px) rotate(0deg);
    }
    100% {
        transform: translate(var(--float-x, 10px), var(--float-y, -20px)) rotate(var(--float-rot, 5deg));
    }
}

/* Scale down on smaller screens */
@media (max-width: 768px) {
    .doodle {
        width: 50px;
        height: 50px;
    }
    .doodle path {
        stroke-width: 2;
    }
}

/* Petals for index.html from custom-gifts.html logic */
#main-petals-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50; /* High z-index to fall over content but below header maybe, or on top of everything */
    overflow: visible; /* Important so petals can fall out */
}

.main-petal {
    position: absolute;
    top: -20px;
    background-color: #d11e3b; /* Base rose red color */
    border-radius: 15% 85% 15% 85% / 15% 85% 15% 85%; /* Organic petal shape */
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
    opacity: 0.8;
    pointer-events: none;
}
