.molecule-info-container {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    gap: 20px;
    width: 100%;
    justify-content: center; /* Center the entire container */
    max-width: 1200px; /* Limit maximum width */
    margin-left: auto;
    margin-right: auto;
    position: relative; /* Add this to allow absolute positioning of child elements */
}

.molecule-column {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    align-self: flex-start;
}

/* Adjust column widths with flex proportions */
.gdraw-column {
    flex: 3;
    min-width: 400px;
    padding-left: 15px; /* Reduced padding */
    padding-right: 15px;
    text-align: center; /* Center all content in the gdraw column */
}

.gdraw-column p {
    text-align: left; /* Keep paragraph text left-aligned */
}

.fragments-column {
    flex: 1;
    min-width: 180px;
    max-width: 220px;
    position: relative;
    left: -8%; /* Shift these columns 8% to the left */
}
.variants-column {
    flex: 1;
    min-width: 180px;
    max-width: 220px;
    position: relative;
    left: -5%; /* Shift these columns 8% to the left */
}
.column-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #608bd2;
    padding-bottom: 8px;
}

.gdraw-column .column-header {
    text-align: center; /* Center the Protein Structure heading */
}

.gdraw-container {
    margin-top: 10px;
    overflow: visible;
    text-align: center; /* Center the gdraw image */
}

/* Make the image responsive within the container */
.gdraw-container img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto; /* Center the image */
}

.fragments-grid, .variants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.fragment-item, .variant-item {
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s;
    font-size: 0.9em;
}

.fragment-item:hover, .variant-item:hover {
    background-color: #f5f5f5;
}

.fragment-item.active, .variant-item.active {
    background-color: #e6eeff;
    border-color: #608bd2;
}

.fragment-current, .variant-current {
    display: block;
    position: relative;
    color: #608bd2;
    font-weight: bold;
}

.current-indicator {
    display: block;
    font-size: 10px;
    margin-top: 5px;
    color: #666;
}

.fragment-link, .variant-link {
    text-decoration: none;
    color: #333;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.all-fragments {
    grid-column: 1 / -1;
}

.all-link {
    font-weight: bold;
    color: #608bd2;
}

/* Adjust for smaller screens */
@media (max-width: 992px) {
    .molecule-info-container {
        flex-direction: column;
    }
    
    .molecule-column {
        width: 100%;
        max-width: none;
    }
    
    .gdraw-column {
        order: 1;
    }
    
    .fragments-column, .variants-column {
        order: 2;
        left: 0; /* Reset the left position on small screens */
    }
    
    .variants-column {
        order: 3;
    }
}
