/* General Styling */
body {
    font-family: 'Arial', sans-serif;
    background-color: #00FA9A; /* Soft background to reduce strain */
    margin: 0;
    padding: 0;
    text-align: center;
}

header {
    background-color: #4285f4; /* Warm, inviting blue */
    color: white;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2.5em;
    margin: 0;
}

p {
    font-size: 1.2em;
    margin-top: 10px;
}

/* Leibniz photo in the top-right corner */
#leibniz-photo {
    position: absolute;
    top: 100px;
    right: 20px;
    width: 450px;
    height: 300px;
    border-radius: 8px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    border: 3px solid #ffa726; /* Orange border for emphasis */
}

/* Animated notification for Set A to Set B instruction */
#animated-notification {
    font-size: 1.3em;
    color: #333;
    animation: blink-animation 2s infinite;
    margin-bottom: 20px;
}

@keyframes blink-animation {
    0%, 100% {
        opacity: 1;
        color: #8e44ad; /* Purple to catch attention */
    }
    50% {
        opacity: 0.7;
        color: #e74c3c; /* Red for emphasis */
    }
}

/* Function Animation Section */
#function-visual {
    background-color: #e3f2fd; /* Soft sky blue */
    border-radius: 12px;
    padding: 20px;
    margin: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#animation-container {
    position: relative;
    margin: 20px 0;
}

#point {
    font-size: 3em;
    color: #2ecc71; /* Bright green for visibility */
    position: absolute;
    top: 10px;
    left: 0;
    animation: moveRight 5s linear infinite;
}

@keyframes moveRight {
    0% { left: 0; }
    100% { left: 300px; }
}

#path {
    font-size: 2em;
    display: flex;
    justify-content: center;
}

.arrow {
    margin: 0 10px;
    color: #f39c12; /* Orange for the arrows */
}

/* Cartesian Product Section */
.sets-container {
    display: flex;
    justify-content: space-around;
    margin: 20px;
}

.set {
    background-color: #ffccbc; /* Light coral */
    padding: 20px;
    border-radius: 10px;
    width: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    animation: highlight 2s infinite alternate;
}

@keyframes highlight {
    0% { box-shadow: 0 0 10px rgba(0, 150, 136, 0.3); }
    100% { box-shadow: 0 0 15px rgba(0, 150, 136, 0.6); }
}

.element {
    background-color: #a5d6a7; /* Light green for draggable items */
    padding: 10px;
    margin: 10px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-size: 2em;
    color: #2e7d32; /* Darker green for contrast */
}

/* Real-World Examples Section */
.animation-container {
    background-color: #f3e5f5; /* Light lavender */
    padding: 20px;
    border-radius: 12px;
    width: 450px;
    margin: 20px auto;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #8e24aa; /* Bold purple for section headings */
}

/* Price vs. Demand Graph */
#price-demand-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#price-label {
    margin-top: 10px;
    font-size: 1.2em;
    color: #d32f2f; /* Red to highlight change */
}

/* Distance vs. Time Animation */
#distance-time-animation {
    margin-top: 20px;
    position: relative;
    width: 300px;
    height: 100px;
    margin: 0 auto;
}

#car {
    font-size: 2em;
    color: #ff8a65; /* Soft coral for the car */
    position: absolute;
    top: 30px;
    left: 0;
    animation: driveCar 5s linear infinite;
}

@keyframes driveCar {
    0% { left: 0; }
    100% { left: 260px; }
}

#track {
    display: flex;
    justify-content: space-between;
    font-size: 2em;
    margin-top: 10px;
    color: #ffa726; /* Track arrows in bright orange */
}

#time-distance {
    margin-top: 20px;
    font-size: 1.2em;
    color: #6a1b9a; /* Deep purple for time-distance text */
}
