/* General Styling */
body {
    font-family: Arial, sans-serif;
    background-color: 	#DA70D6;
    color: #333;
    text-align: center;
    margin: 0;
    padding: 0;
}

header {
    background-color: #00695c;
    color: white;
    padding: 20px;
}

h1 {
    font-size: 2em;
}

/* Button Area Styling */
#button-area {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

button {
    padding: 10px 20px;
    cursor: pointer;
    background-color: #00796b;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #004d40;
}

/* Visualization Container */
#visualization-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
    margin-top: 20px;
}

/* Set Container and Labels */
#centered-sets {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    position: relative;
    padding: 20px;
    background-color: #e8f5e9;
    border-radius: 10px;
}

/* Set Styling */
.set {
    border: 2px solid #26a69a;
    padding: 20px 20px 10px;
    background-color: #e8f5e9;
    border-radius: 8px;
    width: 200px;
    text-align: center;
    position: relative;
}

/* Set Titles Styling (Vegetables and Fruits) */
.set-title {
    font-size: 1.2em;
    color: #00796b;
    font-weight: bold;
    position: absolute;
    top: -25px; /* Positions the label above the set */
    width: 100%;
    text-align: center;
}

/* Element Styling for Items within Sets */
.element {
    width: 60px;
    height: 60px;
    background-size: cover;
    margin: 10px auto;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s;
}

.element:hover {
    transform: scale(1.1);
}

/* SVG Container for Lines */
#svg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Line Styling */
.line {
    stroke: #ff5722;
    stroke-width: 2;
    opacity: 0;
    transition: opacity 0.5s, stroke-dashoffset 1s;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

.line.show {
    opacity: 1;
    stroke-dashoffset: 0;
}

/* Display for Current Pair Label */
#current-pair {
    font-size: 1.5em;
    color: #d32f2f;
    margin-top: 20px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.5s;
}

/* Explanation Boxes Container */
#explanation-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

/* Shared Styling for Both Explanation Boxes */
.explanation-box {
    padding: 20px;
    background-color: #ffebc9;
    border: 2px solid #ffa726;
    border-radius: 10px;
    max-width: 300px;
    text-align: left;
    color: #333;
    font-size: 1em;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Responsive Styling: Stacks Boxes on Smaller Screens */
@media (max-width: 600px) {
    #explanation-container {
        flex-direction: column;
        align-items: center;
    }
}

/* Animated Definition Container Styling */
#animated-definition-container {
    position: absolute;
    right: -400px;
    top: 100px;
    width: 300px;
    padding: 20px;
    background-color: #ffebc9;
    border: 2px solid #ffa726;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-align: left;
    transition: transform 0.5s ease-in-out;
}

/* Slide-in Animation */
#animated-definition-container.slide-in {
    transform: translateX(-400px); /* Slide to the visible position */
}

/* Animated Text Styling */
.animated-text {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.animated-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Highlight Styling for Key Terms */
.highlight {
    color: #d32f2f;
    font-weight: bold;
    background-color: #ffeb3b;
    padding: 2px 4px;
    border-radius: 4px;
}

