/* Loading Screen */
/* Loading Container */
#loadingContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #282c34;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s ease;
 }

#logoContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#loadingLogo {
    width: 200px;  /* Adjust the size of the logo */
    height: auto;
    margin-bottom: 20px;
}

#progressBar {
    width: 200px;  /* Same width as the logo */
    height: 10px;
    background-color: #ccc;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

#progress {
    width: 0;
    height: 100%;
    background-color: #71da7a;  /* Green color for progress */
    border-radius: 5px;
    transition: width 0.3s ease;
}

/* the rest of the simulation */

body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #71da7a, #424242);
    color: #ffffff;
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    position: relative;
}

#logo {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 80px;
    height: auto;
    opacity: 0.9;
    z-index: 10;
}

#title {
    position: absolute;
    top: 10px;
    left: 40%;
    transform: translateX(-50%);
    font-size: 36px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

#controls {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #2c2c2c;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 8px solid #f1f1f1;
    margin-left: 20px; 
}

#controls label {
    font-weight: bold;
    font-size: 12px;
}

select, input[type="range"], button {
    width: 100%;
    padding: 8px;
    border-radius: 5px;
    border: none;
}

#container {
    width: 600px;
    height: 450px;
    background-color: rgba(30, 30, 30, 0.9);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
    margin-left: -200px; 
    margin-right: 50px;
    border: 10px solid white;
}

#electrolysisArea {
    position: relative;
    width: 100%;
    height: 300px;
    border: 2px solid #ffffff;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    margin: 20px 0;
}

.electrode {
    width: 10px;
    height: 100px;
    background-color: #777;
    position: absolute;
}

#anode {
    left: 30%;
    bottom: 0;
}

#cathode {
    right: 30%;
    bottom: 0;
}

.bubbles {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    animation: bubble-rise 5s infinite;
    font-weight: bold;
    text-align: center;
    line-height: 1.5;
    color: black;
}

@keyframes bubble-rise {
    0% {
        bottom: 0;
        opacity: 1;
    }
    100% {
        bottom: 100%;
        opacity: 0;
    }
}
#anodeLabel, #cathodeLabel {
    position: absolute;
    bottom: 10px;
    color: white;
    font-weight: bold;
    font-size: 1.2em;
}

#anodeLabel {
    left: 20px;
}

#cathodeLabel {
    right: 20px;
}

#quiz {
    background-color: rgb(14, 89, 14);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#quiz:hover {
    background-color: rgb(21, 104, 21);
}

label {
    margin-top: 10px;
}

input[type="range"] {
    margin: 5px 0;
}

button {
    margin-top: 10px;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #397b52;
    color: black;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #af8938;
}

#quizResults {
    margin-top: 20px;
    font-size: 1.2em;
    text-align: center;
}

.quiz-button {
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 5px; 
    margin: 5px;
    transition: background-color 0.3s ease; 
    
}

#prevButton {
    background-color: #FFC107; /* Yellow */
}

#prevButton:hover {
    background-color: #FFA000; /* Darker Yellow */
}

#nextButton {
    background-color: #2196F3; /* Blue */
}

#nextButton:hover {
    background-color: #1976D2; /* Darker Blue */
}

#backButton {
    background-color: #f44336; /* Red */
}

#backButton:hover {
    background-color: #e53935; /* Darker Red */
}


