/* Enhanced Background Animations */
.background-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

/* Stationary Elements */
.stationary-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Floating Stationary Items */
.floating-item {
    position: absolute;
    will-change: transform;
    pointer-events: none;
    user-select: none;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

/* Stationary Items */
.stationary-item {
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.1));
    opacity: 0.7;
    transition: all 0.3s ease;
}

.stationary-item:hover {
    transform: scale(1.2) rotate(10deg) !important;
    opacity: 1;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
}

/* Decorative Elements */
.decorative-item {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    opacity: 0.8;
    transition: all 0.5s ease;
}

.decorative-item:hover {
    transform: scale(1.3) rotate(-10deg) !important;
    opacity: 1;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
}

/* Interactive Elements */
.interactive-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* Drawing Pencil Animation */
.drawing-pencil {
    transform-origin: 20% 50%;
    will-change: transform;
    animation: draw-line 15s linear infinite;
}

.drawing-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.3) 50%, 
        rgba(255,255,255,0) 100%);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transform-origin: left center;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .stationary-item, .decorative-item {
        transform: scale(0.8) !important;
    }
    
    .drawing-pencil {
        font-size: 30px !important;
    }
}

/* Special Effects for Specific Items */
[title="paint-palette"] {
    animation: spin 20s linear infinite !important;
}

[title="rainbow"] {
    animation: rainbow 8s ease-in-out infinite !important;
}

[title="butterfly"], 
[title="parrot"],
[title="dragonfly"],
[title="ladybug"] {
    animation: fly 15s ease-in-out infinite !important;
}

[title="flower"] {
    animation: bloom 12s ease-in-out infinite !important;
}

/* Keyframes for Special Effects */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rainbow {
    0%, 100% { filter: hue-rotate(0deg) saturate(2); }
    50% { filter: hue-rotate(180deg) saturate(1.5); }
}

@keyframes fly {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -10px) rotate(5deg); }
    50% { transform: translate(40px, 0) rotate(0deg); }
    75% { transform: translate(20px, 10px) rotate(-5deg); }
}

@keyframes bloom {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(5deg); }
}

/* Background Gradient */
.background-effects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(123, 97, 255, 0.1) 0%, 
        rgba(97, 218, 251, 0.1) 50%, 
        rgba(255, 107, 107, 0.1) 100%);
    z-index: -1;
    animation: gradientShift 20s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
