.container {
    overflow-y: scroll;
    width: 85%; /* Use a high percentage for small screens */
    max-width: 1200px; /* Maximum width for large screens */
    margin: 0 auto; /* Center the container */
    padding: 20px; /* Add some padding */
}

.performingRow {
    position: relative;
    justify-content: center;
    align-items: stretch;
    overflow: auto;
    display: flex;
    flex-direction: row;
    width: 100%;
    margin-bottom: 20px;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.15);
}

#animation_div, #process_div {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 10px; 
    border-radius: 10px; 
    background-color: #f5f5f5;  
    overflow: auto; 
}

#animation_div {    
    width: 70%; 
    position: relative;   
}

#process_div {
    width: 30%;
}

#title_div {
    font-weight: bold;
    text-align: center;
    font-size: 30px;
    color: #242323;
    margin-bottom: 20px;
}

#buttons_div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

#next-end-button, #prev-button, #extra-button{
    flex-grow: 0; 
    flex-basis: auto;
    width: 100px; 
    margin: 0 5px; 
    background-color: #4B8EDE;
    color: #FFFFFF;        
    height: 50px;
    border: none;
    border-radius: 5px;
    font-size: 20px;
    cursor: pointer;
}

#select_step_div {
    padding-bottom: 20px; 
}

#stepSelect {
    width: 100%;
    padding: 10px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 5px;
    border: 1px solid #ccc;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #f8f8f8;
    color: #333;
}

#stepSelect:focus {
    width: 100%;
    font-size: 20px;
    outline: none;
    border-color: #2c99ce;
}

#next-end-button:hover, #prev-button:hover, #stepSelect:hover, #extra-button:hover {
    background-color: #2388a6; 
}

.controlPanel {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 30px; 
    margin-top: 20px; 
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.15);
}

#tooltip-container {
    position: absolute;
    display: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    padding: 10px;
    z-index: 1;
}

#tooltip-container .tooltip-row {
    display: flex;
    align-items: flex-start;
}

#tooltip-container .tooltip-column:first-child {
    flex: 40%;
}

#tooltip-container .tooltip-column:last-child {
    flex: 60%;
}

#tooltip-container .close-button {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 10px;
    background-color: #f44336;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 50%;
}

#tooltip-container .close-button:hover {
    background-color: #f44336;
}

#tooltip-image {    
    object-fit: contain;
    height: auto;
    display: block;
    margin: auto; 
}

.tooltip-icon {
    max-width: 100px;
    max-height: 100px;
}

#icon_container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap; 
}

@media (min-width: 768px) {
    .container {
      width: 50%; /* You can adjust this percentage based on your design */
      /* max-width is already set above, so it will not stretch beyond 1200px */
    }
  }
  
@media screen and (max-width: 600px) {
    .performingRow {
        flex-direction: column;
    }

    #animation_div, #process_div {
        width: 100%;
    }

    #process_div {
        font-size: 12px;
    }

    #tooltip-container {
        flex-direction: column;
        font-size: 12px;
        width: 70%;
    }

    #tooltip-container img:first-child {
        width: 150px;
        height: auto;
    }

    #close-tooltip {            
        text-align: center;
        height: 5px;
        line-height: 5px; 
    }

    #tooltip-container .close-button {
        position: absolute;
        top: 10px;
        right: 10px;
        padding: 0;
        margin: 0;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background-color: #f44336;
        color: #fff;
        text-align: center;
        line-height: 30px;
        cursor: pointer; 
    }

    #title_div {
        font-size: 18px;
    }

    #next-end-button, #prev-button {
        height: 40px;
        font-size: 16px;
    }

    #stepSelect {
        padding: 5px;
        font-size: 14px !important;
        width: 70%;
    }
    
    .tooltip-row {
        flex-direction: column;
    }  

    .tooltip-icon {
        max-width: 50px;
        max-height: 50px;
    }

    .controlPanel {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-around;
        align-items: center;
        padding: 10px 0;
        z-index: 1;
    }

    .controlPanel button, .controlPanel select {
        flex: 1 0 auto; 
        margin: 5px;
        text-align: center;
    }
}