/* Basic styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #1e2d660d, #4a7c8a0d);
    background-color: #faf8f5;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.animation-container {
    position: relative;
    width: 800px;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

/* Set up proper positioning context for media elements */
.media-elements {
    /* Container center is 400x300, robot chest area is about 200x200 within that */
    --center-x: 400px;
    --center-y: 280px;
}

/* Robot styling */
.robot-container {
    position: relative;
    width: 400px;
    height: 400px;
    z-index: 10;
}

#divinci-robot {
    width: 100%;
    height: 100%;
}

/* Media elements styling */
.media-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

.files-container, .videos-container, .audios-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

.media-element {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%; /* Changed from 8px to 50% to make perfect circles */
    opacity: 0;
    transform: translate(var(--startX, 0px), var(--startY, 0px));
    transition: box-shadow 0.3s ease;
}

/* Add a subtle inner shadow to enhance the bubble effect */
.media-element::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

/* Improve hover effect to enhance interactivity */
.media-element:hover {
    transform: scale(1.1) translate(var(--startX, 0px), var(--startY, 0px));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 5;
}

.media-element .emoji {
    font-size: 24px;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* File elements styling */
.media-element.file {
    background: linear-gradient(135deg, #e6f7ff, #b3e0ff);
    box-shadow: 0 3px 10px rgba(0, 100, 255, 0.3);
}

.media-element.file::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%; /* Changed from 8px to 50% for circle */
    background: linear-gradient(135deg, rgba(255,255,255,0.5), rgba(255,255,255,0));
    z-index: 0;
}

/* Video elements styling */
.media-element.video {
    background: linear-gradient(135deg, #fff0e6, #ffccb3);
    box-shadow: 0 3px 10px rgba(255, 100, 0, 0.3);
}

.media-element.video::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%; /* Changed from 8px to 50% for circle */
    background: linear-gradient(135deg, rgba(255,255,255,0.5), rgba(255,255,255,0));
    z-index: 0;
}

/* Audio elements styling */
.media-element.audio {
    background: linear-gradient(135deg, #e6ffe6, #b3ffb3);
    box-shadow: 0 3px 10px rgba(0, 255, 100, 0.3);
}

.media-element.audio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%; /* Changed from 8px to 50% for circle */
    background: linear-gradient(135deg, rgba(255,255,255,0.5), rgba(255,255,255,0));
    z-index: 0;
}

/* Animation enhancement classes */
.media-element.glowing {
    animation: glow 1.5s infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.6),
                   0 0 10px rgba(255, 255, 255, 0.4),
                   0 0 15px rgba(255, 255, 255, 0.2);
    }
    to {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.8),
                   0 0 20px rgba(255, 255, 255, 0.6),
                   0 0 30px rgba(255, 255, 255, 0.4);
    }
}

/* Media element size variations */
.media-element.small {
    width: 30px;
    height: 30px;
}

.media-element.large {
    width: 50px;
    height: 50px;
}


/* Glow effect for the robot */
.glow {
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8));
}

/* Pulse animation for the heart */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Particle effect styles */
.particle {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    opacity: 0.8;
    pointer-events: none;
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.7);
    z-index: 30;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Orbit Paths Styling */
.orbit-path {
    position: absolute;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.orbit-path.visible {
    opacity: 1;
}

/* Enhanced circular pulse effects */
@keyframes circlePulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.pulse-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    pointer-events: none;
    z-index: 3;
    animation: circlePulse 2s infinite;
}

/* Add subtle circular ripple effect when media elements are activated */
@keyframes ripple {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
        transform: scale(1);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
        transform: scale(1);
    }
}

.media-element.activated {
    animation: ripple 1s ease-out;
}
